1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| package tech.powerjob.server.common.constants;
|
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * 容器类型
| *
| * @author tjq
| * @since 2020/5/15
| */
| @Getter
| @AllArgsConstructor
| public enum ContainerSourceType {
|
| FatJar(1, "Jar文件"),
| Git(2, "Git代码库");
|
| private final int v;
| private final String des;
|
| public static ContainerSourceType of(int v) {
| for (ContainerSourceType type : values()) {
| if (type.v == v) {
| return type;
| }
| }
| throw new IllegalArgumentException("unknown ContainerSourceType of " + v);
| }
| }
|
|