https

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 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 New added in v1.0.4

func New(addr string, handler http.Handler) *St

func (*St) Shutdown

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

func (*St) Start added in v1.0.4

func (s *St) Start() (string, error)

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