Documentation ¶
Index ¶
- type DB
- func (d *DB) Close() error
- func (d *DB) Get(ctx context.Context, key string) ([]byte, error)
- func (d *DB) GetKeys(ctx context.Context, prefix string) ([]string, error)
- func (d *DB) NewTransaction(ctx context.Context, update bool) (database.Transaction, context.Context, error)
- func (d *DB) Set(ctx context.Context, key string, value []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB implements the database.DB interface for server persistence.
func (*DB) Get ¶
Get finds the value corresponding to the key and returns it or an error. If the key doesn't exist an error is returned.
func (*DB) NewTransaction ¶
func (d *DB) NewTransaction(ctx context.Context, update bool) (database.Transaction, context.Context, error)
NewTransaction starts a new transaction and returns a context that contains it. If the context is passed to other functions in this DB the transaction will be used for executing the operation.
Click to show internal directories.
Click to hide internal directories.