Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFromJson ¶ added in v0.0.5
func ReadFromJson(path string)
Types ¶
type Config ¶
type Config struct { // An map supports multi database connection. The first // element of DATABASE is the default connection. See the // file connection.go. DATABASE DatabaseList `json:"database"` // The cookie domain used in the auth modules. see // the session.go. DOMAIN string `json:"domain"` // Used to set as the localize language which show in the // interface. LANGUAGE string `json:"language"` // The global url prefix. PREFIX 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:"minilogo"` // The url redirect to after login INDEX string `json:"index"` // DEBUG mode DEBUG bool `json:"debug"` // Info log path INFOLOG string `json:"infolog"` // Error log path ERRORLOG string `json:"errorlog"` // Access log path ACCESSLOG string `json:"accesslog"` // Sql operator record log switch SQLLOG bool `json:"sqllog"` // Color scheme COLORSCHEME string `json:"colorscheme"` }
Config type is the global config of goAdmin. It will be initialized in the engine.
func (Config) GetIndexUrl ¶ added in v0.0.5
func (Config) PrefixFixSlash ¶ added in v0.0.5
func (Config) UrlRemovePrefix ¶ added in v0.0.5
type Database ¶
type Database struct { HOST string `json:"host"` PORT string `json:"port"` USER string `json:"user"` PWD string `json:"pwd"` NAME string `json:"name"` MAX_IDLE_CON int `json:"max_idle_con"` MAX_OPEN_CON int `json:"max_open_con"` DRIVER string `json:"driver"` FILE string `json:"file"` }
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.
type DatabaseList ¶ added in v0.0.5
func (DatabaseList) Add ¶ added in v0.0.5
func (d DatabaseList) Add(key string, db Database)
func (DatabaseList) GetDefault ¶ added in v0.0.5
func (d DatabaseList) GetDefault() Database
func (DatabaseList) GroupByDriver ¶ added in v0.0.5
func (d DatabaseList) GroupByDriver() map[string]DatabaseList
Click to show internal directories.
Click to hide internal directories.