Documentation ¶
Index ¶
Constants ¶
View Source
const ( // yaml配置文件 环境变量键名 YamlFileEnvKey = "CFG_YAML" YamlDefaultPath = "application.yaml" // db 相关 MysqlUserKey = "DB_MYSQL_USER" DefaultMYSQLUser = "root" MysqlPwdKey = "DB_MYSQL_PWD" DefaultMYSQLPwd = "mysql" MysqlHostKey = "DB_MYSQL_HOST" DefaultMYSQLHost = "127.0.0.1" MysqlPortKey = "DB_MYSQL_USER" DefaultMYSQLPort = "3306" MysqlDBKey = "DB_MYSQL_DB" DefaultMYSQLDB = "cfg_db" // redis RedisHostKey = "DB_REDIS_HOST" DefaultRedisHost = "127.0.0.1" RedisPortKey = "DB_REDIS_PORT" DefaultRedisPort = "6379" RedisPwdKey = "DB_REDIS_PWD" DefaultRedisPwd = "" RedisDBKey = "DB_REDIS_DB" DefaultRedisDB = "1" // 缓存相关默认值 DefaultCacheTime = 3600 * time.Second ScanInterval = 30 * time.Second // grpc GrpcHostKey = "SERVER_GRPC_HOST" GrpcPortKey = "SERVER_GRPC_PORT" GrpcDefaultHost = "0.0.0.0" GrpcDefaultPort = 7720 // grpc 网关 GrpcGateWayHostKey = "SERVER_GRPC_GATEWAY_HOST" GrpcGateWayPortKey = "SERVER_GRPC_GATEWAY_PORT" GrpcGateWayDefaultHost = "0.0.0.0" GrpcGateWayDefaultPort = 7721 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Code string `xorm:"varchar(64) pk" remark:"配置编码"` Name string `xorm:"varchar(32)" remark:"配置名称"` Value string `xorm:"text" remark:"配置值"` Remark string `xorm:"text" remark:"配置备注"` Version int64 `xorm:"version index"` Created int64 `xorm:"created" remark:"创建时间"` Updated int64 `xorm:"updated" remark:"更新时间"` Deleted int64 `xorm:"deleted default(0)" remark:"删除时间"` }
type ConfigStatus ¶
type ConfigStatus int8
Click to show internal directories.
Click to hide internal directories.