geocatalogo: github.com/go-spatial/geocatalogo/config Index | Files

package config

import "github.com/go-spatial/geocatalogo/config"

Index

Package Files

config.go

type Config Uses

type Config struct {
    Server struct {
        OpenAPIDef  string
        URL         string
        MimeType    string
        Encoding    string
        Language    string
        PrettyPrint bool
        Limit       int
    }
    Logging struct {
        Level   string
        Logfile string
    }
    Metadata struct {
        Identification struct {
            Title             string
            Abstract          string
            Keywords          []string
            KeywordsType      string
            Fees              string
            AccessConstraints string
        }
        Provider 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 Uses

func LoadFromEnv() Config

LoadFromEnv read environment variables into configuration

func LoadFromFile Uses

func LoadFromFile(filename string) (Config, error)

LoadFromFile read YAML into configuration

type Repository Uses

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

Repository provides an object model for backends.

Package config imports 5 packages (graph) and is imported by 4 packages. Updated 2018-04-11. Refresh now. Tools for package owners.