Documentation ¶
Index ¶
- func Dispose()
- func GetEnv() string
- func LoadAppConfig(customConfig interface{})
- func LoadConfig(configRelativePath string) string
- func LoadConfigForceEnv(configRelativePath string, forceEnv string) string
- func LoadEnvConfig(dir string, config string, env string)
- type AppConfig
- type ServerConfig
- type SignatureConfig
- type SocBootConfig
- type SocConfig
- type VerifyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
LoadConfig 加载配置文件, configRelativePath 配置文件路径
func LoadConfigForceEnv ¶
LoadConfigForceEnv 加载配置文件, configRelativePath 配置文件路径, forceEnv 强制环境变量
func LoadEnvConfig ¶
Types ¶
type AppConfig ¶
type AppConfig struct { Name string Server *ServerConfig AppCode string AppKey string }
AppConfig 应用配置
type SignatureConfig ¶
type SignatureConfig struct { // Enable 是否开启 Enable bool `json:"enable"` // Headers 需要加入签名的http 头 Headers []string `json:"headers"` // IgnoreUrls 忽略签名校验Url IgnoreUrls []string `json:"ignoreUrls"` // TimeRange 时间戳允许正负范围,单位秒。 TimeRange int64 `json:"timeRange"` // IgnoreQuery 忽略校验的query参数,只能在非pre和prod环境生效 IgnoreQuery string `json:"ignoreQuery"` }
SignatureConfig 签名配置
type SocBootConfig ¶
type SocConfig ¶
type SocConfig struct { App *AppConfig DataSource map[string]config.DBConfig //数据库配置 Redis map[string]config.RedisConfig //redis配置 Logger map[string]config.LogConfig Trace *config.TraceConfig Signature *SignatureConfig I18n *config.I18nConfig WeChat map[string]config.WeChatConfig ALiYun map[string]config.ALiYunConfig Params map[string]string }
func GetSocConfig ¶
func GetSocConfig() *SocConfig
type VerifyConfig ¶
Click to show internal directories.
Click to hide internal directories.