configuration

package module
v0.0.0-...-1300846 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromGCS

func FromGCS(loc string) []byte

FromGCS TODO

func FromLocal

func FromLocal(loc string) []byte

FromLocal TODO

Types

type Config

type Config struct {
	Server Server `yaml:"server"`
}

Config represent the root node of the structures

func LoadConfig

func LoadConfig(location string, loaders ...(func(string) []byte)) *Config

LoadConfig TODO

type Handler

type Handler struct {
	Path   string            `yaml:"path"`
	Type   string            `yaml:"type"`
	Config map[string]string `yaml:"config"`
}

Handler TODO

type Middleware

type Middleware struct {
	Type   string            `yaml:"type"`
	Config map[string]string `yaml:"config"`
}

Middleware TODO

type Router

type Router struct {
	Prefix      string       `yaml:"prefix"`
	Middlewares []Middleware `yaml:"middlewares"`
	Handlers    []Handler    `yaml:"handlers"`
}

Router TODO

type Server

type Server struct {
	Port    string   `yaml:"port"`
	Routers []Router `yaml:"routers"`
}

Server TODO

Jump to

Keyboard shortcuts

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