Documentation ¶
Index ¶
- Variables
- type AppCatalogService
- type AppConf
- type AppMediaService
- type CORS
- type CORSWhitelist
- type Captcha
- type Email
- type ExternalApiEndpoint
- type GoogleMap
- type JWT
- type Kafka
- type KeyCloak
- type MqRabbitMq
- type Mysql
- type OssAli
- type OssGoogleStorage
- type OssLocal
- type Pgsql
- type Redis
- type System
- type WaBlast
- type WaBotika
- type Zap
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, }, Redis: Redis{ DB: 0, Address: "localhost:6379", Password: "", }, Captcha: Captcha{ KeyLong: 6, ImageWidth: 240, ImageHeight: 80, }, OssLocal: OssLocal{Path: "./oss/local"}, OssAli: OssAli{ Endpoint: "localhost", AccessKeyID: "123", AccessKeySecret: "123", BucketName: "123", BucketUrl: "123", BasePath: "123", }, Email: Email{ Host: "", Port: "", Username: "", Password: "", Encryption: "", }, JWT: JWT{ SigningKey: "", ExpiresTime: 0, BufferTime: 0, Issuer: "", }, }
Functions ¶
This section is empty.
Types ¶
type AppCatalogService ¶
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"` Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"` Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"` OssLocal OssLocal `mapstructure:"oss_local" json:"oss_local" yaml:"oss_local"` OssAli OssAli `mapstructure:"oss_ali" json:"oss_ali" yaml:"oss_ali"` Email Email `mapstructure:"email" json:"email" yaml:"email"` WaBlast WaBlast `mapstructure:"wablast" json:"wablast" yaml:"wablast"` WaBotika WaBotika `mapstructure:"wabotika" json:"wabotika" yaml:"wabotika"` GoogleMap GoogleMap `mapstructure:"google_map" json:"google_map" yaml:"google_map"` JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"` ExternalApiEndpoint ExternalApiEndpoint `mapstructure:"external_api_endpoint" json:"external_api_endpoint" yaml:"external_api_endpoint"` KeyCloak KeyCloak `mapstructure:"keycloak" json:"keycloak" yaml:"keycloak"` Kafka Kafka `mapstructure:"kafka" json:"kafka" yaml:"kafka"` Cors CORS `mapstructure:"cors" json:"cors" yaml:"cors"` OssGoogleStorage OssGoogleStorage `mapstructure:"oss_google_storage" json:"oss_google_storage" yaml:"oss_google_storage"` }
type AppMediaService ¶
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 Email ¶
type Email struct { Host string `mapstructure:"host" json:"host" yaml:"host"` Port string `mapstructure:"port" json:"port" yaml:"port"` Username string `mapstructure:"username" json:"username" yaml:"username"` Password string `mapstructure:"password" json:"password" yaml:"password"` Encryption string `mapstructure:"encryption" json:"encryption" yaml:"encryption"` From string `mapstructure:"from" json:"from" yaml:"from"` }
type ExternalApiEndpoint ¶
type ExternalApiEndpoint struct { LotteryUrl string `mapstructure:"lottery_url" json:"lottery_url" yaml:"lottery_url"` MsSecureUrl string `mapstructure:"ms_secure_url" json:"ms_secure_url" yaml:"ms_secure_url"` MsSecureUrlFrontend string `mapstructure:"ms_secure_url_frontend" json:"ms_secure_url_frontend" yaml:"ms_secure_url_frontend"` MsProductUrl string `mapstructure:"ms_product_url" json:"ms_product_url" yaml:"ms_product_url"` MsAggregationUrl string `mapstructure:"ms_aggregation_url" json:"ms_aggregation_url" yaml:"ms_aggregation_url" ` }
type JWT ¶
type JWT struct { SigningKey string `mapstructure:"signing_key" json:"signingKey" yaml:"signing_key"` ExpiresTime int64 `mapstructure:"expires_time" json:"expiresTime" yaml:"expires_time"` BufferTime int64 `mapstructure:"buffer_time" json:"bufferTime" yaml:"buffer_time"` Issuer string `mapstructure:"issuer" json:"issuer" yaml:"issuer"` }
type Kafka ¶
type Kafka struct { Username string `mapstructure:"username" json:"username" yaml:"username"` Password string `mapstructure:"password" json:"password" yaml:"password"` Address []string `mapstructure:"address" json:"address" yaml:"address"` PrefixGroupName string `mapstructure:"prefix_group_name" json:"prefix_group_name" yaml:"prefix_group_name"` SecurityProtocol string `mapstructure:"security_protocol" json:"security_protocol" yaml:"security_protocol"` SSLCaLocation string `mapstructure:"ssl_ca_location" json:"ssl_ca_location" yaml:"ssl_ca_location"` SASLMechanism string `mapstructure:"sasl_mechanism" json:"sasl_mechanism" yaml:"sasl_mechanism"` }
type KeyCloak ¶
type KeyCloak struct { KeyCloakIP string `mapstructure:"key_cloak_ip" json:"key_cloak_ip" yaml:"key_cloak_ip"` Realm string `mapstructure:"realm" json:"realm" yaml:"realm"` ClientID string `mapstructure:"client_id" json:"client_id" yaml:"client_id"` ClientUUID string `mapstructure:"client_uuid" json:"client_uuid" yaml:"client_uuid"` ClientSecret string `mapstructure:"client_secret" json:"client_secret" yaml:"client_secret"` }
type MqRabbitMq ¶
type MqRabbitMq struct { Address string `mapstructure:"address" json:"address" yaml:"address"` Port int `mapstructure:"port" json:"port" yaml:"port"` }
func (MqRabbitMq) ConnectionString ¶
func (r MqRabbitMq) ConnectionString() string
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 OssAli ¶
type OssAli struct { Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"` AccessKeyID string `mapstructure:"access_key_id" json:"access_key_id" yaml:"access_key_id"` AccessKeySecret string `mapstructure:"access_key_secret" json:"access_key_secret" yaml:"access_key_secret"` BucketName string `mapstructure:"bucket_name" json:"bucket_name" yaml:"bucket_name"` BucketUrl string `mapstructure:"bucket_url" json:"bucket_url" yaml:"bucket_url"` BasePath string `mapstructure:"base_path" json:"base_path" yaml:"base_path"` }
type OssGoogleStorage ¶
type OssGoogleStorage struct { Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"` ProjectID string `mapstructure:"project_id" json:"project_id" yaml:"project_id"` AccessKeySecret string `mapstructure:"access_key_secret" json:"access_key_secret" yaml:"access_key_secret"` BucketName string `mapstructure:"bucket_name" json:"bucket_name" yaml:"bucket_name"` BucketUrl string `mapstructure:"bucket_url" json:"bucket_url" yaml:"bucket_url"` BasePath string `mapstructure:"base_path" json:"base_path" yaml:"base_path"` }
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"` LogLocation string `mapstructure:"log_location" json:"log_location" yaml:"log_location"` }
type Zap ¶
type Zap struct { Level string `mapstructure:"level" json:"level" yaml:"level"` Format string `mapstructure:"format" json:"format" yaml:"format"` Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` Director string `mapstructure:"director" json:"director" yaml:"director"` ShowLine bool `mapstructure:"show_line" json:"show_line" yaml:"showLine"` EncodeLevel string `mapstructure:"encode_level" json:"encode_level" yaml:"encode_level"` StackTraceKey string `mapstructure:"stack_trace_key" json:"stack_trace_key" yaml:"stack_trace_key"` LogInConsole bool `mapstructure:"log_in_console" json:"log_in_console" yaml:"log_in_console"` }
Click to show internal directories.
Click to hide internal directories.