Documentation
¶
Index ¶
- Variables
- func Open[T Options](location string, opts ...Option) (database.DB, error)
- type Database
- func (db *Database) BadgerDB() *badger.DB
- func (db *Database) Clear(_ context.Context, logs, errors bool) error
- func (db *Database) Close(_ context.Context) error
- func (db *Database) DeleteErrors(ctx context.Context, prefix string) error
- func (db *Database) DeletePrefix(ctx context.Context, prefix string) error
- func (db *Database) Get(ctx context.Context, prefix string, buf *bytes.Buffer) error
- func (db *Database) LastLog(ctx context.Context) (start, stop time.Time, detail []byte, err error)
- func (db *Database) Log(ctx context.Context, start, stop time.Time, detail []byte) error
- func (db *Database) LogError(ctx context.Context, key string, when time.Time, detail []byte) error
- func (db *Database) Scan(ctx context.Context, path string, ...) error
- func (db *Database) Set(ctx context.Context, prefix string, val []byte, batch bool) error
- func (db *Database) Stream(ctx context.Context, path string, ...) error
- func (db *Database) VisitErrors(ctx context.Context, key string, ...) error
- func (db *Database) VisitLogs(ctx context.Context, start, stop time.Time, ...) error
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ReadOnly = database.ReadOnly[Options]
View Source
var WithTimeout = database.WithTimeout[Options]
Functions ¶
Types ¶
type Database ¶
Database represents a badger database.
func (*Database) DeleteErrors ¶
func (*Database) DeletePrefix ¶
func (*Database) VisitErrors ¶
type Option ¶
Option represents a specific option accepted by Open.
func WithBadgerOptions ¶
func WithBadgerOptions(opts badger.Options) Option
WithBadgerOptions specifies the options to be used when opening the database. Note, that it overrides all other badger specific options when used.
Click to show internal directories.
Click to hide internal directories.