Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configure{ Node: "root", Data: "data", Web: WebDefault, Database: DatabaseDefault, History: HistoryDefault, Log: LogDefault, }
Config 全局配置
View Source
var DatabaseDefault = Database{ Type: "sqlite", URL: "sqlite3.db", Debug: false, LogLevel: 4, }
View Source
var HistoryDefault = History{ Type: "embed", Options: helper.Options{"data_path": "history"}, }
View Source
var LogDefault = Log{ Text: false, Level: "error", Output: LogOutput{ Filename: "log.txt", }, }
View Source
var WebDefault = Web{ Addr: ":8080", Debug: false, Compress: true, }
Functions ¶
Types ¶
type Configure ¶
type Configure struct { Node string `yaml:"node"` Data string `yaml:"data"` Web Web `yaml:"web"` Database Database `yaml:"database"` History History `yaml:"history"` Log Log `yaml:"log"` }
Configure 配置
type Database ¶ added in v1.1.0
type Database struct { Type string `yaml:"type"` URL string `yaml:"url"` Debug bool `yaml:"debug"` LogLevel int `json:"log_level"` }
Database 参数
type Log ¶ added in v1.1.0
type Log struct { Text bool `yaml:"text"` Format string `yaml:"format,omitempty"` Level string `yaml:"level"` Output LogOutput `yaml:"output"` }
Log 参数
Click to show internal directories.
Click to hide internal directories.