config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 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 Config

type Config struct {
	Port string `mapstructure:"port"`

	Sources []Source `mapstructure:"sources"`
}

Config is the entity that holds all the configuration of the config file

func New

func New(v *viper.Viper) (*Config, error)

New initializes a Config from the v

type Source

type Source struct {
	Name      string `mapstructure:"name"`
	Canonical string `mapstructure:"canonical"`

	Token  string `mapstructure:"token"`
	APIKey string `mapstructure:"api_key"`
}

Source it's the configuration of each one of the supported sources

Jump to

Keyboard shortcuts

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