utils

package
v0.0.0-...-33290b6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GetToken

func GetToken(r *http.Request) (accessToken string)

我们Token哪里获取? 1. URL Query String ? 2. Custom Header ? 3. Authorization Header

func Hash

func Hash(data string) string

func HashPassword

func HashPassword(password string) string

func IsAccessTokenExpiredError

func IsAccessTokenExpiredError(err error) bool

IsAccessTokenExpiredError 判断是否是NotFoundError

func MakeBearer

func MakeBearer(lenth int) string

MakeBearer https://tools.ietf.org/html/rfc6750#section-2.1 b64token = 1*( ALPHA / DIGIT /"-" / "." / "_" / "~" / "+" / "/" ) *"="

func PtrFloat64

func PtrFloat64(v *float64) float64

func PtrInt32

func PtrInt32(v *int32) int32

func PtrInt64

func PtrInt64(v *int64) int64

func PtrStrV

func PtrStrV(v *string) string

func SlicePtrStrv

func SlicePtrStrv(items []*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