middlewares

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RateLimit syncx.Limit

Functions

func GrpcErrorHandler

func GrpcErrorHandler(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"`
	Msg  string      `json:"msg"`
}

Jump to

Keyboard shortcuts

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