Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
type CryptoConfig ¶
type CryptoConfig struct { AESKey string `json:"-" toml:"aes_key"` AESIV string `json:"-" toml:"aes_iv"` }
func (*CryptoConfig) Check ¶
func (cc *CryptoConfig) Check() error
type DatabaseConfig ¶
type DatabaseConfig struct { Address string `json:"address" toml:"address"` Username string `json:"username" toml:"username"` Password string `json:"-" toml:"password"` Database string `json:"database" toml:"database"` MaxIdleConns int `json:"max_idle_conns" toml:"max_idle_conns"` MaxOpenConns int `json:"max_open_conns" toml:"max_open_conns"` ConnMaxLifetime Duration `json:"conn_max_lifetime" toml:"conn_max_lifetime"` ConnMaxIdleTime Duration `json:"conn_max_idle_time" toml:"conn_max_idle_time"` ReportStatsTime Duration `json:"report_stats_time" toml:"report_stats_time"` }
type Duration ¶
func (*Duration) UnmarshalText ¶
type PostarAdminConfig ¶
type PostarAdminConfig struct { Logger logitconf.Config `json:"logger" toml:"logger"` Server ServerConfig `json:"server" toml:"server"` Database DatabaseConfig `json:"database" toml:"database"` Crypto CryptoConfig `json:"crypto" toml:"crypto"` }
PostarAdminConfig stores all configurations of postar-admin.
func NewPostarAdminConfig ¶
func NewPostarAdminConfig() *PostarAdminConfig
NewPostarAdminConfig returns a new config for postar-admin.
func (*PostarAdminConfig) Check ¶
func (pac *PostarAdminConfig) Check() error
type PostarConfig ¶
type PostarConfig struct { Logger logitconf.Config `json:"logger" toml:"logger"` Server ServerConfig `json:"server" toml:"server"` Database DatabaseConfig `json:"database" toml:"database"` Crypto CryptoConfig `json:"crypto" toml:"crypto"` Cache CacheConfig `json:"cache" toml:"cache"` }
PostarConfig stores all configurations of postar.
func NewPostarConfig ¶
func NewPostarConfig() *PostarConfig
NewPostarConfig returns a new config for postar.
func (*PostarConfig) Check ¶
func (pc *PostarConfig) Check() error
type ServerConfig ¶
type ServerConfig struct { Type string `json:"type" toml:"type"` GrpcEndpoint string `json:"grpc_endpoint" toml:"grpc_endpoint"` HttpEndpoint string `json:"http_endpoint" toml:"http_endpoint"` UseTLS bool `json:"use_tls" toml:"use_tls"` CertFile string `json:"cert_file" toml:"cert_file"` KeyFile string `json:"key_file" toml:"key_file"` RequestTimeout Duration `json:"request_timeout" toml:"request_timeout"` CloseServerTimeout Duration `json:"close_server_timeout" toml:"close_server_timeout"` }
Click to show internal directories.
Click to hide internal directories.