https

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadHeaderTimeout = 10 * time.Second
	ReadTimeout       = 2 * time.Minute
	MaxHeaderBytes    = 300 * 1024
)

Variables

This section is empty.

Functions

func BindJSON

func BindJSON(c *gin.Context, obj any) bool

func BindQuery

func BindQuery(c *gin.Context, obj any) bool

func Error

func Error(c *gin.Context, err error) bool

func GetAuthToken

func GetAuthToken(c *gin.Context) string

func MwCors

func MwCors() gin.HandlerFunc

func MwRecovery

func MwRecovery(lg logger.WarnAndError, handler func(*gin.Context, error)) gin.HandlerFunc

Types

type St

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

func Start

func Start(addr string, handler http.Handler, lg logger.Lite) *St

func (*St) Shutdown

func (s *St) Shutdown(timeout time.Duration) bool

func (*St) Wait

func (s *St) Wait() <-chan error

Jump to

Keyboard shortcuts

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