Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrCodeBadParam = 10001 ErrCodeUserNotFound = 10100 ErrCodeInvalidPassword = 10101 ErrCodePermissionDenied = 10201 ErrCodeServiceBusy = 20001 ErrCodeNotFound = 40400 )
Variables ¶
View Source
var Log = &Logger{Logger: logging.MustGetLogger("om")}
Functions ¶
func InitConfig ¶
Types ¶
type Config ¶
type Config struct { Env string `json:"env"` Addr string `json:"addr"` Mysql *MysqlConfig `json:"mysql"` Casbin Casbin `json:"casbin"` }
type MysqlConfig ¶
type MysqlConfig struct { Addr string `json:"addr"` User string `json:"user"` Password string `json:"password"` Db string `json:"db"` }
func GetMysqlCfg ¶
func GetMysqlCfg() *MysqlConfig
Click to show internal directories.
Click to hide internal directories.