Documentation ¶
Index ¶
- func GetParameter(key string) interface{}
- func GetParameters() *map[string]interface{}
- func LoadConfig(dir string, config string) error
- func LoadEnvConfig(dir string, config string, env string) error
- func LoadNicoConfig()
- func LoadTreeConfig()
- type ApplicationConfig
- type Config
- type DingTalkSDKConfig
- type KafkaMQConfig
- type LogConfig
- type MQConfig
- type MailConfig
- type MysqlConfig
- type OSSConfig
- type RedisConfig
- type RocketMQConfig
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetParameter ¶
func GetParameter(key string) interface{}
func GetParameters ¶
func GetParameters() *map[string]interface{}
func LoadConfig ¶
func LoadNicoConfig ¶
func LoadNicoConfig()
func LoadTreeConfig ¶
func LoadTreeConfig()
Types ¶
type ApplicationConfig ¶
func GetApplication ¶
func GetApplication() *ApplicationConfig
type Config ¶
type Config struct { Viper *viper.Viper Mysql *MysqlConfig Redis *RedisConfig Mail *MailConfig Server *ServerConfig DingTalk *DingTalkSDKConfig Logs *map[string]LogConfig Application *ApplicationConfig Parameters *map[string]interface{} Mq *MQConfig OSS *OSSConfig }
type DingTalkSDKConfig ¶
type DingTalkSDKConfig struct { SuiteKey string SuiteSecret string Token string AesKey string AppId int64 }
func GetDingTalkSdkConfig ¶
func GetDingTalkSdkConfig() *DingTalkSDKConfig
type KafkaMQConfig ¶
type KafkaMQConfig struct {
NameServers string
}
KafKa MQ Config
func GetKafkaConfig ¶
func GetKafkaConfig() *KafkaMQConfig
type LogConfig ¶
func GetLogConfig ¶
type MQConfig ¶
type MQConfig struct { Mode string Rocket *RocketMQConfig Kafka *KafkaMQConfig }
type MailConfig ¶
func GetMailConfig ¶
func GetMailConfig() *MailConfig
type MysqlConfig ¶
func GetMysqlConfig ¶
func GetMysqlConfig() *MysqlConfig
type OSSConfig ¶
type OSSConfig struct { BucketName string EndPoint string AccessKeyId string AccessKeySecret string }
func GetOSSConfig ¶
func GetOSSConfig() *OSSConfig
type RedisConfig ¶
type RedisConfig struct { Host string Port int Pwd string Database int MaxIdle int MaxActive int MaxIdleTimeout int }
func GetRedisConfig ¶
func GetRedisConfig() *RedisConfig
type RocketMQConfig ¶
type ServerConfig ¶
func GetServerConfig ¶
func GetServerConfig() *ServerConfig
Click to show internal directories.
Click to hide internal directories.