Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAppConf = AppConf{ System: System{ Env: "", Address: "", OssType: "local", DbType: "mysql", MigrationSourcePath: "./infrastructure/migration/source", }, Mysql: Mysql{ Path: "localhost", Port: "3301", Config: "charset=utf8mb4&parseTime=True&loc=Local", DbName: "msglow_customer_app", Username: "app", Password: "123456", MaxIdleConnection: 0, MaxOpenConnection: 0, LogMode: "", LogZap: false, }, Pgsql: Pgsql{ Path: "localhost", Port: "", Config: "", DbName: "", Username: "", Password: "", MaxIdleConnection: 0, MaxOpenConnection: 0, LogMode: "", LogZap: false, }, Log: Log{ MaxSize: 0, Plugin: "", Compress: false, Location: "", MaxAge: 0, MaxBackup: 0, }, }
Functions ¶
This section is empty.
Types ¶
type AppConf ¶
type AppConf struct { System System `mapstructure:"system" json:"system" yaml:"system"` Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"` Pgsql Pgsql `mapstructure:"pgsql" json:"pgsql" yaml:"pgsql"` Log Log `mapstructure:"log" json:"log" yaml:"log"` Cors CORS `mapstructure:"cors" json:"cors" yaml:"cors"` }
type CORS ¶
type CORS struct { Mode string `mapstructure:"mode" json:"mode" yaml:"mode"` AllowOrigins []string `mapstructure:"allow-origins" json:"allow-origins" yaml:"allow-origins"` AllowMethods []string `mapstructure:"allow-methods" json:"allow-methods" yaml:"allow-methods"` AllowHeaders []string `mapstructure:"allow-headers" json:"allow-headers" yaml:"allow-headers"` ExposeHeaders []string `mapstructure:"expose-headers" json:"expose-headers" yaml:"expose-headers"` AllowCredentials bool `mapstructure:"allow-credentials" json:"allow-credentials" yaml:"allow-credentials"` Whitelist []CORSWhitelist `mapstructure:"whitelist" json:"whitelist" yaml:"whitelist"` }
type CORSWhitelist ¶
type CORSWhitelist struct { AllowOrigin string `mapstructure:"allow-origin" json:"allow-origin" yaml:"allow-origin"` AllowMethods []string `mapstructure:"allow-methods" json:"allow-methods" yaml:"allow-methods"` AllowHeaders []string `mapstructure:"allow-headers" json:"allow-headers" yaml:"allow-headers"` ExposeHeaders []string `mapstructure:"expose-headers" json:"expose-headers" yaml:"expose-headers"` AllowCredentials bool `mapstructure:"allow-credentials" json:"allow-credentials" yaml:"allow-credentials"` }
type Log ¶
type Log struct { MaxSize int `json:"max_size" yaml:"max_size" mapstructure:"max_size"` Plugin string `json:"plugin" yaml:"plugin" mapstructure:"plugin"` Compress bool `json:"compress" yaml:"compress" mapstructure:"compress"` Location string `json:"location" yaml:"location" mapstructure:"location"` MaxAge int `json:"max_age" yaml:"max_age" mapstructure:"max_age"` MaxBackup int `json:"max_backup" yaml:"max_backup" mapstructure:"max_backup"` }
type Mysql ¶
type Mysql struct { Path string `mapstructure:"path" json:"path" yaml:"path" ` Port string `mapstructure:"port" json:"port" yaml:"port"` Config string `mapstructure:"config" json:"config" yaml:"config"` DbName string `mapstructure:"db_name" json:"db_name" yaml:"db_name"` Username string `mapstructure:"username" json:"username" yaml:"username"` Password string `mapstructure:"password" json:"password" yaml:"password"` MaxIdleConnection int `mapstructure:"max_idle_connection" json:"max_idle_connection" yaml:"max_idle_connection"` MaxOpenConnection int `mapstructure:"max_open_connection" json:"max_open_connection" yaml:"max_open_connection"` LogMode string `mapstructure:"log_mode" json:"log_mode" yaml:"log_mode"` LogZap bool `mapstructure:"log_zap" json:"log_zap" yaml:"log_zap"` }
type Pgsql ¶
type Pgsql struct { Path string `mapstructure:"path" json:"path" yaml:"path" ` Port string `mapstructure:"port" json:"port" yaml:"port"` Config string `mapstructure:"config" json:"config" yaml:"config"` DbName string `mapstructure:"db_name" json:"db_name" yaml:"db_name"` Username string `mapstructure:"username" json:"username" yaml:"username"` Password string `mapstructure:"password" json:"password" yaml:"password"` MaxIdleConnection int `mapstructure:"max_idle_connection" json:"max_idle_connection" yaml:"max_idle_connection"` MaxOpenConnection int `mapstructure:"max_open_connection" json:"max_open_connection" yaml:"max_open_connection"` LogMode string `mapstructure:"log_mode" json:"log_mode" yaml:"log_mode"` LogZap bool `mapstructure:"log_zap" json:"log_zap" yaml:"log_zap"` }
type System ¶
type System struct { Env string `mapstructure:"env" json:"env" yaml:"env"` Address string `mapstructure:"address" json:"address" yaml:"address"` OssType string `mapstructure:"oss_type" json:"oss_type" yaml:"oss_type"` DbType string `mapstructure:"db_type" json:"db_type" yaml:"db_type"` MessageBrokerType string `mapstructure:"message_broker_type" json:"message_broker_type" yaml:"message_broker_type"` MigrationSourcePath string `mapstructure:"migration_source_path" json:"migration_source_path" yaml:"migration_source_path"` CsPhone string `mapstructure:"cs_phone" json:"cs_phone" yaml:"cs_phone"` CsEmail string `mapstructure:"cs_email" json:"cs_email" yaml:"cs_email"` MinutePerSlot int64 `mapstructure:"minute_per_slot" json:"minute_per_slot" yaml:"minute_per_slot"` Protocol string `mapstructure:"protocol" json:"protocol" yaml:"protocol"` }
Click to show internal directories.
Click to hide internal directories.