Documentation
¶
Index ¶
- Constants
- Variables
- func CommonSecretChange(prefix string, src, dst interface{})
- func DecodeDBSensitiveField(encrypted string) string
- func EncodeDBSensitiveField(plainText string) string
- func GetAppName() string
- func GetConfDirPath() string
- func GetLogDirPath() string
- func GetLogLevel() string
- func GetRootPath() string
- func GetRunEnv() int
- func GetServerID() string
- func IsDockerPlatform() bool
- func IsEncrypted(data string) (isEncrypted bool, err error)
- func SetAppName(appName string)
- func SetRootPath(r string)
- func SetServerID(serverID string)
Constants ¶
View Source
const ( NNClusterType = "NN_CLUSTER_TYPE" DockAppName = "APP_NAME" DockerRunEnv = "RUN_ENV" )
View Source
const ( RunEnvDEV = 0 RunEnvQAT = 1 RunEnvPRE = 2 RunEnvPRD = 3 RunEnvDOC = 4 )
RUN_ENV: (prod,tips,test)
View Source
const DefaultRootPath = "."
View Source
const LogLevel = "LOG_LEVEL"
Variables ¶
View Source
var ( LocalIP string AppName string RunMode string ServerID string )
Functions ¶
func CommonSecretChange ¶
func CommonSecretChange(prefix string, src, dst interface{})
目前只支持替换为string类型的value
func DecodeDBSensitiveField ¶
func EncodeDBSensitiveField ¶
func GetAppName ¶
func GetAppName() string
func GetLogDirPath ¶
func GetLogDirPath() string
func GetLogLevel ¶
func GetLogLevel() string
func GetRootPath ¶
func GetRootPath() string
func GetServerID ¶
func GetServerID() string
func IsDockerPlatform ¶
func IsDockerPlatform() bool
func IsEncrypted ¶
func SetAppName ¶
func SetAppName(appName string)
func SetServerID ¶
func SetServerID(serverID string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.