Documentation ¶
Index ¶
- Constants
- func Execute(fn func(*DB) error) error
- type DB
- func (db *DB) AddTemplate(tplExec *template.TemplateExecution) error
- func (db *DB) Close()
- func (db *DB) DeleteBucket(name string) error
- func (db *DB) DeleteTemplate(id string) 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) GetIntValue(key string) (int, error)
- func (db *DB) GetStringValue(key string) (string, error)
- func (db *DB) GetTemplate(id string) (*template.TemplateExecution, error)
- func (db *DB) GetTimeValue(key string) (time.Time, error)
- func (db *DB) ListTemplates() ([]*LoadedTemplate, 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 LoadedTemplate
Constants ¶
View Source
const (
Filename = "awless.db"
)
View Source
const TEMPLATES_BUCKET = "templates"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AddTemplate ¶
func (db *DB) AddTemplate(tplExec *template.TemplateExecution) error
func (*DB) DeleteBucket ¶
DeleteBucket deletes a bucket if it exists
func (*DB) DeleteTemplate ¶ added in v0.0.22
func (*DB) DeleteTemplates ¶
func (*DB) GetConfigs ¶
func (*DB) GetIntValue ¶
GetIntValue gets a int value from database
func (*DB) GetStringValue ¶
GetStringValue gets a string value from database
func (*DB) GetTemplate ¶
func (db *DB) GetTemplate(id string) (*template.TemplateExecution, error)
func (*DB) GetTimeValue ¶
GetTimeValue gets a time value from database
func (*DB) ListTemplates ¶
func (db *DB) ListTemplates() ([]*LoadedTemplate, error)
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 ¶
type LoadedTemplate ¶ added in v0.0.22
type LoadedTemplate struct { Err error TplExec *template.TemplateExecution Key, Raw string }
Click to show internal directories.
Click to hide internal directories.