Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConfigTypeFile = "file" ConfigTypeMock = "mock" )
Variables ¶
This section is empty.
Functions ¶
func NewMockBackend ¶ added in v0.3.0
func NewMockBackend() *mockBackend
Types ¶
type Config ¶ added in v0.3.0
type Config struct { Type string `toml:"type"` Backup backupConfig `toml:"backup"` Settings map[string]interface{} `toml:"settings"` }
func NewDefaultConfig ¶ added in v0.3.0
func NewDefaultConfig() Config
type DiskBackend ¶
type DiskBackend struct {
// contains filtered or unexported fields
}
func NewDiskBackend ¶
func NewDiskBackend(config Config) (*DiskBackend, error)
func (*DiskBackend) Backup ¶ added in v0.3.0
func (db *DiskBackend) Backup() error
func (*DiskBackend) Load ¶
func (db *DiskBackend) Load() ([]byte, error)
func (*DiskBackend) Save ¶
func (db *DiskBackend) Save(data []byte) error
Click to show internal directories.
Click to hide internal directories.