Documentation
¶
Index ¶
- Variables
- type Bucket
- func (b Bucket) Bucket(bucket ...string) *Bucket
- func (b *Bucket) DecodeValue(c encoding.ValueCoder, data []byte) error
- func (b Bucket) Delete(k string) error
- func (b Bucket) EncodeValue(c encoding.ValueCoder) ([]byte, error)
- func (b Bucket) Encoding() encoding.Coder
- func (b Bucket) Exists(k string) bool
- func (b Bucket) Get(k string, v any) error
- func (b Bucket) Iter(ctx context.Context, pfx string) types.Iterator[string, []byte]
- func (b Bucket) Keys() ([]string, error)
- func (b Bucket) Len() (int, error)
- func (b Bucket) Prefix() string
- func (b Bucket) PrintDebug() error
- func (b Bucket) Set(k string, v any, op ...Option) error
- func (b Bucket) Tx(fn func(tx Transactioner) error) error
- func (b Bucket) Values() ([][]byte, error)
- func (b Bucket) Watch(ctx context.Context, k string) types.Watcher[string, []byte]
- type Bucketer
- type Connection
- type Deleter
- type Getter
- type Iterator
- type Logger
- type Option
- type Setter
- type Transactioner
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("obj not found")
)
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
func NewBucket ¶
func NewBucket(conn Connection, keys ...string) *Bucket
func (*Bucket) DecodeValue ¶
func (b *Bucket) DecodeValue(c encoding.ValueCoder, data []byte) error
func (Bucket) EncodeValue ¶
func (b Bucket) EncodeValue(c encoding.ValueCoder) ([]byte, error)
func (Bucket) PrintDebug ¶
type Bucketer ¶
type Bucketer interface {
Getter
Setter
Deleter
Watcher
Iterator
Transactioner
Prefix() string
Bucket(bucket ...string) *Bucket
Encoding() encoding.Coder
Tx(fn func(tx Transactioner) error) error
Len() (int, error)
Keys() ([]string, error)
PrintDebug() error
// Returns Raw unmarshaled bytes. Recomended to use with helpers.Values[T]
Values() ([][]byte, error)
}
type Connection ¶
type Connection interface {
Getter
Setter
Deleter
Watcher
Iterator
Transactioner
// Close connection
Close()
Bucket(bucket ...string) *Bucket
Encoding() encoding.Coder
Tx(pfx string, fn func(tx Transactioner) error) error
Len(pfx string) (int, error)
Keys(pfx string) ([]string, error)
PrintDebug(pfx string) error
// Returns Raw unmarshaled bytes. Recomended to use with helpers.Values[T]
Values(pfx string) ([][]byte, error)
}
type Transactioner ¶
Click to show internal directories.
Click to hide internal directories.