http

package
v0.0.0-...-9cb16bd Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServerOptions

type HTTPServerOptions struct {
	ServerHeader string
	AppName      string

	CaseSensitive bool
	StrictRouting bool
	ReadTimeout   time.Duration
	WriteTimeout  time.Duration
	BodyLimit     int
}

HTTPServerOptions defines the http server configuration

type Option

type Option func(*HTTPServerOptions)

Option is the func interface to assign options

func WithHTTPServerAppName

func WithHTTPServerAppName(appName string) Option

WithHTTPServerAppName defines the HTTPServer App Name

func WithHTTPServerBodyLimit

func WithHTTPServerBodyLimit(bodyLimit int) Option

WithHTTPServerBodyLimit defines the HTTPServer Body Limit

func WithHTTPServerCaseSensitive

func WithHTTPServerCaseSensitive(isCaseSensitive bool) Option

WithHTTPServerCaseSensitive defines the HTTPServer Case Sensitive

func WithHTTPServerHeader

func WithHTTPServerHeader(header string) Option

WithHTTPServerHeader defines the HTTPServer Header

func WithHTTPServerReadTimeout

func WithHTTPServerReadTimeout(readTimeout time.Duration) Option

WithHTTPServerReadTimeout defines the HTTPServer Read Timeout

func WithHTTPServerStrictRouting

func WithHTTPServerStrictRouting(isStrictRouting bool) Option

WithHTTPServerStrictRouting defines the HTTPServer Strict Routing

func WithHTTPServerWriteTimeout

func WithHTTPServerWriteTimeout(writeTimeout time.Duration) Option

WithHTTPServerWriteTimeout defines the HTTPServer Write Timeout

type Server

type Server struct {
	Options *HTTPServerOptions
	App     *fiber.App
}

func NewHTTPServer

func NewHTTPServer(opts ...Option) *Server

NewHTTP returns a new HTTP instance

Jump to

Keyboard shortcuts

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