sys

package
v0.0.0-...-7253f33 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 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 CasbinAddRequest

type CasbinAddRequest struct {
	Type     string `json:"type" validate:"omitempty,oneof=p"`
	RoleName string `json:"role_name" validate:"required, max=15"`
	Uri      string `json:"uri" validate:"required"`
	Method   string `json:"method" validate:"required"`
}

type DeptAddRequest

type DeptAddRequest struct {
	PCode  int    `json:"p_code"  validate:"required"`
	PCodes string `json:"p_codes"  validate:"required"`
	Name   string `json:"name"  validate:"required"`
	Sort   int    `json:"sort" validate:"required"`
	Tips   string `json:"tips"  validate:"required"`
}

type DeptDeleteRequest

type DeptDeleteRequest struct {
	Id int `json:"id" valid:"required"`
}

type GenerateVerifyRequest

type GenerateVerifyRequest struct {
	LoginId string `json:"login_id" validate:"required" `
	Token   string `json:"token" validate:"required"`
}

type LoginByPasswordRequest

type LoginByPasswordRequest struct {
	Username      string `json:"username" validate:"required" `
	Password      string `json:"password" validate:"required" `
	CaptchaID     string `json:"captcha_id" validate:"omitempty"`
	CaptchaAnswer string `json:"captcha_answer" validate:"omitempty"`
}

type LoginByPhoneRequest

type LoginByPhoneRequest struct {
	Phone      string `json:"phone" validate:"required,phone,len=11"`
	VerifyCode string `json:"verify_code" validate:"required,len=6"`
}
type MenuRequest struct {
	ID     int    `json:"id" validate:"required"`
	Code   string `json:"code" validate:"required"`
	PCode  string `json:"p_code" validate:"required"`
	PCodes string `json:"p_codes" validate:"required"`
	Name   string `json:"name" validate:"required"`
	Icon   string `json:"icon" validate:"required"`
	URL    string `json:"url" validate:"required"`
	Sort   int    `json:"sort" validate:"required"`
	Levels int    `json:"levels" validate:"required"`
	IsMenu int    `json:"is_menu" validate:"required"`
	Status bool   `json:"status" validate:"required"`
	Tips   string `json:"tips" validate:"required"`
}

type PaginationRequest

type PaginationRequest struct {
	PerPage int    `form:"per_page" json:"per_page" binding:"required"`
	Page    int    `form:"page" json:"page" binding:"required"`
	Sort    string `form:"sort" json:"sort" binding:"omitempty"`
	Order   string `form:"order" json:"order" binding:"omitempty"`
}

type ResetByEmailRequest

type ResetByEmailRequest struct {
	Email      string `json:"email" validate:"required,omitempty"`
	VerifyCode string `json:"verify_code" validate:"required,omitempty"`
	Password   string `validate:"password" json:"required"`
}

密码重置结构体

type RoleAddRequest

type RoleAddRequest struct {
	Name       string          `json:"name"  validate:"required"`
	Value      string          `json:"sort" validate:"required"`
	Desc       string          `json:"tips"  validate:"required"`
	Permission json.RawMessage `json:"permission" `
	Status     int             `json:"status"`
}

type RoleDeleteRequest

type RoleDeleteRequest struct {
	Id int `json:"id" validate:"required"`
}

type RoleMenuRequest

type RoleMenuRequest struct {
	RoleID  int   `json:"role_id" validate:"required"`
	MenuIDs []int `json:"menu_ids" validate:"required"`
}

type SignupRequest

type SignupRequest struct {
	Name            string `json:"name" validate:"required,max=15"`
	Phone           string `json:"phone" validate:"omitempty,phone,max=11"`
	Email           string `json:"email" validate:"omitempty,email,max=254"`
	Password        string `json:"password" validate:"required,max=255"`
	PasswordConfirm string `json:"password_confirm" validate:"required,max=255"`
	VerifyCode      string `json:"verify_code" validate:"omitempty,max=6"`
	RoleId          int    `json:"role_id" validate:"required,max=2"`
}

SignupRequest 用户注册

type UserUpdateAvatarRequest

type UserUpdateAvatarRequest struct {
	Avatar *multipart.FileHeader `json:"avatar" validate:"required" `
}

UserUpdateAvatarRequest 修改头像验证器

type UserUpdateEmailRequest

type UserUpdateEmailRequest struct {
	Email      string `json:"email" validate:"required,email,max=254"`
	VerifyCode string `json:"verify_code" validate:"required,max=6"`
}

type UserUpdatePasswordRequest

type UserUpdatePasswordRequest struct {
	Password           string `json:"password" validate:"required"`
	NewPassword        string `json:"new_password," validate:"required" `
	NewPasswordConfirm string `json:"new_password_confirm" validate:"required" `
}

type UserUpdatePhoneRequest

type UserUpdatePhoneRequest struct {
	Phone      string `json:"phone" validate:"required,max=11"`
	VerifyCode string `json:"verify_code" validate:"required,max=6"`
}

type UserUpdateProfileRequest

type UserUpdateProfileRequest struct {
	Name         string `json:"name" validate:"required,max=15" `
	Introduction string `json:"introduction" validate:"required" `
}

type VerifyActivateOtpRequest

type VerifyActivateOtpRequest struct {
	Token string `json:"token" validate:"required"`
}

type VerifyCodeEmailRequest

type VerifyCodeEmailRequest struct {
	Email string `json:"email" validate:"required,email"`
}

type VerifyCodePhoneRequest

type VerifyCodePhoneRequest struct {
	Phone string `json:"phone" validate:"required,phone"`
}

Jump to

Keyboard shortcuts

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