Documentation ¶
Index ¶
- Constants
- type APIServerCommonConfig
- type APIServerConfig
- type APIServerCookieConfig
- type APIServerListenConfig
- type APIServerLoggerConfig
- type APIServerMailConfig
- type APIServerSecurityConfig
- type APIServerSentryConfig
- type CacheConfig
- type DBConfig
- type OpenAPIAuthConfig
- type OpenAPIConfig
- type OpenAPIHTTPConfig
- type OpenAPILoggerConfig
Constants ¶
View Source
const ( LanguageEnUs = "en_us" LanguageZhCn = "zh_cn" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServerCommonConfig ¶
type APIServerConfig ¶
type APIServerConfig struct { AppName string `yaml:"appname"` Logger APIServerLoggerConfig `yaml:"logger"` Listen APIServerListenConfig `yaml:"listen"` DB DBConfig `yaml:"db"` Cache CacheConfig `yaml:"cache"` Security APIServerSecurityConfig `yaml:"security"` Cookie APIServerCookieConfig `yaml:"cookie"` Sentry APIServerSentryConfig `yaml:"sentry"` Common APIServerCommonConfig `yaml:"common"` Mail APIServerMailConfig `yaml:"mail"` Language string `yaml:"language"` }
func ApiServerConfig ¶
func ApiServerConfig() *APIServerConfig
func NewAPIServerConfig ¶
func NewAPIServerConfig(file string) (*APIServerConfig, error)
type APIServerCookieConfig ¶
type APIServerCookieConfig struct {
Expires string `yaml:"expires"`
}
type APIServerListenConfig ¶
type APIServerLoggerConfig ¶
type APIServerLoggerConfig struct {
Level string `yaml:"level"`
}
type APIServerMailConfig ¶
type APIServerSecurityConfig ¶
type APIServerSentryConfig ¶
type APIServerSentryConfig struct {
DSN string `yaml:"dsn"`
}
type CacheConfig ¶
type OpenAPIAuthConfig ¶
type OpenAPIAuthConfig struct {
JwtSalt string `yaml:"jwtSalt"`
}
type OpenAPIConfig ¶
type OpenAPIConfig struct { Logger OpenAPILoggerConfig `yaml:"logger"` HTTP OpenAPIHTTPConfig `yaml:"http"` Database DBConfig `yaml:"database"` Auth OpenAPIAuthConfig `yaml:"auth"` }
func NewOpenAPIServerConfig ¶
func NewOpenAPIServerConfig(file string) (*OpenAPIConfig, error)
func OpenAPIServerConfig ¶
func OpenAPIServerConfig() *OpenAPIConfig
type OpenAPIHTTPConfig ¶
type OpenAPILoggerConfig ¶
type OpenAPILoggerConfig struct {
Info string `yaml:"info"`
}
Click to show internal directories.
Click to hide internal directories.