Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("memory: not found")
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Key string `json:"key"`
Value json.RawMessage `json:"value"`
}
type Namespace ¶
type Repository ¶
type Repository interface {
Get(ctx context.Context, ns Namespace, key string) (json.RawMessage, error)
Set(ctx context.Context, ns Namespace, key string, value json.RawMessage) error
Append(ctx context.Context, ns Namespace, key string, value json.RawMessage) error
Delete(ctx context.Context, ns Namespace, key string) error
// List returns all entries whose keys begin with prefix within the
// namespace. An empty prefix matches all keys in the namespace.
List(ctx context.Context, ns Namespace, prefix string) ([]Entry, error)
}
Click to show internal directories.
Click to hide internal directories.