package config import "time" // Config is config struct type Config struct { AppName string `yaml:"appName" json:"appName"` GinMode string `yaml:"ginMode" json:"ginMode"` LogMode string `yaml:"logMode" json:"logMode"` LogPath string `yaml:"logPath" json:"logPath"` Port int `yaml:"port" json:"port"` LogMySQL MySQL `yaml:"logMysql" json:"logMysql"` //JWT JWT `yaml:"JWT" json:"JWT"` Batch BatchConfig `yaml:"batch" json:"batch"` } type BatchConfig struct { BatchSize int `yaml:"batchSize" json:"batchSize"` FlushTimeout time.Duration `yaml:"flushTimeout" json:"flushTimeout"` ChannelSize int `yaml:"channelSize" json:"channelSize"` } // MySQLBase is base config of mysql type MySQL struct { Addr string `yaml:"addr"` Username string `yaml:"username"` Password string `yaml:"password"` DbName string `yaml:"db_name"` MaxIdleConnections int `yaml:"max_idle_connections"` MaxOpenConnections int `yaml:"max_open_connections"` }