Documentation
¶
Overview ¶
Package kv implement key-value storage base on postgresql
Index ¶
- type KV
- func (k *KV) Count(ctx context.Context) (int64, error)
- func (k *KV) Create(ctx context.Context, entity google.Message) (google.Message, error)
- func (k *KV) Delete(ctx context.Context, id string) error
- func (k *KV) Exists(ctx context.Context, id string) (bool, error)
- func (k *KV) Get(ctx context.Context, id string) (google.Message, error)
- func (k *KV) GetAll(ctx context.Context) ([]google.Message, error)
- func (k *KV) Update(ctx context.Context, id string, entity google.Message) (google.Message, error)
- type KeyValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
KV is a key-value storage.
type KeyValue ¶
type KeyValue interface {
Create(ctx context.Context, entity google.Message) (google.Message, error)
Get(ctx context.Context, id string) (google.Message, error)
GetAll(ctx context.Context) ([]google.Message, error)
Update(ctx context.Context, id string, entity google.Message) (google.Message, error)
Delete(ctx context.Context, id string) error
Exists(ctx context.Context, id string) (bool, error)
Count(ctx context.Context) (int64, error)
}
KeyValue is an interface for key-value storage.
Click to show internal directories.
Click to hide internal directories.