// Database is a type of database connection config.
// Because a little difference of different database driver.
// The Config has multiple options but may be not used.
// Such as the sqlite driver only use the FILE option which
// can be ignored when the driver is mysql.
// If the Dsn is configured, when driver is mysql/postgresql/
// mssql, the other configurations will be ignored, except for
// MaxIdleCon and MaxOpenCon.
// Database configuration
// which is a map where key is the name of the database connection and
// value is the corresponding data configuration.
// The key is the default database is the default database, but also
// the database used by the framework, and you can configure multiple
// databases to be used by your business tables to manage different databases.
type DatabaseList map[string]Database
// Store is the file store config. Path is the local store path.
// and prefix is the url prefix used to visit it.
// Config type is the global config of goAdmin. It will be
// initialized in the engine.
// An map supports multi database connection. The first
// element of Databases is the default connection. See the
Databases DatabaseList `json:"database"`
// The cookie domain used in the auth modules. see
Domain string `json:"domain"`
// Used to set as the localize language which show in the
Language string `json:"language"`
// The global url prefix.
UrlPrefix string `json:"prefix"`
// The theme name of template.
Theme string `json:"theme"`
// The path where files will be stored into.
Store Store `json:"store"`
// The title of web page.
Title string `json:"title"`
// Logo is the top text in the sidebar.
Logo template.HTML `json:"logo"`
// Mini-logo is the top text in the sidebar when folding.
MiniLogo template.HTML `json:"mini_logo"`
// The url redirect to after login
IndexUrl string `json:"index"`
Debug bool `json:"debug"`
// Env is the environment, which maybe local, test, prod.
InfoLogPath string `json:"info_log"`
ErrorLogPath string `json:"error_log"`
AccessLogPath string `json:"access_log"`
// Sql operator record log switch
SqlLog bool `json:"sql_log"`
ColorScheme string `json:"color_scheme"`
// Session life time, unit is second.
SessionLifeTime int `json:"session_life_time"`
AssetUrl string `json:"asset_url"`
// File upload engine, default "local"
FileUploadEngine FileUploadEngine `json:"file_upload_engine"`
// Custom html in the tag head.
CustomHeadHtml template.HTML `json:"custom_head_html"`
// Custom html after body.
CustomFootHtml template.HTML `json:"custom_foot_html"`
LoginTitle string `json:"login_title"`
LoginLogo template.HTML `json:"login_logo"`
AuthUserTable string `json:"auth_user_table",yaml:"auth_user_table",ini:"auth_user_table"`
Extra ExtraInfo `json:"extra",yaml:"extra",ini:"extra"`
Animation PageAnimation `json:"animation",yaml:"animation",ini:"animation"`
// Limit login with different IPs
NoLimitLoginIP bool `json:"no_limit_login_ip",yaml:"no_limit_login_ip",ini:"no_limit_login_ip"`
// When site off is true, website will be closed
SiteOff bool `json:"site_off",yaml:"site_off",ini:"site_off"`
// Hide config center entrance flag
HideConfigCenterEntrance bool `json:"hide_config_center_entrance",yaml:"hide_config_center_entrance",ini:"hide_config_center_entrance"`
// Hide app info entrance flag
HideAppInfoEntrance bool `json:"hide_app_info_entrance",yaml:"hide_app_info_entrance",ini:"hide_app_info_entrance"`
// Update Process Function
UpdateProcessFn UpdateConfigProcessFn `json:"-",yaml:"-",ini:"-"`
// Is open admin plugin json api
OpenAdminApi bool `json:"open_admin_api",yaml:"open_admin_api",ini:"open_admin_api"`
HideVisitorUserCenterEntrance bool `json:"hide_visitor_user_center_entrance",yaml:"hide_visitor_user_center_entrance",ini:"hide_visitor_user_center_entrance"`
Custom404HTML template.HTML `json:"custom_404_html,omitempty",yaml:"custom_404_html",ini:"custom_404_html"`
Custom403HTML template.HTML `json:"custom_403_html,omitempty",yaml:"custom_403_html",ini:"custom_403_html"`
Custom500HTML template.HTML `json:"custom_500_html,omitempty",yaml:"custom_500_html",ini:"custom_500_html"`