Documentation ¶
Index ¶
- func New(url *url.URL) (models.Datastore, error)
- type MySQLDatastore
- func (ds *MySQLDatastore) Get(ctx context.Context, key []byte) ([]byte, error)
- func (ds *MySQLDatastore) GetApp(ctx context.Context, name string) (*models.App, error)
- func (ds *MySQLDatastore) GetApps(ctx context.Context, filter *models.AppFilter) ([]*models.App, error)
- func (ds *MySQLDatastore) GetRoute(ctx context.Context, appName, routePath string) (*models.Route, error)
- func (ds *MySQLDatastore) GetRoutes(ctx context.Context, filter *models.RouteFilter) ([]*models.Route, error)
- func (ds *MySQLDatastore) GetRoutesByApp(ctx context.Context, appName string, filter *models.RouteFilter) ([]*models.Route, error)
- func (ds *MySQLDatastore) InsertApp(ctx context.Context, app *models.App) (*models.App, error)
- func (ds *MySQLDatastore) InsertRoute(ctx context.Context, route *models.Route) (*models.Route, error)
- func (ds *MySQLDatastore) Put(ctx context.Context, key, value []byte) error
- func (ds *MySQLDatastore) RemoveApp(ctx context.Context, appName string) error
- func (ds *MySQLDatastore) RemoveRoute(ctx context.Context, appName, routePath string) error
- func (ds *MySQLDatastore) Tx(f func(*sql.Tx) error) error
- func (ds *MySQLDatastore) UpdateApp(ctx context.Context, newapp *models.App) (*models.App, error)
- func (ds *MySQLDatastore) UpdateRoute(ctx context.Context, newroute *models.Route) (*models.Route, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MySQLDatastore ¶
type MySQLDatastore struct {
// contains filtered or unexported fields
}
MySQLDatastore defines a basic MySQL Datastore struct.
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) 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) UpdateRoute ¶
func (ds *MySQLDatastore) UpdateRoute(ctx context.Context, newroute *models.Route) (*models.Route, error)
UpdateRoute updates an existing route on MySQL.
Click to show internal directories.
Click to hide internal directories.