datastore

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

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

Go to latest
Published: Dec 14, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dbURL string) (models.Datastore, error)

Types

type Mock

type Mock struct {
	Apps   []*models.App
	Routes []*models.Route
}

func NewMock

func NewMock(apps []*models.App, routes []*models.Route) *Mock

func (*Mock) Get

func (m *Mock) Get(ctx context.Context, key []byte) ([]byte, error)

func (*Mock) GetApp

func (m *Mock) GetApp(ctx context.Context, appName string) (app *models.App, err error)

func (*Mock) GetApps

func (m *Mock) GetApps(ctx context.Context, appFilter *models.AppFilter) ([]*models.App, error)

func (*Mock) GetRoute

func (m *Mock) GetRoute(ctx context.Context, appName, routePath string) (*models.Route, error)

func (*Mock) GetRoutes

func (m *Mock) GetRoutes(ctx context.Context, routeFilter *models.RouteFilter) (routes []*models.Route, err error)

func (*Mock) GetRoutesByApp

func (m *Mock) GetRoutesByApp(ctx context.Context, appName string, routeFilter *models.RouteFilter) (routes []*models.Route, err error)

func (*Mock) InsertApp

func (m *Mock) InsertApp(ctx context.Context, app *models.App) (*models.App, error)

func (*Mock) InsertRoute

func (m *Mock) InsertRoute(ctx context.Context, route *models.Route) (*models.Route, error)

func (*Mock) Put

func (m *Mock) Put(ctx context.Context, key, value []byte) error

func (*Mock) RemoveApp

func (m *Mock) RemoveApp(ctx context.Context, appName string) error

func (*Mock) RemoveRoute

func (m *Mock) RemoveRoute(ctx context.Context, appName, routePath string) error

func (*Mock) UpdateApp

func (m *Mock) UpdateApp(ctx context.Context, app *models.App) (*models.App, error)

func (*Mock) UpdateRoute

func (m *Mock) UpdateRoute(ctx context.Context, route *models.Route) (*models.Route, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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