Documentation ¶
Index ¶
Constants ¶
View Source
const SystemError = "001"
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Types ¶
type ApiRequest ¶
type ApiRequest struct { Cmd string `json:"cmd"` Data interface{} `json:"data"` }
type ApiResponse ¶
type ApiResponse struct { Code interface{} `json:"code"` Msg interface{} `json:"msg"` Data interface{} `json:"data"` }
func BuildFail ¶
func BuildFail(code string, msg string) ApiResponse
func BuildOK ¶
func BuildOK() ApiResponse
type AppConfig ¶
type AppConfig struct { RunMode bool AppName string `yaml:"application"` Server ServerConfig Database DatabaseConfig Redis RedisConfig Log Log }
AppConfig 服务端配置数据结构
func GetAppConfig ¶
func GetAppConfig() *AppConfig
type DatabaseConfig ¶
type DatabaseConfig struct { Type string User string Password string Host string DbName string Charset string }
func GetDatabaseConfig ¶
func GetDatabaseConfig() DatabaseConfig
type RedisConfig ¶
func GetRedisConfig ¶
func GetRedisConfig() RedisConfig
type ServerConfig ¶
func GetServerConfig ¶
func GetServerConfig() ServerConfig
Click to show internal directories.
Click to hide internal directories.