dto

package
v0.0.0-...-10cedd8 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddMenuAuthorityInput

type AddMenuAuthorityInput struct {
	Menus       []model.SysBaseMenu `json:"menus"`
	AuthorityId uint                `json:"authorityId"  validate:"required"` // 角色ID
}

func (*AddMenuAuthorityInput) BindingValidParams

func (a *AddMenuAuthorityInput) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type AddSysMenusInput

type AddSysMenusInput struct {
	ParentId string `json:"parentId" comment:"父菜单ID" validate:"required"` // 父菜单ID
	Name     string `json:"name"  comment:"路由name" validate:"required"`   // 路由name
	Path     string `json:"path" comment:"路由path" validate:"required"`    // 路由path
	Disabled bool   `json:"disabled" comment:"是否禁用" validate:"required"`  // 是否在列表隐藏
	Hidden   bool   `json:"hidden" comment:"是否在列表隐藏" validate:"required"` // 是否在列表隐藏
	Sort     int    `json:"sort" comment:"排序标记" validate:"required"`      // 排序标记
	model.Meta
}

func (*AddSysMenusInput) BindingValidParams

func (a *AddSysMenusInput) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type AdminLoginInput

type AdminLoginInput struct {
	UserName string `form:"username" json:"username" comment:"用户名"  validate:"required" example:"用户名"`
	Password string `form:"password" json:"password" comment:"密码"   validate:"required" example:"密码"`
}

func (*AdminLoginInput) BindingValidParams

func (a *AdminLoginInput) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type AdminLoginOut

type AdminLoginOut struct {
	Token string `form:"token" json:"token" comment:"token"  example:"token"`
}

type AuthorityList

type AuthorityList struct {
	PageInfo
	Total             int64                `json:"total"`
	AuthorityListItem []model.SysAuthority `json:"list"`
}

type CasbinInReceive

type CasbinInReceive struct {
	AuthorityId uint `form:"authorityId" json:"authorityId"` // 权限id
}

CasbinInReceive Casbin structure for input parameters

func (*CasbinInReceive) BindingValidParams

func (a *CasbinInReceive) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type CasbinInfo

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

CasbinInfo Casbin info structure

type ChangeUserPwdInput

type ChangeUserPwdInput struct {
	OldPwd string `json:"old_pwd" form:"old_pwd" comment:"原密码" validate:"required"`
	NewPwd string `json:"new_pwd" form:"new_pwd" comment:"new_pwd" validate:"required"`
}

func (*ChangeUserPwdInput) BindingValidParams

func (a *ChangeUserPwdInput) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type Empty

type Empty struct{}

Empty 用于swag生成不需要传参的api

type IdsReq

type IdsReq struct {
	Ids []int `json:"ids" form:"ids"`
}

func (*IdsReq) BindingValidParams

func (a *IdsReq) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type OperationListInput

type OperationListInput struct {
	PageInfo
	Method string `json:"method" form:"method" ` // 请求方法
	Path   string `json:"path" form:"path" `     // 请求路径
	Status int    `json:"status" form:"status" ` // 请求状态
}

func (*OperationListInput) BindingValidParams

func (o *OperationListInput) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type OperationListOutPut

type OperationListOutPut struct {
	Total         int64                       `json:"total"`
	OperationList []*model.SysOperationRecord `json:"list"`
	PageInfo
}

type PageInfo

type PageInfo struct {
	Page     int    `json:"page" form:"page"`         // 页码
	PageSize int    `json:"pageSize" form:"pageSize"` // 每页大小
	Keyword  string `json:"keyword" form:"keyword"`   //关键字
}

PageInfo Paging common input parameter structure

func (*PageInfo) BindingValidParams

func (a *PageInfo) BindingValidParams(ctx *gin.Context) error

type SetUserAuth

type SetUserAuth struct {
	AuthorityId uint `json:"authorityId"` // 角色ID
}

func (*SetUserAuth) BindingValidParams

func (a *SetUserAuth) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type SysBaseMenuResponse

type SysBaseMenuResponse struct {
	Menu model.SysBaseMenu `json:"menu"`
}

type SysBaseMenusResponse

type SysBaseMenusResponse struct {
	Menus []model.SysBaseMenu `json:"menus"`
}

type SysMenusResponse

type SysMenusResponse struct {
	Menus []model.SysMenu `json:"menus"`
}

type UpdateCasbinInput

type UpdateCasbinInput struct {
	AuthorityId uint         `form:"authorityId" json:"authorityId"` // 权限id
	CasbinInfo  []CasbinInfo `json:"casbinInfos"`
}

UpdateCasbinInput 通过角色id更改接口权限

func (*UpdateCasbinInput) BindingValidParams

func (a *UpdateCasbinInput) BindingValidParams(ctx *gin.Context) error

BindingValidParams 绑定并校验参数

type UserInfoOut

type UserInfoOut struct {
	User      model.SysUser   `json:"user"`
	Menus     []model.SysMenu `json:"menus"`
	RuleNames []string        `json:"ruleNames"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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