hostenv

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Dev  = "dev"
	Prod = "prod"
	Test = "test"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostConfig

type HostConfig struct {
	Name     string          `mapstructure:"name" config:"name"`
	Metadata string          `mapstructure:"metadata" config:"metadata"`
	Server   WebServerConfig `mapstructure:"server" config:"server"`
}

type HttpServerConfig added in v1.6.1

type HttpServerConfig struct {
	IsTLS    bool
	Addr     string
	CertFile string `mapstructure:"cert" config:"cert"`
	KeyFile  string `mapstructure:"key" config:"key"`
}

http server configuration

type StaticConfig

type StaticConfig struct {
	Patten  string `mapstructure:"patten" config:"patten"`
	WebRoot string `mapstructure:"webroot" config:"webroot"`
}

type WebServerConfig added in v1.6.1

type WebServerConfig struct {
	ServerType     string           `mapstructure:"type" config:"type"`
	Address        string           `mapstructure:"address" config:"address"`
	MaxRequestSize int64            `mapstructure:"max_request_size" config:"max_request_size"`
	Static         StaticConfig     `mapstructure:"static" config:"static"`
	Tls            HttpServerConfig `mapstructure:"tls" config:"tls"`
}

Jump to

Keyboard shortcuts

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