mockdb

package
v0.0.0-...-65a39b8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDB

type MockDB struct {
	*miniredis.Miniredis
}

MockDB is a wrapper over the miniredis server.

func NewMiniRedis

func NewMiniRedis() *MockDB

NewMiniRedis returns a miniredis server.

func (*MockDB) DecrementCounter

func (s *MockDB) DecrementCounter()

DecrementCounter decrements the counter by one.

func (*MockDB) IncrementCounter

func (s *MockDB) IncrementCounter()

IncrementCounter increments the counter by one.

func (*MockDB) InitCounter

func (s *MockDB) InitCounter()

InitCounter sets the `counter` key to zero.

func (*MockDB) ReadCounter

func (s *MockDB) ReadCounter() int64

ReadCounter returns the current contents of the counter in the database.

Jump to

Keyboard shortcuts

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