helper

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKeyUser = contextKey("user")
View Source
var StatusCodeDefaultMsgMap = map[int]string{
	401: "please login in",
	500: "internal error",
}

Functions

func ExtractPayloadFromToken

func ExtractPayloadFromToken(key string, jwtToken string) (interface{}, error)

func GenerateErrorResponse

func GenerateErrorResponse[T types.ApiResponse](statusCode int, messages ...string) (T, error)

func ParseCookie

func ParseCookie(cookies []string) map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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