database

package
v0.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 0 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 {
	// contains filtered or unexported fields
}

A Database is a key-value store

func NewDatabase

func NewDatabase() *Database

NewDatabase returns an initialized Database

func (*Database) Delete

func (d *Database) Delete(key string)

Delete removes a key and value from the store

func (*Database) Get

func (d *Database) Get(key string) string

Get retreives the value for a key (empty string if key does not exist)

func (*Database) Set

func (d *Database) Set(key string, value string)

Set assigns a value to a key

Jump to

Keyboard shortcuts

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