conf

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComparisonDB added in v0.0.2

type ComparisonDB struct {
	Name                   string
	Type                   string
	ConnectionStringEnvVar string `yaml:"connection_string_env_var"`
}

type ComparisonSQLStatement added in v0.0.2

type ComparisonSQLStatement struct {
	DB   string
	SQL  string
	Name string
}

type ComparisonTarget added in v0.0.2

type ComparisonTarget struct {
	Name          string
	SQLStatements []ComparisonSQLStatement `yaml:"sql_statements"`
}

type ComparisonsConf added in v0.0.2

type ComparisonsConf struct {
	DBs     []ComparisonDB
	Targets []ComparisonTarget
}

type FreshnessConf

type FreshnessConf struct {
	Targets []TableFreshnessCheckerConf
}

type LastUpdateConf

type LastUpdateConf struct {
	Schemas     []string
	Since       time.Duration // default "public"
	TagMappings []LastUpdateTagMappings
}

func (LastUpdateConf) SchemasMap

func (l LastUpdateConf) SchemasMap() map[string]struct{}

type LastUpdateMatch

type LastUpdateMatch string
const (
	IsPrefixMatchType LastUpdateMatch = "is_prefix"
	IsExactMatchType  LastUpdateMatch = "is_exact"
)

type LastUpdateTagMappings

type LastUpdateTagMappings struct {
	Target    string
	MatchType LastUpdateMatch
	Tag       string
}

type StaticConf

type StaticConf struct {
	LastUpdates *LastUpdateConf
	Freshness   *FreshnessConf
	Comparisons *ComparisonsConf
}

func NewFromYaml

func NewFromYaml(data []byte) (*StaticConf, error)

func (*StaticConf) SetDefaults

func (c *StaticConf) SetDefaults()

type TableFreshnessCheckerConf

type TableFreshnessCheckerConf struct {
	Database string
	Schema   string
	Table    string
	Column   string
	Tags     []string
}

Jump to

Keyboard shortcuts

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