config

package
v0.0.0-...-0060bda Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckingConfig

type CheckingConfig struct {
	FetchPeriod         int `json:"fetch_period" yaml:"fetch_period"`
	RestrictionCheckers int `json:"restriction_checkers" yaml:"restriction_checkers"`
	SelectionCheckers   int `json:"selection_checkers" yaml:"selection_checkers"`
}

CheckingConfig implements configuration for solution checking process

func (*CheckingConfig) Validate

func (c *CheckingConfig) Validate() error

Validate validates solution checking configuration

type Config

type Config struct {
	LoggerConfig        zap.Config              `json:"logger" yaml:"logger"`
	MainDBConfig        OracleConfig            `json:"main_db" yaml:"main_db"`
	SelectionDBsConfigs map[string]OracleConfig `json:"selection_dbs" yaml:"selection_dbs"`
	CheckingConfig      CheckingConfig          `json:"checking" yaml:"checking"`
}

Config implements common configuration for the service

func (*Config) LoadFromFile

func (c *Config) LoadFromFile(path string) error

LoadFromFile loads worker configuration from a file located in the path

func (*Config) Validate

func (c *Config) Validate() error

Validate validates worker configuration

type OracleConfig

type OracleConfig struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
	Host     string `json:"host" yaml:"host"`
	Port     string `json:"port" yaml:"port"`
	SID      string `json:"sid" yaml:"sid"`
}

OracleConfig implements Oracle Database configuration

func (*OracleConfig) ConnectionString

func (c *OracleConfig) ConnectionString() string

ConnectionString returns connection string in Oracle format

func (*OracleConfig) Validate

func (c *OracleConfig) Validate() error

Validate validates Oracle Database configuration

Jump to

Keyboard shortcuts

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