config

package
v0.0.0-...-71330bb Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: EUPL-1.2 Imports: 5 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 {
	// Address is the hostname or ip the web server will listen to
	Address string `yaml:"address"`
	// Port is the tcp port number or service name the web server will listen to
	Port string `yaml:"port"`
	// Token is the sncf api token
	Token string `yaml:"token"`
}

func LoadFile

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

LoadFile loads the c from a given file

type DecodeError

type DecodeError struct {
	// contains filtered or unexported fields
}

Yaml configuration file decoding error

func (DecodeError) Error

func (e DecodeError) Error() string

func (DecodeError) Unwrap

func (e DecodeError) Unwrap() error

type InvalidAddressError

type InvalidAddressError struct {
	// contains filtered or unexported fields
}

Invalid address field error

func (InvalidAddressError) Error

func (e InvalidAddressError) Error() string

func (InvalidAddressError) Unwrap

func (e InvalidAddressError) Unwrap() error

type InvalidPortError

type InvalidPortError struct {
	// contains filtered or unexported fields
}

Invalid port field error

func (InvalidPortError) Error

func (e InvalidPortError) Error() string

func (InvalidPortError) Unwrap

func (e InvalidPortError) Unwrap() error

type InvalidTokenError

type InvalidTokenError struct {
	// contains filtered or unexported fields
}

Invalid token field error

func (InvalidTokenError) Error

func (e InvalidTokenError) Error() string

type OpenError

type OpenError struct {
	// contains filtered or unexported fields
}

file open configuration file error

func (OpenError) Error

func (e OpenError) Error() string

func (OpenError) Unwrap

func (e OpenError) Unwrap() error

Jump to

Keyboard shortcuts

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