config

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 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 AutoRia

type AutoRia struct {
	Period Duration `toml:"period"`
	ApiKey string   `toml:"api_key"`
}

type Config

type Config struct {
	AutoRia *AutoRia `toml:"autoria"`
	Store   *Store   `toml:"store"`
}

func New

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

New reads application configuration from specified file path.

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler{} for Duration type.

type Store added in v0.0.39

type Store struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	Database string `toml:"database"`
}

Jump to

Keyboard shortcuts

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