Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configure{ Node: "root", Data: "data", Addr: ":1206", DefaultPassword: "123456", Web: WebDefault, Database: DatabaseDefault, Log: LogDefault, }
Config 全局配置
View Source
var DatabaseDefault = Database{ Type: "sqlite", URL: "sqlite3.db", Debug: false, LogLevel: 4, Sync: true, }
View Source
var LogDefault = Log{ Level: "trace", Text: false, }
View Source
var WebDefault = Web{ Addr: ":8080", Debug: true, Compress: true, }
Functions ¶
Types ¶
type Configure ¶
type Configure struct { Node string `yaml:"node" json:"node"` Data string `yaml:"data" json:"data"` Addr string `yaml:"addr" json:"addr"` DefaultPassword string `yaml:"default_password" json:"default_password"` Web Web `yaml:"web" json:"web"` Database Database `yaml:"database" json:"database"` Log Log `yaml:"log" json:"log"` }
Configure 配置
type Database ¶
type Database struct { Type string `yaml:"type" json:"type"` URL string `yaml:"url" json:"url"` Debug bool `yaml:"debug" json:"debug"` LogLevel int `json:"log_level" json:"log_level"` Sync bool `yaml:"sync" json:"sync"` }
Database 参数
type Log ¶
type Log struct { Level string `yaml:"level" json:"level"` Text bool `yaml:"text" json:"text,omitempty"` Format string `yaml:"format,omitempty" json:"format,omitempty"` Output LogOutput `yaml:"output" json:"output"` }
Log 参数
Click to show internal directories.
Click to hide internal directories.