Documentation
¶
Index ¶
- Variables
- type AliyunConfig
- type AnalyticsDBConfig
- type AppConfig
- type BackendConfig
- type CacheConfig
- type ClickhouseConfig
- type Config
- type DatabaseConfig
- type DatabaseDriver
- type EmailConfig
- type KeyValueConfig
- type LogConfig
- type MysqlConfig
- type OauthAppleConfig
- type OauthConfig
- type OauthFacebookConfig
- type OauthGoogleConfig
- type OauthTiktokConfig
- type RedisConfig
- type SMSConfig
- type SMTPConfig
- type ServicesConfig
- type TidbConfig
- type WorkerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrConfigNotFound is returned when config file is not found ErrConfigNotFound = errors.New("config file not found") // ErrConfigInvalid is returned when config file is invalid ErrConfigInvalid = errors.New("config file is invalid") // ErrConfigUnmarshal is returned when config file cannot be unmarshalled ErrConfigUnmarshal = errors.New("config file cannot be unmarshalled") )
package bootstrap
Functions ¶
This section is empty.
Types ¶
type AliyunConfig ¶
type AliyunConfig struct{}
type AnalyticsDBConfig ¶
type AnalyticsDBConfig struct { Driver string `yaml:"driver"` Clickhouse ClickhouseConfig `yaml:"clickhouse"` }
type BackendConfig ¶
type BackendConfig struct { Driver DatabaseDriver `yaml:"driver"` Mysql MysqlConfig `yaml:"mysql"` Tidb TidbConfig `yaml:"tidb"` }
type CacheConfig ¶
type CacheConfig struct { Driver string `yaml:"driver"` KeyPrefix string `yaml:"key_prefix"` Redis RedisConfig `yaml:"redis"` }
type ClickhouseConfig ¶
type ClickhouseConfig struct { Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` Password string `yaml:"password"` Database string `yaml:"database"` MaxConnections int `yaml:"max_connections"` MaxIdleConnections int `yaml:"max_idle_connections"` MaxIdleTime int `yaml:"max_idle_time"` }
type Config ¶
type Config struct { Env string `yaml:"env"` App AppConfig `yaml:"app"` Log LogConfig `yaml:"log"` Database DatabaseConfig `yaml:"database"` Cache CacheConfig `yaml:"cache"` Worker WorkerConfig `yaml:"worker"` Services ServicesConfig `yaml:"services"` }
type DatabaseConfig ¶
type DatabaseConfig struct { Backend BackendConfig `yaml:"backend"` Analytics AnalyticsDBConfig `yaml:"analytics"` KeyValue KeyValueConfig `yaml:"key_value"` }
type DatabaseDriver ¶
type DatabaseDriver string
const ( DatabaseDriverMysql DatabaseDriver = "mysql" DatabaseDriverTidb DatabaseDriver = "tidb" )
type EmailConfig ¶
type EmailConfig struct { Driver string `yaml:"driver"` SMTP SMTPConfig `yaml:"smtp"` }
type KeyValueConfig ¶
type KeyValueConfig struct { Driver string `yaml:"driver"` Redis RedisConfig `yaml:"redis"` }
type MysqlConfig ¶
type MysqlConfig struct { Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` Password string `yaml:"password"` Database string `yaml:"database"` Charset string `yaml:"charset"` ParseTime bool `yaml:"parseTime"` Loc string `yaml:"loc"` MaxConnections int `yaml:"max_connections"` MaxIdleConnections int `yaml:"max_idle_connections"` MaxIdleTime int `yaml:"max_idle_time"` MigrationPath string `yaml:"migration_path"` }
type OauthAppleConfig ¶
type OauthConfig ¶
type OauthConfig struct { Facebook OauthFacebookConfig `yaml:"facebook"` Google OauthGoogleConfig `yaml:"google"` Tiktok OauthTiktokConfig `yaml:"tiktok"` Apple OauthAppleConfig `yaml:"apple"` }
oauth facebook & google config struct social login with facebook,tiktok,google, apple
type OauthFacebookConfig ¶
type OauthFacebookConfig struct { ClientID string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` RedirectURL string `yaml:"redirect_url"` }
facebook config struct
type OauthGoogleConfig ¶
type OauthGoogleConfig struct { ClientID string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` RedirectURL string `yaml:"redirect_url"` }
google config struct
type OauthTiktokConfig ¶
type RedisConfig ¶
type SMSConfig ¶
type SMSConfig struct { Driver string `yaml:"driver"` Aliyun AliyunConfig `yaml:"aliyun"` }
type SMTPConfig ¶
type SMTPConfig struct{}
type ServicesConfig ¶
type ServicesConfig struct { SMS SMSConfig `yaml:"sms"` Email EmailConfig `yaml:"email"` }
type TidbConfig ¶
type TidbConfig struct { Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` Password string `yaml:"password"` Database string `yaml:"database"` Charset string `yaml:"charset"` ParseTime bool `yaml:"parseTime"` Loc string `yaml:"loc"` MaxConnections int `yaml:"max_connections"` MaxIdleConnections int `yaml:"max_idle_connections"` MaxIdleTime int `yaml:"max_idle_time"` MigrationPath string `yaml:"migration_path"` }
type WorkerConfig ¶
type WorkerConfig struct { Driver string `yaml:"driver"` Queues map[string]int `yaml:"queues"` Redis RedisConfig `yaml:"redis"` }
Click to show internal directories.
Click to hide internal directories.