benchmark

package
v0.0.0-...-3e974fb Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Wrappers = make(map[string]Wrapper)

Functions

func RegisterWrapper

func RegisterWrapper(name string, wrapper Wrapper)

RegisterWrapper registers a wrapper

Types

type ConnectOpts

type ConnectOpts struct {
	DB       string
	Table    string
	Username string
	Password string
	Host     string
}

ConnectOpts represents the options used to connect to a generic database

type Document

type Document struct {
	ID    string
	Value string
}

Document represents a key value document

type Wrapper

type Wrapper interface {
	Connect(opts ConnectOpts)

	Get(id string) Document
	GetAll() []Document

	Update(doc Document)
	Put(doc Document)

	Clear()
}

Wrapper represents a database query wrapper

Jump to

Keyboard shortcuts

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