hostenv

package
v1.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 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

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

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