db

package
v0.38.124 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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 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 GetAllComponentWithSelectors added in v0.38.114

func GetAllComponentWithSelectors() (components pkg.Components, err error)

Get all the components from table which has not null selectors

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 GetComponensWithFieldSelector added in v0.38.114

func GetComponensWithFieldSelector(fieldSelector string) (components pkg.Components, err error)

func GetComponensWithLabelSelector added in v0.38.114

func GetComponensWithLabelSelector(labelSelector string) (components pkg.Components, err error)

func GetComponensWithSelectors added in v0.38.114

func GetComponensWithSelectors(resourceSelectors v1.ResourceSelectors) (components pkg.Components, err error)

func GetComponentRelationships added in v0.38.114

func GetComponentRelationships(relationshipID uuid.UUID, components pkg.Components) (relationships []*pkg.ComponentRelationship, err error)

func GetDB

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

func GetLabelsFromSelector added in v0.38.114

func GetLabelsFromSelector(selector string) (matchLabels map[string]string)

func GetSelectorID added in v0.38.114

func GetSelectorID(selectors v1.ResourceSelectors) string

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 PersisComponentRelationships added in v0.38.114

func PersisComponentRelationships(relationships []*pkg.ComponentRelationship) 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 PersistComponentRelationship added in v0.38.114

func PersistComponentRelationship(relationship *pkg.ComponentRelationship) 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