Version: v0.2.2-0...-c6ee700 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2021 License: GPL-3.0 Imports: 7 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Database

type Database struct {
	// contains filtered or unexported fields

Database is a wrapper around a badger database, providing high level functions to act a kipp entry database.

func Open

func Open(name string) (*Database, error)

Open opens a new badger database.

func (*Database) Close

func (db *Database) Close(context.Context) error

Close closes the database.

func (*Database) Create

func (db *Database) Create(_ context.Context, e database.Entry) error

Create sets the key, slug with the gob encoded value of e.

func (*Database) Lookup

func (db *Database) Lookup(_ context.Context, slug string) (e database.Entry, err error)

Lookup looks up the named entry.

func (*Database) Ping

func (db *Database) Ping(context.Context) error

Ping pings the database.

func (*Database) Remove

func (db *Database) Remove(_ context.Context, slug string) error

Remove removes the key with the given slug.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL