Documentation ¶
Index ¶
- Variables
- func ConfigError(name string)
- func CreateConfigFile(workingDir string) (err error)
- func Init(workingDir string)
- func Setting(key string, defaultValues ...string) string
- func Settings(values []*SettingItem, overrideValues ...[]*SettingItem)
- type AuthConfig
- type ConfigFile
- type MailConfig
- type SettingItem
- type SettingsMutation
- type SmtpConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WD = "." DEVELOPMENT = false APP_VERSION = "0.0.1" STORAGES = &fs.StorageConfig{} APP_ENV = "" APP_KEY = "" APP_TOKEN_KEY = "token" APP_PORT = "3000" APP_THEME = "default" DB_DSN = "" DB_QUERY_LOGGING = false ROOT_DIR = "" PUBLIC_DIR = "public" PRIVATE_DIR = "private" COOKIE_UUID = "uuid" SHOW_TETUA_BLOCK = false )
Functions ¶
func ConfigError ¶
func ConfigError(name string)
func CreateConfigFile ¶
func Settings ¶
func Settings(values []*SettingItem, overrideValues ...[]*SettingItem)
Types ¶
type AuthConfig ¶
type AuthConfig struct { EnabledProviders []string `json:"enabled_providers"` Providers map[string]map[string]string `json:"providers"` }
var Auth *AuthConfig
type ConfigFile ¶
type ConfigFile struct { APP_ENV string `json:"app_env"` APP_KEY string `json:"app_key"` APP_TOKEN_KEY string `json:"app_token_key,omitempty"` APP_PORT string `json:"app_port"` APP_THEME string `json:"app_theme,omitempty"` DB_DSN string `json:"db_dsn"` COOKIE_UUID string `json:"cookie_uuid,omitempty"` SHOW_TETUA_BLOCK bool `json:"show_tetua_block,omitempty"` DB_QUERY_LOGGING bool `json:"db_query_logging"` STORAGES *fs.StorageConfig `json:"storage,omitempty"` Mail *MailConfig `json:"mail,omitempty"` Auth *AuthConfig `json:"auth,omitempty"` }
type MailConfig ¶
type MailConfig struct { Sender string `json:"sender"` Smtp *SmtpConfig `json:"smtp"` }
var Mail *MailConfig
type SettingItem ¶
type SettingItem struct { Name string `json:"name" form:"name"` Value string `json:"value" form:"value"` Type string `json:"type" form:"type"` }
func AllSettings ¶
func AllSettings() []*SettingItem
type SettingsMutation ¶
type SettingsMutation struct {
Settings []*SettingItem `json:"settings,omitempty" form:"settings"`
}
Click to show internal directories.
Click to hide internal directories.