Documentation ¶
Index ¶
Constants ¶
const ( ConfigPath = "./configs/" // 路径写死 DevPath = "dev/" PdcPath = "pdc/" AppConfigFileName = "app.json" WechatConfigFileName = "wechat.json" MysqlConfigFileName = "mysql.json" EsConfigFileName = "es.json" RedisConfigFileName = "redis.json" OssConfigFileName = "oss.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
func (AppConfig) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (AppConfig) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*AppConfig) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AppConfig) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ConfigMng ¶
type ConfigMng struct{}
func (*ConfigMng) GetHttpPort ¶
func (*ConfigMng) GetMysql ¶
func (*ConfigMng) GetMysql() MysqlConfig
func (*ConfigMng) GetRedis ¶
func (*ConfigMng) GetRedis() RedisConfig
func (*ConfigMng) GetWechat ¶
func (*ConfigMng) GetWechat() WechatConfig
type EsConfig ¶
type EsConfig struct { Host string `json:"host"` Port string `json:"port"` Username string `json:"username"` Password string `json:"password"` }
func (EsConfig) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (EsConfig) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*EsConfig) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EsConfig) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type MysqlConfig ¶
type MysqlConfig struct { Host string `json:"host"` Port string `json:"port"` Username string `json:"username"` Password string `json:"password"` Collation string `json:"collation"` DbName string `json:"db_name"` Charset string `json:"charset"` }
func (MysqlConfig) MarshalEasyJSON ¶
func (v MysqlConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (MysqlConfig) MarshalJSON ¶
func (v MysqlConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*MysqlConfig) UnmarshalEasyJSON ¶
func (v *MysqlConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*MysqlConfig) UnmarshalJSON ¶
func (v *MysqlConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type OssConfig ¶
type OssConfig struct { AccessKeyID string `json:"access_key_id"` AccessKeySecret string `json:"access_key_secret"` EndPoint string `json:"end_point"` BucketName string `json:"bucket_name"` UploadPath string `json:"upload_path"` Host string `json:"host"` CallBackUrl string `json:"call_back_url"` //为上传回调服务器的URL,请将下面的IP和Port配置为您自己的真实信息。 ExpireTime int64 `json:"expire_time"` // 上传策略Policy的失效时间,单位为秒。 }
func (OssConfig) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (OssConfig) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*OssConfig) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*OssConfig) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type RedisConfig ¶
type RedisConfig struct { IP string `json:"ip"` Port string `json:"port"` Password string `json:"password"` IdleTimeout int `json:"idle_timeout"` Database int `json:"datebase"` MaxActive int `json:"max_active"` MaxIdle int `json:"max_idle"` }
func (RedisConfig) MarshalEasyJSON ¶
func (v RedisConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RedisConfig) MarshalJSON ¶
func (v RedisConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RedisConfig) UnmarshalEasyJSON ¶
func (v *RedisConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RedisConfig) UnmarshalJSON ¶
func (v *RedisConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type WechatConfig ¶
type WechatConfig struct { AppID string `json:"app_id"` AppSecret string `json:"app_secret"` GrantType string `json:"grant_type"` PayKey string `json:"pay_key"` MechID string `json:"mech_id"` NotifyUrl string `json:"notify_url"` RefundUrl string `json:"refund_url"` CertPath string `json:"cert_path"` CertKeyPath string `json:"cert_key_path"` }
func (WechatConfig) MarshalEasyJSON ¶
func (v WechatConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (WechatConfig) MarshalJSON ¶
func (v WechatConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*WechatConfig) UnmarshalEasyJSON ¶
func (v *WechatConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*WechatConfig) UnmarshalJSON ¶
func (v *WechatConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface