{"modulePath":"github.com/cppfuns/go-admin","version":"v0.0.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Functions\n\n```go\nfunc Set(cfg Config)\n```\nSet sets the config.\n\n## Types\n\n```go\ntype Config struct {\n\t// An array supports multi database connection. The first\n\t// element of DATABASE is the default connection. See the\n\t// file connection.go.\n\tDATABASE []Database\n\n\t// The cookie domain used in the auth modules. see\n\t// the session.go.\n\tDOMAIN string\n\n\t// Used to set as the localize language which show in the\n\t// interface.\n\tLANGUAGE string\n\n\t// The global url prefix.\n\tPREFIX string\n\n\t// The theme name of template.\n\tTHEME string\n\n\t// The path where files will be stored into.\n\tSTORE Store\n\n\t// The title of web page.\n\tTITLE string\n\n\t// Logo is the top text in the sidebar.\n\tLOGO template.HTML\n\n\t// Mini-logo is the top text in the sidebar when folding.\n\tMINILOGO template.HTML\n\n\t// The url redirect to after login\n\tINDEX string\n}\n```\nConfig type is the global config of goAdmin. It will be initialized in the engine.\n\n```go\nfunc Get() Config\n```\nGet gets the config.\n\n```go\ntype Database struct {\n\tHOST         string\n\tPORT         string\n\tUSER         string\n\tPWD          string\n\tNAME         string\n\tMAX_IDLE_CON int\n\tMAX_OPEN_CON int\n\tDRIVER       string\n\n\tFILE string\n}\n```\nDatabase 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.\n\n```go\ntype Store struct {\n\tPATH   string\n\tPREFIX string\n}\n```\nStore is the file store config. Path is the local store path. and prefix is the url prefix used to visit it.\n\n","path":"github.com/cppfuns/go-admin/modules/config","name":"config","synopsis":"","isRedistributable":true}
