database

package
v0.0.0-...-35a33d0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2017 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 Client

type Client struct {
	// contains filtered or unexported fields
}

Client hold information about current database operations

func GetDatabaseClient

func GetDatabaseClient() *Client

GetDatabaseClient returns a open bolt connection and client instance

func (*Client) Close

func (c *Client) Close()

Close ends the current connection

func (*Client) Delete

func (c *Client) Delete(key string) error

Delete the value

func (*Client) DeleteBefore

func (c *Client) DeleteBefore(key string) (err error)

DeleteBefore delete all keys before a specified key in an ordered list

func (*Client) Get

func (c *Client) Get(key string) (result string)

Get returns a value of the provided key in the currently set bucket

func (*Client) GetList

func (c *Client) GetList(count int, direction string) (results []string)

GetList returns the cursor for iterating over all values of a bucket

func (*Client) GetTimeSeriesList

func (c *Client) GetTimeSeriesList(startTime, endTime interface{}) (results []string)

GetTimeSeriesList returns the cursor for iterating over all values of a bucket

func (*Client) Open

func (c *Client) Open(bucket string)

Open the database

func (*Client) Put

func (c *Client) Put(key string, value interface{}) error

Put adds or updates a key pair in the currently set bucket

func (*Client) SetBucket

func (c *Client) SetBucket(bucket string) error

SetBucket sets the current bucket

Jump to

Keyboard shortcuts

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