middlewares

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RateLimit syncx.Limit

Functions

func ErrorHandler added in v0.15.0

func ErrorHandler(err error) (int, any)

func GrpcRateLimitInterceptors

func GrpcRateLimitInterceptors(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

func PrintLogToConsole

func PrintLogToConsole(c config.Config)

func WrapResponse

func WrapResponse(next http.HandlerFunc) http.HandlerFunc

Types

type Body

type Body struct {
	Data    interface{} `json:"data"`
	Code    int         `json:"code"`
	Message string      `json:"message"`
}

Jump to

Keyboard shortcuts

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