request

package
v0.0.0-...-b35005d Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUser

type AddUser struct {
	Username string `json:"username" validate:"required"` // 用户名
	Password string `json:"password" validate:"required"` // 密码
	//Phone       string `json:"phone" validate:"required,regexp=^[1][0-9]{10}$"` // 手机号
	Phone       string `json:"phone"`                      // 手机号
	Email       string `json:"email" validate:"email"`     // 邮箱
	Active      bool   `json:"active"`                     // 是否活跃
	RoleModelID uint   `json:"roleId" validate:"required"` // 角色ID
}

type ApiSearchParams

type ApiSearchParams struct {
	request.PageInfo
	OrderKey string `json:"orderKey"` // 排序
	Desc     bool   `json:"desc"`     // 排序方式:升序false(默认)|降序true
	// contains filtered or unexported fields
}

ApiSearchParams api分页条件查询及排序结构体

type CasbinInfo

type CasbinInfo struct {
	Path   string `json:"path"`   // 路径
	Method string `json:"method"` // 方法
}

func DefaultCasbin

func DefaultCasbin() []CasbinInfo

type CustomClaims

type CustomClaims struct {
	ID         uint   `json:"ID"`
	Username   string `json:"username"`
	RoleId     uint   `json:"roleId"` // 角色Id
	BufferTime int64  `json:"bufferTime"`
	jwt.RegisteredClaims
}

CustomClaims Custom claims structure

type EditApi

type EditApi struct {
	Id uint `json:"id" validate:"required"`
	// contains filtered or unexported fields
}

type EditMenuReq

type EditMenuReq struct {
	Id uint `json:"id" validate:"required"`
	Menu
}

type EditRole

type EditRole struct {
	ID       uint   `json:"id" validate:"required"`
	RoleName string `json:"roleName" validate:"required"`
}

type EditRoleMenu

type EditRoleMenu struct {
	RoleId uint   `json:"roleId"`
	Ids    []uint `json:"ids"`
}

type EditUser

type EditUser struct {
	Id          uint   `json:"id" validate:"required"`
	Username    string `json:"username" validate:"required"` // 用户名
	Phone       string `json:"phone"`                        // 手机号
	Email       string `json:"email"`                        // 邮箱
	Active      bool   `json:"active"`                       // 是否活跃
	RoleModelID uint   `json:"roleId" validate:"required"`   // 角色ID
}

type Login

type Login struct {
	Username  string `json:"username" validate:"required"`  // 用户名
	Password  string `json:"password" validate:"required"`  // 密码
	Captcha   string `json:"captcha" validate:"required"`   // 验证码
	CaptchaId string `json:"captchaId" validate:"required"` // 验证码ID
}

Login User login structure

type Menu struct {
	Pid       uint   `json:"pid"` // 默认0 根目录
	Name      string `json:"name"`
	Path      string `json:"path" validate:"required"`
	Redirect  string `json:"redirect"`
	Component string `json:"component" validate:"required"`
	Meta      meta   `json:"meta"`
}

type ModifyPass

type ModifyPass struct {
	Id          uint   `json:"id" validate:"required"`
	OldPassword string `json:"oldPassword" validate:"required"` // 旧密码
	NewPassword string `json:"newPassword" validate:"required"` // 新密码
}

type ReqCasbin

type ReqCasbin struct {
	RoleId      uint         `json:"roleId" validate:"required"`
	CasbinInfos []CasbinInfo `json:"casbinInfos"`
}

type Role

type Role struct {
	RoleName string `json:"roleName" validate:"required"`
}

type SwitchActive

type SwitchActive struct {
	Id     uint `json:"id" validate:"required"`
	Active bool `json:"active"`
}

Jump to

Keyboard shortcuts

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