util

package
v0.3.0-alpha7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeDifferenceTooLarge = errors.New("time difference between master host, and database host are is large. The difference should not exceed 2 seconds")

Functions

func CreateAllTables

func CreateAllTables(db *gorm.DB) error

CreateAllTables migrates all tables

func DatabaseOutOfSync

func DatabaseOutOfSync(c config.StaticConfig, dbTime time.Time) error

DatabaseOutOfSync ensures that drift between database is not larger than DatabaseMaxTimeDriftSeconds

func LoadConfig

func LoadConfig(db *gorm.DB, cnf *config.DynamicConfig) error

func LoadReport

func LoadReport(db *gorm.DB) error

Types

type Store

type Store struct {
	Round        roundrepo.Repo
	Host         hostrepo.Repo
	HostGroup    hostgrouprepo.Repo
	Service      servicerepo.Repo
	ServiceGroup servicegrouprepo.Repo
	Team         teamrepo.Repo
	Check        checkrepo.Repo
	Property     propertyrepo.Repo
	Config       configrepo.Repo
	Report       reportrepo.Repo
	Policy       policyrepo.Repo
	Users        userrepo.Repo
}

Store is a single collection of all Repositories

Jump to

Keyboard shortcuts

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