httpserver

package
Version: 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: 0

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