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: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenTypeSelf  = "self"
	TokenTypeAuth  = "auth"
	TokenTypeGuise = "guise"
)
View Source
const (
	RoleRightTypeAction = iota
	RoleRightTypeModule
	RoleRightTypeApp
	RoleRightTypePlatform
)
View Source
const (
	ApplicationTypeCode    = "code"
	ApplicationTypeVirtual = "virtual"
)
View Source
const (
	ApplicationLevelApp    = "app"
	ApplicationLevelModule = "module"
	ApplicationLevelAction = "action"
	ApplicationLevelMethod = "method"
)
View Source
const (
	StatusCodeLoginLimit     = 5031
	StatusCodeLoginLimitText = "登录限制"
)

Variables

View Source
var JWTSigningMethod = jwt.SigningMethodHS512

Functions

This section is empty.

Types

type JWTTokenClaims

type JWTTokenClaims struct {
	*jwt.StandardClaims
	TokenType string `json:"token_type"`
}

type RequestManageApplicationEnable

type RequestManageApplicationEnable struct {
	RequestManageLevelPath
	RequestManageEnable
}

type RequestManageApplicationHide

type RequestManageApplicationHide struct {
	RequestManageLevelPath
	RequestManageHide
}

type RequestManageApplicationUpdate

type RequestManageApplicationUpdate struct {
	ParentPath   string `form:"parent_path"`
	Type         string `form:"type" validate:"required"`
	Name         string `form:"name" validate:"required"`
	Path         string `form:"path" validate:"required"`
	Level        string `form:"level" validate:"required"`
	Order        int    `form:"order" validate:"numeric"`
	Enable       bool   `form:"enable"`
	MetaHideMenu bool   `form:"meta_hide_menu"`
	MetaTitle    string `form:"meta_title" validate:"required"`
	MetaIcon     string `form:"meta_icon"`
	MetaFrameSrc string `form:"meta_frame_src"`
}

type RequestManageDelete

type RequestManageDelete struct {
	Delete bool `form:"delete"`
}

type RequestManageEnable

type RequestManageEnable struct {
	Enable bool `form:"enable"`
}

type RequestManageHide

type RequestManageHide struct {
	Hide bool `form:"hide"`
}

type RequestManageLevelPath

type RequestManageLevelPath struct {
	Level string `form:"level" validate:"required"`
	Path  string `form:"path" validate:"required"`
}

type RequestManageLongitudeLatitude

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

type RequestManageNamePath

type RequestManageNamePath struct {
	Name string `form:"name" validate:"required"`
	Path string `form:"path" validate:"required"`
}

type RequestManageObjectID

type RequestManageObjectID struct {
	ObjectID primitive.ObjectID `form:"_id" validate:"required"`
}

type RequestManagePassword

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

type RequestManageRefresh

type RequestManageRefresh struct {
	RequestManageLongitudeLatitude
}

type RequestManageRole

type RequestManageRole struct {
	Name  string `form:"name" validate:"required"`
	Scope int    `form:"scope" validate:"gte=0"`
	RequestManageEnable
	Applications string `form:"applications" validate:"json"`
}

type RequestManageRoleDelete

type RequestManageRoleDelete struct {
	RequestManageObjectID
	RequestManageDelete
}

type RequestManageRoleEnable

type RequestManageRoleEnable struct {
	RequestManageObjectID
	RequestManageEnable
}

type RequestManageTokenDelete

type RequestManageTokenDelete struct {
	RequestManageObjectID
	Token string `form:"token" validate:"required"`
}

type RequestManageUserCreate

type RequestManageUserCreate struct {
	UserName string `form:"username" validate:"required"`
	RealName string `form:"real_name" validate:"required"`
	Email    string `form:"email" validate:"email"`
	RequestManageEnable
	RequestManagePassword
	Description string `form:"description"`
}

type RequestManageUserDelete

type RequestManageUserDelete struct {
	RequestManageUserID
	RequestManageDelete
}

type RequestManageUserEnable

type RequestManageUserEnable struct {
	RequestManageUserID
	RequestManageEnable
}

type RequestManageUserID

type RequestManageUserID struct {
	UserID primitive.ObjectID `form:"user_id" validate:"required"`
}

type RequestManageUserUpdate

type RequestManageUserUpdate struct {
	RequestManageUserID
	UserName string `form:"username" validate:"required"`
	RealName string `form:"real_name" validate:"required"`
	Email    string `form:"email" validate:"email"`
	RequestManageEnable
	Description string `form:"description" validate:"required"`
}

type RequestManageUsername

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

Jump to

Keyboard shortcuts

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