config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFile

type ConfigFile struct {
	Name     string `description:"name of the configuration file"`
	Location string `description:"location of the configuration file"`
	Format   string `description:"extension of the configuration file"`
}

ConfigFile describes the name, path and the format of the file to be used to load the configuration in the env

func DefaultConfigFile

func DefaultConfigFile() ConfigFile

DefaultConfigFile holds the default config file properties

type InputValidator

type InputValidator interface {
	Validate() error
}

InputValidator should be implemented by types that need input validation check. Mainly settings types

type Settings

type Settings struct {
	Storage *storage.Settings
	Server  *server.Settings
}

Settings is used to setup go-tin

func DefaultSettings

func DefaultSettings() *Settings

DefaultSettings returns the default values for configuring go-tin

func New

func New() (*Settings, error)

New creates a configuration from the environment

func (*Settings) Validate

func (s *Settings) Validate() error

Validate validates the server settings

Jump to

Keyboard shortcuts

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