Documentation ¶
Index ¶
- func BearerAuth(r *http.Request, args ...string) (string, bool)
- func CheckUserGuest(r *http.Request, guest bool) bool
- func CheckUserIP(r *http.Request, ip string) bool
- func CheckUserLevel(r *http.Request, level int) bool
- func CheckUserLocation(r *http.Request, location geometry.PointCoordinates, ...) bool
- func CheckUserRole(r *http.Request, role string) bool
- func CheckUserRoleAndRoleLevel(r *http.Request, role string, level int) bool
- func CheckUserTag(r *http.Request, tag string) bool
- func CheckUserTagAndTagLevel(r *http.Request, tag string, level int) bool
- func CheckUserUserAgentContains(r *http.Request, userAgent string) bool
- func GetBody(r *http.Request) ([]byte, error)
- func GetClaims(r *http.Request) (claims *predefined.JWTTokenClaims)
- func GetStandardClaims(r *http.Request) (claims *jwt.StandardClaims)
- func ParseDeleteForm(r *http.Request) (url.Values, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUserLocation ¶
func CheckUserLocation(r *http.Request, location geometry.PointCoordinates, maxDistance, minDistance float64) bool
distance单位:米
func CheckUserTagAndTagLevel ¶
func GetClaims ¶
func GetClaims(r *http.Request) (claims *predefined.JWTTokenClaims)
func GetStandardClaims ¶
func GetStandardClaims(r *http.Request) (claims *jwt.StandardClaims)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.