nz-talon首次提交
This commit is contained in:
33
src/main/java/net/geedge/confagent/util/RCode.java
Normal file
33
src/main/java/net/geedge/confagent/util/RCode.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package net.geedge.confagent.util;
|
||||
|
||||
public enum RCode {
|
||||
SUCCESS(200, "success"), //成功
|
||||
|
||||
AUTH_NAME_PIN_ISNULL(10000,"The name and password is required"),
|
||||
AUTH_NAME_PIN_INVALID(10001,"The name or password is invalid"),
|
||||
AUTH_TOKEN_INVALID(10002,"The token is invalid"),
|
||||
AUTH_TOKEN_ISNULL(10003,"Token is required"),
|
||||
AUTH_READ_TOKEN_FAILD(10004,"Read token failed"),
|
||||
|
||||
CONFIG_PROMTAIL_RELOAD_FAILED(10005,"Reload prometheus failed"),
|
||||
CONFIG_BLAVKBOX_RELOAD_FAILED(10006,"Reload blackbox_exporter failed"),
|
||||
CONFIG_SNMP_EXPORTER_RELOAD_FAILED(10007,"Reload snmp_exporter failed"),
|
||||
|
||||
PROMTAIL_CONFIG_VERSION_ISNULL(10008,"The promtail config version is required"),
|
||||
|
||||
ERROR(999, "error"); //通用错误/未知错误
|
||||
private RCode(Integer code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
private Integer code;
|
||||
private String msg;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user