store

package
v0.0.0-...-cb04537 Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PetNotFound      = errors.New("can not find pet")
	ProviderNotFound = errors.New("can not find provider")
)

Functions

func AddProvider

func AddProvider(name string, provider Provider)

Types

type PetStore

type PetStore interface {
	AddPet(name string, race string, mod string) (int, error)
	GetPet(id int) (data.Pet, error)
	GetAllPets() ([]data.Pet, error)
	DeletePet(id int) error
	UpdatePet(id int, name string, race string, mod string) (bool, error)
	Open() error
	Close() error
	IsReady() error
}

func GetStoreFromProvider

func GetStoreFromProvider(cfg config.CfgData) (PetStore, error)

type Provider

type Provider func(cfg config.CfgData) PetStore

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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