Documentation
¶
Index ¶
- type DB
- func (d *DB) Delete(ctx context.Context, key []byte) error
- func (d *DB) Exists(ctx context.Context, key []byte) (bool, error)
- func (d *DB) Get(ctx context.Context, key []byte) ([]byte, error)
- func (d *DB) GetFromJSON(ctx context.Context, key []byte, dst any) error
- func (d *DB) Keys(ctx context.Context, prefix []byte) ([]string, error)
- func (d *DB) KeysAndValues(ctx context.Context, prefix []byte) (map[string][]byte, error)
- func (d *DB) Name() string
- func (d *DB) Set(ctx context.Context, key []byte, value []byte, expiration time.Duration) error
- func (d *DB) SetJSON(ctx context.Context, key []byte, value any, expiration time.Duration) error
- func (d *DB) Start(_ context.Context) error
- func (d *DB) Stop(_ context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) GetFromJSON ¶
GetFromJSON retrieves a value and unmarshals it into dst
func (*DB) KeysAndValues ¶
KeysAndValues returns all keys and values with the given prefix
Click to show internal directories.
Click to hide internal directories.