Documentation ¶
Index ¶
- Constants
- type DB
- func (db *DB) AddHistoryCommand(command []string) error
- func (db *DB) AddHistoryCommandWithTime(command []string, time time.Time) error
- func (db *DB) AddLog(msg string) error
- func (db *DB) AddTemplate(templ *template.Template) error
- func (db *DB) Close()
- func (db *DB) DeleteBucket(name string) error
- func (db *DB) DeleteHistory() error
- func (db *DB) DeleteLogs() error
- func (db *DB) DeleteTemplates() error
- func (db *DB) GetBytes(key string) ([]byte, error)
- func (db *DB) GetConfig(configsKey, k string) (interface{}, bool)
- func (db *DB) GetConfigString(configsKey, k string) (string, bool)
- func (db *DB) GetConfigs(key string) (configs, error)
- func (db *DB) GetHistory(fromID int) ([]*line, error)
- func (db *DB) GetIntValue(key string) (int, error)
- func (db *DB) GetLogs() (logs []*Log, err error)
- func (db *DB) GetStringValue(key string) (string, error)
- func (db *DB) GetTemplate(id string) (*template.Template, error)
- func (db *DB) GetTimeValue(key string) (time.Time, error)
- func (db *DB) ListTemplates() ([]*template.Template, error)
- func (db *DB) SetBytes(key string, value []byte) error
- func (db *DB) SetConfig(configsKey, k string, v interface{}) error
- func (db *DB) SetIntValue(key string, value int) error
- func (db *DB) SetStringValue(key, value string) error
- func (db *DB) SetTimeValue(key string, t time.Time) error
- func (db *DB) UnsetConfig(configsKey, k string) error
- type Log
Constants ¶
View Source
const TEMPLATES_BUCKET = "templates"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
A DB stores awless config, logs...
func MustGetCurrent ¶
func MustGetCurrent() (*DB, func())
func (*DB) AddHistoryCommand ¶
AddHistoryCommand adds a command to history in database
func (*DB) AddHistoryCommandWithTime ¶
AddHistoryCommandWithTime adds a command to history in database where time can be set
func (*DB) DeleteBucket ¶
DeleteBucket deletes a bucket if it exists
func (*DB) DeleteHistory ¶
DeleteHistory empties the history from database
func (*DB) DeleteLogs ¶
func (*DB) DeleteTemplates ¶
func (*DB) GetConfigs ¶
func (*DB) GetHistory ¶
GetHistory gets the history from database
func (*DB) GetIntValue ¶
GetIntValue gets a int value from database
func (*DB) GetStringValue ¶
GetStringValue gets a string value from database
func (*DB) GetTimeValue ¶
GetTimeValue gets a time value from database
func (*DB) SetIntValue ¶
SetIntValue sets a int value in database
func (*DB) SetStringValue ¶
SetStringValue sets a string value in database
func (*DB) SetTimeValue ¶
SetTimeValue sets a time value in database
func (*DB) UnsetConfig ¶
Click to show internal directories.
Click to hide internal directories.