Documentation
¶
Index ¶
- Variables
- type DBMapOf
- func (c DBMapOf) Delete(ctx context.Context, key []byte) error
- func (c DBMapOf) DeleteAll(ctx context.Context)
- func (c DBMapOf) ExpireAll(ctx context.Context)
- func (c DBMapOf) Len() int
- func (c DBMapOf) Read(ctx context.Context, key []byte) (val V, _ error)
- func (c DBMapOf) Write(ctx context.Context, k []byte, v V) error
- type RecordOf
- type RecordOfByte
- type UnixTime
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrations embed.FS
Migrations provide database migrations.
Functions ¶
This section is empty.
Types ¶
type DBMapOf ¶ added in v0.0.19
type DBMapOf[V any] struct { // contains filtered or unexported fields }
DBMapOf is an in-memory cache backend. Please use NewDBMapOf to create it.
func NewDBMapOf ¶ added in v0.0.19
NewDBMapOf creates an instance of in-memory cache with optional configuration.
func (DBMapOf) Delete ¶ added in v0.0.19
Delete removes value by the key.
It fails with ErrNotFound if key does not exist.
func (DBMapOf) ExpireAll ¶ added in v0.0.19
ExpireAll marks all entries as expired, they can still serve stale cache.
func (DBMapOf) Len ¶ added in v0.0.19
func (c DBMapOf) Len() int
Len returns number of elements in cache.
type RecordOfByte ¶ added in v0.0.19
type RecordOfByte struct {
Val []byte `db:"val" json:"val,omizero" title:"Value"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.