config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 2 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 `toml:"matchers"`
}

BrandCleansing contains rules and setting for vehicle brand cleansing.

type Cleansing added in v0.1.11

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

Cleansing contains rules and setting for data cleansing.

type Database

type Database struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	User     string `toml:"username"`
	Password string `toml:"password"`
	Name     string `toml:"database"`
	SSLMode  string `toml:"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 `toml:"pattern"`
	Maker   string `toml:"maker"`
	Model   string `toml:"model"`
}

Matcher contains patterns for vehicle brand cleansing.

type Settings

type Settings struct {
	DB        Database  `toml:"database"`
	Worker    Worker    `toml:"worker"`
	Cleansing Cleansing `toml:"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 `toml:"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