rest

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "rest"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Prefork       bool   `json:"prefork"`
	ServerHeader  string `json:"server_header"`
	StrictRouting bool   `json:"strict_routing"`
	CaseSensitive bool   `json:"case_sensitive"`
	Immutable     bool   `json:"immutable"`
	UnescapePath  bool   `json:"unescape_path"`
	ETag          bool   `json:"etag"`
	BodyLimit     int    `json:"body_limit"`
	Concurrency   int    `json:"concurrency"`
	Templates     struct {
		Dir string `json:"dir"`
		Ext string `json:"ext"`
	} `json:"templates"`
	ReadTimeout               time.Duration `json:"read_timeout"`
	WriteTimeout              time.Duration `json:"write_timeout"`
	IdleTimeout               time.Duration `json:"idle_timeout"`
	ReadBufferSize            int           `json:"read_buffer_size"`
	WriteBufferSize           int           `json:"write_buffer_size"`
	CompressedFileSuffix      string        `json:"compressed_file_suffix"`
	ProxyHeader               string        `json:"proxy_header"`
	GETOnly                   bool          `json:"get_only"`
	DisableKeepalive          bool          `json:"disable_keepalive"`
	DisableDefaultDate        bool          `json:"disable_default_date"`
	DisableDefaultContentType bool          `json:"disable_default_content_type"`
	DisableHeaderNormalizing  bool          `json:"disable_header_normalizing"`
	DisableStartupMessage     bool          `json:"disable_startup_message"`
	ReduceMemoryUsage         bool          `json:"reduce_memory_usage"`
}

func GetDefaultCfg

func GetDefaultCfg() (cfg Cfg)

type Entry

type Entry interface {
	entry.Abc
	Use(handler ...Handler)
	Router(fn func(r Router))
}

func New

func New(name string) Entry

type Handler

type Handler = fiber.Handler

type Opt

type Opt func(opts *Opts)

type Opts

type Opts struct{}

type Router

type Router = fiber.Router

Jump to

Keyboard shortcuts

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