Documentation ¶
Index ¶
- Variables
- func Register(name string, provider Provider) error
- type DSN
- func (dsn DSN) GetBool(key string) bool
- func (dsn DSN) GetFloat(key string) float64
- func (dsn DSN) GetInt(key string) int
- func (dsn DSN) GetInt64(key string) int64
- func (dsn DSN) GetString(key string) string
- func (dsn DSN) Hostname() string
- func (dsn DSN) Password() string
- func (dsn DSN) Path() string
- func (dsn DSN) Port() string
- func (dsn DSN) Scheme() string
- func (dsn DSN) Username() string
- type Entry
- type Provider
- type ScanOpts
- type Scanner
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDriverAlreadyExists = errors.New("the specified driver name is already exisrs") ErrDriverNotFound = errors.New("the requested driver isn't found") ErrKeyExpired = errors.New("the specified key is expired") ErrKeyNotFound = errors.New("the specified key couldn't be found") )
error related variables
Functions ¶
Types ¶
type DSN ¶ added in v1.6.0
type DSN struct {
// contains filtered or unexported fields
}
DSN data source name
type Provider ¶
type Provider interface { Open(*DSN) (Provider, error) Put(*Entry) error Get([]byte) ([]byte, error) TTL([]byte) (*time.Time, error) Delete([]byte) error Batch([]*Entry) error Scan(ScanOpts) error Close() error }
Provider an interface describes a storage backend
Click to show internal directories.
Click to hide internal directories.