Version: v0.0.0-...-57f36d7 Latest Latest

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

Go to latest
Published: Apr 26, 2017 License: Apache-2.0 Imports: 10 Imported by: 0




This section is empty.


This section is empty.


func New

func New(url *url.URL) (models.Datastore, error)

New creates a new MySQL Datastore.


type MySQLDatastore

type MySQLDatastore struct {
	// contains filtered or unexported fields

MySQLDatastore defines a basic MySQL Datastore struct.

func (*MySQLDatastore) Get

func (ds *MySQLDatastore) Get(ctx context.Context, key []byte) ([]byte, error)

Get retrieves the value of a specific extra from MySQL.

func (*MySQLDatastore) GetApp

func (ds *MySQLDatastore) GetApp(ctx context.Context, name string) (*models.App, error)

GetApp retrieves an app from MySQL.

func (*MySQLDatastore) GetApps

func (ds *MySQLDatastore) GetApps(ctx context.Context, filter *models.AppFilter) ([]*models.App, error)

GetApps retrieves an array of apps according to a specific filter.

func (*MySQLDatastore) GetRoute

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

GetRoute retrieves a route from MySQL.

func (*MySQLDatastore) GetRoutes

func (ds *MySQLDatastore) GetRoutes(ctx context.Context, filter *models.RouteFilter) ([]*models.Route, error)

GetRoutes retrieves an array of routes according to a specific filter.

func (*MySQLDatastore) GetRoutesByApp

func (ds *MySQLDatastore) GetRoutesByApp(ctx context.Context, appName string, filter *models.RouteFilter) ([]*models.Route, error)

GetRoutesByApp retrieves a route with a specific app name.

func (*MySQLDatastore) InsertApp

func (ds *MySQLDatastore) InsertApp(ctx context.Context, app *models.App) (*models.App, error)

InsertApp inserts an app to MySQL.

func (*MySQLDatastore) InsertRoute

func (ds *MySQLDatastore) InsertRoute(ctx context.Context, route *models.Route) (*models.Route, error)

InsertRoute inserts an route to MySQL.

func (*MySQLDatastore) Put

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

Put inserts an extra into MySQL.

func (*MySQLDatastore) RemoveApp

func (ds *MySQLDatastore) RemoveApp(ctx context.Context, appName string) error

RemoveApp removes an existing app on MySQL.

func (*MySQLDatastore) RemoveRoute

func (ds *MySQLDatastore) RemoveRoute(ctx context.Context, appName, routePath string) error

RemoveRoute removes an existing route on MySQL.

func (*MySQLDatastore) Tx

func (ds *MySQLDatastore) Tx(f func(*sql.Tx) error) error

Tx Begins and commits a MySQL Transaction.

func (*MySQLDatastore) UpdateApp

func (ds *MySQLDatastore) UpdateApp(ctx context.Context, newapp *models.App) (*models.App, error)

UpdateApp updates an existing app on MySQL.

func (*MySQLDatastore) UpdateRoute

func (ds *MySQLDatastore) UpdateRoute(ctx context.Context, newroute *models.Route) (*models.Route, error)

UpdateRoute updates an existing route on MySQL.

Source Files

Jump to

Keyboard shortcuts

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