httpserver

package
v0.0.0-...-a5d5012 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBodyBytes

func GetBodyBytes() []byte

func PutBodyBytes

func PutBodyBytes(data []byte)

func RealIP

func RealIP(ctx *fasthttp.RequestCtx) string

Types

type HttpConfig

type HttpConfig struct {
	Addr       string `json:"addr" toml:"addr"`
	IsTLS      bool   `json:"is_tls" toml:"is_tls"`
	TLSCrtFile string `json:"tls_crt_file" toml:"tls_crt_file"`
	TLSKeyFile string `json:"tls_key_file" toml:"tls_key_file"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(log *logger.Logger, cfg *HttpConfig) *Service

func (*Service) GetRouter

func (this_ *Service) GetRouter() *echo.Echo

func (*Service) ReadReqBody

func (this_ *Service) ReadReqBody(ctx echo.Context, out []byte) (n int64, err error)

func (*Service) Serve

func (this_ *Service) Serve() error

func (*Service) Shutdown

func (this_ *Service) Shutdown() error

Jump to

Keyboard shortcuts

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