config

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrandCleansing added in v0.1.11

type BrandCleansing struct {
	Matchers []Matcher `yaml:"matchers"`
}

BrandCleansing contains rules and setting for vehicle brand cleansing.

type Cleansing added in v0.1.11

type Cleansing struct {
	Brand BrandCleansing `yaml:"brand"`
}

Cleansing contains rules and setting for data cleansing.

type Database

type Database struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"username"`
	Password string `yaml:"password"`
	Name     string `yaml:"database"`
	SSLMode  string `yaml:"ssl_mode"`
}

Database contains configuration details for database.

func (*Database) Address

func (db *Database) Address() string

Address return API address in "host:port" format.

type Matcher added in v0.1.11

type Matcher struct {
	Pattern string `yaml:"pattern"`
	Maker   string `yaml:"maker"`
	Model   string `yaml:"model"`
}

Matcher contains patterns for vehicle brand cleansing.

type Settings

type Settings struct {
	DB        Database  `yaml:"database"`
	Worker    Worker    `yaml:"worker"`
	Cleansing Cleansing `yaml:"cleansing"`
}

Settings is decoded configuration file.

func New

func New(path string) (*Settings, error)

New reads application configuration from specified file path.

type Worker added in v0.1.11

type Worker struct {
	ResourceID string `yaml:"resource_id"`
}

Worker contains settings for data processing by cmd/worker.

Jump to

Keyboard shortcuts

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