data

package
v0.0.0-...-b149654 Latest Latest
Warning

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

Go to latest
Published: May 7, 2017 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kitten

type Kitten struct {
	Id     string
	Name   string
	Weight float32
}

type MemoryStore

type MemoryStore struct {
}

MemoryStore is a simple in memory datastore that implements Store

func (*MemoryStore) Search

func (m *MemoryStore) Search(name string) []Kitten

Search returns a slice of Kitten which have a name matching the name in the parameters

type MockStore

type MockStore struct {
	mock.Mock
}

MockStore is a mock implementation of a datastore for testing purposes

func (*MockStore) Search

func (m *MockStore) Search(name string) []Kitten

Search returns the object which was passed to the mock on setup

type Store

type Store interface {
	Search(name string) []Kitten
}

Store is an interface used for interacting with the backend datastore

Jump to

Keyboard shortcuts

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