Documentation ¶
Index ¶
Constants ¶
View Source
const (
EnvSecret = "MEMO_SECRET"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheTarget ¶ added in v0.8.0
CacheTarget : data structure handling search payload cache
type Codec ¶
type Codec interface { // Marshal encodes a Memo to a slice of bytes. Marshal(v any) ([]byte, error) // Unmarshal decodes a slice of bytes into a Memo. Unmarshal(data []byte, v any) error }
Codec encodes/decodes Memo to/from slices of bytes.
type DefaultCodec ¶ added in v0.6.0
type DefaultCodec struct{}
DefaultCodec encodes/decodes Memo to/from gob. You can use encoding.Gob instead of creating an instance of this struct.
type IndexedStore ¶ added in v0.8.0
type Store ¶
type Store interface { // Create creates a new Memo. Create(v *Memo) (uint64, error) Update(k uint64, v *Memo) error // Get retrieves the value for the given key. Get(k uint64, v *Memo) (bool, error) // Delete deletes the stored value for the given key. Delete(k uint64) (bool, error) // Count counts stored items Count() (int, error) // ForEach iterate over all keys. ForEach(fn func(k uint64, v *Memo) error) error // Close must be called when the work with the key-value store is done. Close() error }
Store is an abstraction for different Memo store implementations.
Click to show internal directories.
Click to hide internal directories.