Documentation
¶
Index ¶
- type Config
- type Database
- func (d *Database) Close() error
- func (d *Database) Del(ctx context.Context, key string) error
- func (d *Database) DelAll(ctx context.Context) error
- func (d *Database) Exists(ctx context.Context, key string) (bool, error)
- func (d *Database) Get(ctx context.Context, key string) ([]byte, bool, error)
- func (d *Database) MultiDel(ctx context.Context, keys []string) error
- func (d *Database) MultiGet(ctx context.Context, keys []string) (map[string][]byte, error)
- func (d *Database) MultiSet(ctx context.Context, valMap map[string][]byte) error
- func (d *Database) MultiSetWithTTL(ctx context.Context, valMap map[string][]byte, expiration time.Duration) error
- func (d *Database) Set(ctx context.Context, key string, val []byte) error
- func (d *Database) SetWithTTL(ctx context.Context, key string, val []byte, expiration time.Duration) error
- func (d *Database) Sync() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabaseWithBadger ¶
func NewDatabaseWithBadger(db *badger.DB) *Database
func NewDatabaseWithOptions ¶
func (*Database) MultiSetWithTTL ¶
func (*Database) SetWithTTL ¶
Click to show internal directories.
Click to hide internal directories.