driver

package
v0.0.0-...-5528672 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Datafile string
}

Database type

func NewDatabase

func NewDatabase(datafile string) *Database

NewDatabase gets a new database object

func (*Database) DeleteByKey

func (d *Database) DeleteByKey(key string) error

DeleteByKey deletes a record by a key

func (*Database) FindAll

func (d *Database) FindAll() ([]model.Cluster, error)

FindAll get all records

func (*Database) FindByKey

func (d *Database) FindByKey(key string) (*model.Cluster, error)

FindByKey gets the value by key

func (*Database) Insert

func (d *Database) Insert(key, value string) error

Insert adds a record to database

func (*Database) Migrate

func (d *Database) Migrate() error

Migrate creates the database

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL