backends

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2018 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientAlreadyExists = errors.New("client already exists")
)

Functions

func Register added in v0.7.0

func Register(name string, p int, f NewClientFunc) error

Types

type BackupConfig added in v0.7.0

type BackupConfig struct {
	DirPath     string
	AutoEnabled bool `toml:"auto"`
	MaxFiles    int  `toml:"max"`
}

type Client added in v0.3.0

type Client interface {
	Load() (data []byte, err error)
	Save(data []byte) error
	Backup() error
	SafeLocation() string
	IsWritable() bool
	SetWritable(writable bool) error
	Lock() error
	Unlock() error
}

func New added in v0.3.0

func New(config *Config) (Client, error)

func NewWithType added in v0.7.0

func NewWithType(t string, config *Config) (Client, error)

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 NewClientFunc added in v0.7.0

type NewClientFunc func(c *Config) (Client, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL