config

package
v0.0.0-...-325abe0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

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 LoadConfig(dir string, config string) error

func LoadEnvConfig

func LoadEnvConfig(dir string, config string, env string) error

func LoadNicoConfig

func LoadNicoConfig()

func LoadTreeConfig

func LoadTreeConfig()

Types

type ApplicationConfig

type ApplicationConfig struct {
	RunMode   int
	CacheMode string
}

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
}

func GetConfig

func GetConfig() Config

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

type LogConfig struct {
	LogPath      string
	Level        string
	FileSize     int64
	FileNum      int
	IsConsoleOut bool
}

func GetLogConfig

func GetLogConfig(name string) *LogConfig

type MQConfig

type MQConfig struct {
	Mode   string
	Rocket *RocketMQConfig
	Kafka  *KafkaMQConfig
}

func GetMQ

func GetMQ() *MQConfig

type MailConfig

type MailConfig struct {
	Usr  string
	Pwd  string
	Host string
	Port int
}

func GetMailConfig

func GetMailConfig() *MailConfig

type MysqlConfig

type MysqlConfig struct {
	Host     string
	Port     int
	Usr      string
	Pwd      string
	Database string
}

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 RocketMQConfig struct {
	GroupID    string
	NameServer string
	Log        *LogConfig
}

type ServerConfig

type ServerConfig struct {
	Port int
	Name string
}

func GetServerConfig

func GetServerConfig() *ServerConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL