postgres

package
v0.0.0-...-58c3220 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ModelRouteTable = "odahu_operator_route"

	ClID          = "id"
	ClSpec        = "spec"
	ClStatus      = "status"
	ClDelMark     = "deletionmark"
	ClCreated     = "created"
	ClUpdated     = "updated"
	ClIsDefault   = "is_default"
	ClFirstMDName = "spec->'modelDeployments'->0->>'mdName'"
)

Variables

View Source
var (
	MaxSize   = 500
	FirstPage = 0
)

Functions

This section is empty.

Types

type RouteRepo

type RouteRepo struct {
	DB *sql.DB
}

func (RouteRepo) BeginTransaction

func (repo RouteRepo) BeginTransaction(ctx context.Context) (*sql.Tx, error)

func (RouteRepo) DefaultExists

func (repo RouteRepo) DefaultExists(ctx context.Context, mdID string, tx *sql.Tx) (bool, error)

Check whether the default ModelRoute for ModelDeployment with id=mdID is existed

func (RouteRepo) DeleteModelRoute

func (repo RouteRepo) DeleteModelRoute(ctx context.Context, tx *sql.Tx, id string) error

func (RouteRepo) GetModelRoute

func (repo RouteRepo) GetModelRoute(
	ctx context.Context, tx *sql.Tx, id string) (*route.ModelRoute, error)

func (RouteRepo) GetModelRouteList

func (repo RouteRepo) GetModelRouteList(
	ctx context.Context, tx *sql.Tx, options ...filter.ListOption) ([]route.ModelRoute, error)

func (RouteRepo) IsDefault

func (repo RouteRepo) IsDefault(ctx context.Context, id string, tx *sql.Tx) (bool, error)

Check whether the the route is default route

func (RouteRepo) SaveModelRoute

func (repo RouteRepo) SaveModelRoute(
	ctx context.Context, tx *sql.Tx, md *route.ModelRoute) error

func (RouteRepo) SetDeletionMark

func (repo RouteRepo) SetDeletionMark(ctx context.Context, tx *sql.Tx, id string, value bool) error

func (RouteRepo) UpdateModelRoute

func (repo RouteRepo) UpdateModelRoute(
	ctx context.Context, tx *sql.Tx, md *route.ModelRoute) error

func (RouteRepo) UpdateModelRouteStatus

func (repo RouteRepo) UpdateModelRouteStatus(
	ctx context.Context, tx *sql.Tx, id string, s v1alpha1.ModelRouteStatus) error

Jump to

Keyboard shortcuts

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