sqldb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model ...

func (*Model) Add

func (m *Model) Add(ctx context.Context, model app.ModelData) (int64, error)

Add inserts model metadata

func (*Model) ChangeLabel

func (m *Model) ChangeLabel(ctx context.Context, model app.ModelData) error

func (*Model) Delete

func (m *Model) Delete(ctx context.Context, id int64) error

Delete deletes model metadata

func (*Model) Get

func (m *Model) Get(ctx context.Context, parameters app.QueryParameters) (*app.ModelData, error)

Get gets single model metadata

func (*Model) IsStatusPending

func (m *Model) IsStatusPending(ctx context.Context, servableID app.ServableID) (bool, error)

IsStatusPending checks if status is set to pending

func (*Model) List

func (m *Model) List(ctx context.Context, parameters app.QueryParameters) ([]*app.ModelData, error)

List lists models metadata

func (*Model) ListUniqueTeamProject

func (m *Model) ListUniqueTeamProject(ctx context.Context) ([]*app.ServableID, error)

ListUniqueTeamProject lists distinct keys (team, project)

func (*Model) NextVersion

func (m *Model) NextVersion(ctx context.Context, parameters app.QueryParameters) (int64, error)

NextVersion returns next available model version

func (*Model) RemoveLabel

func (m *Model) RemoveLabel(ctx context.Context, model app.ModelData) error

RemoveLabel removes model label from metadata for given ModelData

func (*Model) UpdateStatus

func (m *Model) UpdateStatus(ctx context.Context, id int64, status string) error

UpdateStatus updates model status

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module ...

func (*Module) Add

func (m *Module) Add(ctx context.Context, module app.ModuleData) (int64, error)

Add inserts module metadata

func (*Module) Delete

func (m *Module) Delete(ctx context.Context, id int64) error

Delete deletes module metadata

func (*Module) Get

func (m *Module) Get(ctx context.Context, parameters app.QueryParameters) (*app.ModuleData, error)

Get gets single module metadata

func (*Module) List

func (m *Module) List(ctx context.Context, parameters app.QueryParameters) ([]*app.ModuleData, error)

List modules metadata

func (*Module) ListUniqueTeamProject

func (m *Module) ListUniqueTeamProject(ctx context.Context) ([]*app.ServableID, error)

ListUniqueTeamProject lists distinct keys (team, project)

func (*Module) NextVersion

func (m *Module) NextVersion(ctx context.Context, parameters app.QueryParameters) (int64, error)

NextVersion returns next available module version

type SQLDB

type SQLDB struct {
	Model  *Model
	Module *Module
	// contains filtered or unexported fields
}

SQLDB ...

func NewSQLDB

func NewSQLDB(ctx context.Context, driver, dsn string) (*SQLDB, error)

NewSQLDB ...

func (*SQLDB) Close

func (s *SQLDB) Close(ctx context.Context) (err error)

Close closes the connection

Jump to

Keyboard shortcuts

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