Versions in this module Expand all Collapse all v4 v4.7.1 Feb 23, 2023 Changes in this version + type DeleteOption func(d *DeleteOptions) + func DeleteFrom(database, table string) DeleteOption + type DeleteOptions struct + Database string + Table string + type ListOption func(l *ListOptions) + func ListFrom(database, table string) ListOption + func ListLimit(l uint) ListOption + func ListOffset(o uint) ListOption + func ListPrefix(p string) ListOption + func ListSuffix(s string) ListOption + type ListOptions struct + Database string + Limit uint + Offset uint + Prefix string + Suffix string + Table string + type Option func(o *Options) + func Database(db string) Option + func Nodes(a ...string) Option + func Table(t string) Option + func WithClient(c client.Client) Option + func WithContext(c context.Context) Option + type Options struct + Client client.Client + Context context.Context + Database string + Nodes []string + Table string + type ReadOption func(r *ReadOptions) + func ReadFrom(database, table string) ReadOption + func ReadLimit(l uint) ReadOption + func ReadOffset(o uint) ReadOption + func ReadPrefix() ReadOption + func ReadSuffix() ReadOption + type ReadOptions struct + Database string + Limit uint + Offset uint + Prefix bool + Suffix bool + Table string + type Record struct + Expiry time.Duration + Key string + Metadata map[string]interface{} + Value []byte + type Store interface + Close func() error + Delete func(key string, opts ...DeleteOption) error + Init func(...Option) error + List func(opts ...ListOption) ([]string, error) + Options func() Options + Read func(key string, opts ...ReadOption) ([]*Record, error) + String func() string + Write func(r *Record, opts ...WriteOption) error + var DefaultStore Store = NewStore() + var ErrNotFound = errors.New("not found") + func NewMemoryStore(opts ...Option) Store + func NewNoopStore(opts ...Option) Store + func NewStore(opts ...Option) Store + type WriteOption func(w *WriteOptions) + func WriteExpiry(t time.Time) WriteOption + func WriteTTL(d time.Duration) WriteOption + func WriteTo(database, table string) WriteOption + type WriteOptions struct + Database string + Expiry time.Time + TTL time.Duration + Table string