config

package
v0.0.0-...-c41dffb Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		OpenAPI     string
		URL         string
		MimeType    string
		Encoding    string
		Language    string
		PrettyPrint bool
		Limit       int
		CORS        bool
	}
	Logging struct {
		Level   string
		Logfile string
	}
	Metadata struct {
		Identification struct {
			Id                string
			Title             string
			Abstract          string
			Keywords          []string
			KeywordsType      string
			Fees              string
			AccessConstraints string
		}
		Provider struct {
			Name string
			URL  string
		}
		License struct {
			Name string
			URL  string
		}
		Contact struct {
			Name            string
			Position        string
			Address         string
			City            string
			StateOrProvince string
			PostalCode      string
			Country         string
			Phone           string
			Fax             string
			Email           string
			URL             string
			Hours           string
			Instructions    string
			Role            string
		}
	}
	Repository Repository
}

Config provides an object model for configuration.

func LoadFromEnv

func LoadFromEnv() Config

LoadFromEnv read environment variables into configuration

func LoadFromFile

func LoadFromFile(filename string) (Config, error)

LoadFromFile read YAML into configuration

type Repository

type Repository struct {
	Type     string
	URL      string
	Username string
	Password string
	Mappings map[string]string
}

Repository provides an object model for backends.

Jump to

Keyboard shortcuts

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