db

package
v0.38.102 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 30 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 AddSystem added in v0.38.85

func AddSystem(system *pkg.System, cols ...string) (string, error)

func AddSystemSpec added in v0.38.85

func AddSystemSpec(id string, system v1.System) (string, error)

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 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 FindSystem added in v0.38.85

func FindSystem(systemID, systemType string) (*models.System, 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 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 NewComponentModel added in v0.38.85

func NewComponentModel(component *pkg.Component) models.Component

func NewSystemModel added in v0.38.85

func NewSystemModel(system *pkg.System) models.System

func Persist added in v0.38.85

func Persist(results []*pkg.System) 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(systemID string, component *pkg.Component, parent *models.Component) 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