db

package
v0.38.109 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectionString string
View Source
var DefaultExpiryDays int
View Source
var Gorm *gorm.DB
View Source
var Trace bool

Functions

func Cleanup

func Cleanup()

func ConvertNamedParams added in v0.38.85

func ConvertNamedParams(sql string, namedArgs map[string]interface{}) (string, []interface{})

func CreateCanary added in v0.38.85

func CreateCanary(canary *pkg.Canary) error

func CreateCheck added in v0.38.85

func CreateCheck(canary pkg.Canary, check *pkg.Check) error

func DeleteCanary added in v0.38.85

func DeleteCanary(canary v1.Canary) error

func DeleteComponnent added in v0.38.106

func DeleteComponnent(systemID string, deleteTime time.Time) error

func DeleteSystem added in v0.38.106

func DeleteSystem(systemTemplateID string, deleteTime time.Time) (string, error)

func DeleteSystemTemplate added in v0.38.106

func DeleteSystemTemplate(systemTemplate *v1.SystemTemplate) error

func FindCanary added in v0.38.85

func FindCanary(namespace, name string) (*pkg.Canary, error)

func FindCheck added in v0.38.85

func FindCheck(canary pkg.Canary, name string) (*pkg.Check, error)

func GetAllCanaries added in v0.38.85

func GetAllCanaries() ([]v1.Canary, error)

func GetAllChecks added in v0.38.85

func GetAllChecks() ([]pkg.Check, error)

func GetAllSystemTemplates added in v0.38.106

func GetAllSystemTemplates() ([]v1.SystemTemplate, error)

func GetCanary added in v0.38.85

func GetCanary(id string) (*pkg.Canary, error)

func GetCheck added in v0.38.85

func GetCheck(id string) (*pkg.Check, error)

func GetDB

func GetDB() (*sql.DB, error)

func Init

func Init() error

func IsConfigured added in v0.38.85

func IsConfigured() bool

func IsConnected added in v0.38.85

func IsConnected() bool

func Migrate

func Migrate() error

func PersistCanary added in v0.38.85

func PersistCanary(canary v1.Canary, source string) (string, bool, error)

func PersistCheck added in v0.38.85

func PersistCheck(check pkg.Check) (string, error)

func PersistComponent added in v0.38.85

func PersistComponent(component *pkg.Component) (string, error)

func PersistSystem added in v0.38.106

func PersistSystem(system *pkg.System) error

func PersistSystemTemplate added in v0.38.106

func PersistSystemTemplate(system *v1.SystemTemplate) (string, bool, error)

func PersistSystems added in v0.38.106

func PersistSystems(results []*pkg.System) error

func QueryNamed added in v0.38.85

func QueryNamed(ctx context.Context, sql string, args map[string]interface{}) (pgx.Rows, error)

func Start added in v0.38.85

func Start(ctx context.Context) error

func StopServer added in v0.38.83

func StopServer() error

Types

This section is empty.

Directories

Path Synopsis
nolint
nolint

Jump to

Keyboard shortcuts

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