predefined

package
v0.0.0-...-2f69930 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TokenTypeSelf  = "self"
	TokenTypeAuth  = "auth"
	TokenTypeGuise = "guise"
)
View Source
const (
	StatusCodeLoginLimit     = 5031
	StatusCodeLoginLimitText = "登录限制"
)
View Source
const (
	UserLevelTourist = iota //游客
)

Variables

View Source
var JWTSigningMethod = jwt.SigningMethodHS512

Functions

This section is empty.

Types

type JWTTokenClaims

type JWTTokenClaims struct {
	*jwt.StandardClaims
	*JWTTokenClaimsUserInfo        //数据变化,需刷新token获取最新token
	TokenType               string `json:"token_type"`
}

type JWTTokenClaimsUserInfo

type JWTTokenClaimsUserInfo struct {
	UserID      primitive.ObjectID `json:"user_id"`
	ExtensionID int                `json:"extension_id"`
	Name        string             `json:"name"`
	Guest       bool               `json:"guest"`
	Level       int                `json:"level"`
	Experience  int                `json:"experience"`
	Roles       []model.UserRole   `json:"roles"`
	Tags        []model.UserTag    `json:"tags"`
	IP          string             `json:"ip"`
	UserAgent   string             `json:"user_agent"`
	Location    geometry.Point     `json:"location"`
}

type RequestServeAuthGuest

type RequestServeAuthGuest struct {
	RequestServeLongitudeLatitude
}

type RequestServeAuthGuestToUser

type RequestServeAuthGuestToUser struct {
	RequestServeAuthUsernamePassword
}

type RequestServeAuthPassword

type RequestServeAuthPassword struct {
	Password string `form:"password" validate:"required"`
}

type RequestServeAuthRefresh

type RequestServeAuthRefresh struct {
	RequestServeLongitudeLatitude
}

type RequestServeAuthSecurePassword

type RequestServeAuthSecurePassword struct {
	SecurePassword string `form:"secure_password" validate:"required"`
}

type RequestServeAuthTokenByUsernameAndPassword

type RequestServeAuthTokenByUsernameAndPassword struct {
	RequestServeAuthTokenID
	RequestServeAuthUsernamePassword
}

type RequestServeAuthTokenID

type RequestServeAuthTokenID struct {
	TokenID primitive.ObjectID `form:"token_id" validate:"required"`
}

type RequestServeAuthUsername

type RequestServeAuthUsername struct {
	Username string `form:"username" validate:"required"`
}

type RequestServeAuthUsernamePassword

type RequestServeAuthUsernamePassword struct {
	RequestServeAuthUsername
	RequestServeAuthPassword
}

type RequestServeDistance

type RequestServeDistance struct {
	MaxDistance float64 `form:"max_distance,omitempty" validate:"numeric"`
	MinDistance float64 `form:"min_distance,omitempty" validate:"numeric"`
}

type RequestServeLongitudeLatitude

type RequestServeLongitudeLatitude struct {
	Longitude float64 `form:"longitude,omitempty" validate:"numeric"` //经度
	Latitude  float64 `form:"latitude,omitempty" validate:"numeric"`  //维度
}

type RequestServeOnlineDistance

type RequestServeOnlineDistance struct {
	OnlineMaxDistance float64 `form:"pnline_max_distance,omitempty" validate:"numeric"`
	OnlineMinDistance float64 `form:"pnline_min_distance,omitempty" validate:"numeric"`
}

type RequestServeOnlineLongitudeLatitude

type RequestServeOnlineLongitudeLatitude struct {
	OnlineLongitude float64 `form:"pnline_longitude,omitempty" validate:"numeric"` //经度
	OnlineLatitude  float64 `form:"pnline_latitude,omitempty" validate:"numeric"`  //维度
}

type RequestServeUserList

type RequestServeUserList struct {
	UserID        primitive.ObjectID `form:"user_id"`
	ExtensionID   int                `form:"extension_id"`
	GuestQuery    bool               `form:"guest_query"`
	Guest         bool               `form:"guest"`
	Roles         []string           `form:"roles"`
	RolesWithTime help.DateTime      `form:"roles_with_time"`
	Tags          []string           `form:"tags"`
	TagsWithTime  help.DateTime      `form:"tags_with_time"`
	Level         int                `form:"level"`
	GteLevel      int                `form:"gte_level"`
	LteLevel      int                `form:"lte_level"`
	OnlineQuery   bool               `form:"online_query"`
	Online        bool               `form:"online"`
	RequestServeLongitudeLatitude
	RequestServeDistance
	RequestServeOnlineLongitudeLatitude
	RequestServeOnlineDistance
}

Jump to

Keyboard shortcuts

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