config

package
v0.0.0-...-98f0a1a Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Host and port to handle as http server.
	Address string `mapstructure:"address" json:"address,omitempty" bson:"address,omitempty"`

	// List of the middleware names (order will be preserved).
	Middleware []string `mapstructure:"middleware" json:"middleware,omitempty" bson:"middleware,omitempty"`

	// MaxRequestSize specified max size for payload body in megabytes, default: 100Mb.
	MaxRequestSize uint64 `mapstructure:"max_request_size" json:"max_request_size,omitempty" bson:"max_request_size,omitempty"`

	// SSL defines https server options.
	SSL *https.SSLConfig `mapstructure:"ssl" json:"ssl,omitempty" bson:"ssl,omitempty"`

	// HTTP2 configuration
	HTTP2 *https.HTTP2Config `mapstructure:"http2" json:"http2,omitempty" bson:"http2,omitempty"`
}

func (*Config) EnableHTTP

func (c *Config) EnableHTTP() bool

func (*Config) EnableTLS

func (c *Config) EnableTLS() bool

func (*Config) InitDefaults

func (c *Config) InitDefaults() error

func (*Config) Valid

func (c *Config) Valid() error

Jump to

Keyboard shortcuts

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