config

package
v0.0.0-...-5f207f6 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigDateFormat string = "2006-01-02"

ConfigDateFormat represents format for YYYY-MM-DD

Variables

This section is empty.

Functions

func SaveConfiguration

func SaveConfiguration(cfg *Configuration) error

SaveConfiguration save config data to the config file

Types

type Configuration

type Configuration struct {
	Storage struct {
		PassportData string `json:"passport_data"`
		Engine       string `json:"engine"`
	} `json:"storage"`
	Listener struct {
		Address               string `json:"address"`
		Port                  string `json:"port"`
		MaxPassportPerRequest uint   `json:"max_passport_per_request"`
	} `json:"listener"`
	Loader struct {
		SourceURL  string `json:"source_url"`
		EveryXDay  int    `json:"every_x_day"`
		LastUpdate string `json:"last_update"`
	} `json:"loader"`
}

Configuration structure of the config file

func LoadConfiguration

func LoadConfiguration() (*Configuration, error)

LoadConfiguration load config data from the config file

Jump to

Keyboard shortcuts

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