Documentation
¶
Index ¶
Constants ¶
View Source
const ( APPName = "grow" ConfName = "conf.yaml" )
constant
Variables ¶
View Source
var ( Version string BuildInfo *BuildData )
从编译参数中获取
View Source
var DefOption = &ConfOption{ Serve: &ServeOption{ HTTPListening: ":9999", Debug: false, }, MYSQLMaster: gxdb.DefOption, Redis: gxdb.DefRedisOption, Auth: &AuthOption{ Debug: true, ExpirePeriodSeconds: 60 * 60 * 2, SingleLogin: true, VerifyIP: true, }, }
DefOption 默认配置
Functions ¶
Types ¶
type AuthOption ¶
type AuthOption struct { Debug bool `yaml:"debug" mapstructure:"debug"` //令牌超时秒数 ExpirePeriodSeconds int64 `yaml:"expire_period_seconds" mapstructure:"expire_period_seconds"` //是否是单点登录 SingleLogin bool `yaml:"single_login" mapstructure:"single_login"` //是否验校IP VerifyIP bool `yaml:"verify_ip" mapstructure:"verify_ip"` }
AuthOption ...
type ConfOption ¶
type ConfOption struct { Serve *ServeOption `yaml:"serve" mapstructure:"serve"` MYSQLMaster *gxdb.Option `yaml:"mysql_master" mapstructure:"mysql_master"` Redis *gxdb.RedisOption `yaml:"redis" mapstructure:"redis"` Auth *AuthOption `yaml:"auth" mapstructure:"auth"` }
ConfOption 配置设置
type ServeOption ¶
type ServeOption struct { HTTPListening string `yaml:"http_listening" mapstructure:"http_listening"` Debug bool `yaml:"debug" mapstructure:"debug"` }
ServeOption 服务器配置
Click to show internal directories.
Click to hide internal directories.