request

package
v0.0.0-...-78f3228 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BearerAuth

func BearerAuth(r *http.Request, args ...string) (string, bool)

func CheckUserGuest

func CheckUserGuest(r *http.Request, guest bool) bool

func CheckUserIP

func CheckUserIP(r *http.Request, ip string) bool

func CheckUserLevel

func CheckUserLevel(r *http.Request, level int) bool

func CheckUserLocation

func CheckUserLocation(r *http.Request, location geometry.PointCoordinates, maxDistance, minDistance float64) bool

distance单位:米

func CheckUserRole

func CheckUserRole(r *http.Request, role string) bool

func CheckUserRoleAndRoleLevel

func CheckUserRoleAndRoleLevel(r *http.Request, role string, level int) bool

func CheckUserTag

func CheckUserTag(r *http.Request, tag string) bool

func CheckUserTagAndTagLevel

func CheckUserTagAndTagLevel(r *http.Request, tag string, level int) bool

func CheckUserUserAgentContains

func CheckUserUserAgentContains(r *http.Request, userAgent string) bool

func GetBody

func GetBody(r *http.Request) ([]byte, error)

func GetClaims

func GetClaims(r *http.Request) (claims *predefined.JWTTokenClaims)

func GetStandardClaims

func GetStandardClaims(r *http.Request) (claims *jwt.StandardClaims)

func ParseDeleteForm

func ParseDeleteForm(r *http.Request) (url.Values, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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