request

package
v0.0.0-...-a5c0f30 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMenu

func DefaultMenu() []system.SysBaseMenu

Types

type AddMenuAuthorityInfo

type AddMenuAuthorityInfo struct {
	Menus       []system.SysBaseMenu `json:"menus"`
	AuthorityId uint                 `json:"authorityId"` // 角色ID
}

Add menu authority info structure

type BaseClaims

type BaseClaims struct {
	UUID        uuid.UUID
	ID          uint
	Username    string
	NickName    string
	AuthorityId uint
}

type BranchSearch

type BranchSearch struct {
	system.SysUser
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type CasbinInReceive

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

Casbin structure for input parameters

type CasbinInfo

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

Casbin info structure

func DefaultCasbin

func DefaultCasbin() []CasbinInfo

type ChangePasswordReq

type ChangePasswordReq struct {
	ID          uint   `json:"-"`           // 从 JWT 中提取 user id,避免越权
	Password    string `json:"password"`    // 密码
	NewPassword string `json:"newPassword"` // 新密码
}

Modify password structure

type ChangeUserInfo

type ChangeUserInfo struct {
	ID           uint                  `gorm:"primarykey"`                                                                           // 主键ID
	Name         string                `json:"name" gorm:"column:name;comment:名称;"`                                                  // 名称
	NickName     string                `json:"nickName" gorm:"default:系统用户;comment:用户昵称"`                                            // 姓名
	Phone        string                `json:"phone"  gorm:"comment:用户手机号"`                                                          // 用户手机号
	AuthorityIds []uint                `json:"authorityIds" gorm:"-"`                                                                // 角色ID
	Email        string                `json:"email"  gorm:"comment:用户邮箱"`                                                           // 用户邮箱
	HeaderImg    string                `json:"headerImg" gorm:"default:https://qmplusimg.henrongyi.top/gva_header.jpg;comment:用户头像"` // 用户头像
	SideMode     string                `json:"sideMode"  gorm:"comment:用户侧边主题"`                                                      // 用户侧边主题
	Enable       int                   `json:"enable" gorm:"comment:冻结用户"`                                                           //冻结用户
	Province     string                `json:"province" gorm:"column:province;comment:省;"`                                           // 省
	City         string                `json:"city" gorm:"column:city;comment:市;"`                                                   // 市
	Area         string                `json:"area" gorm:"column:area;comment:区/县;"`                                                 // 区/县
	Addr         string                `json:"addr" gorm:"column:addr;comment:详细地址;"`                                                // 详细地址
	Authorities  []system.SysAuthority `json:"-" gorm:"many2many:sys_user_authority;"`
}

type CustomClaims

type CustomClaims struct {
	BaseClaims
	BufferTime int64
	jwt.RegisteredClaims
}

Custom claims structure

type InitDB

type InitDB struct {
	DBType   string `json:"dbType"`                    // 数据库类型
	Host     string `json:"host"`                      // 服务器地址
	Port     string `json:"port"`                      // 数据库连接端口
	UserName string `json:"userName"`                  // 数据库用户名
	Password string `json:"password"`                  // 数据库密码
	DBName   string `json:"dbName" binding:"required"` // 数据库名
	DBPath   string `json:"dbPath"`                    // sqlite数据库文件路径
}

func (*InitDB) MssqlEmptyDsn

func (i *InitDB) MssqlEmptyDsn() string

func (*InitDB) MysqlEmptyDsn

func (i *InitDB) MysqlEmptyDsn() string

MysqlEmptyDsn msyql 空数据库 建库链接 Author SliverHorn

func (*InitDB) PgsqlEmptyDsn

func (i *InitDB) PgsqlEmptyDsn() string

PgsqlEmptyDsn pgsql 空数据库 建库链接 Author SliverHorn

func (*InitDB) SqliteEmptyDsn

func (i *InitDB) SqliteEmptyDsn() string

SqliteEmptyDsn sqlite 空数据库 建库链接 Author Kafumio

func (*InitDB) ToMssqlConfig

func (i *InitDB) ToMssqlConfig() config.Mssql

func (*InitDB) ToMysqlConfig

func (i *InitDB) ToMysqlConfig() config.Mysql

ToMysqlConfig 转换 config.Mysql Author [SliverHorn](https://github.com/SliverHorn)

func (*InitDB) ToPgsqlConfig

func (i *InitDB) ToPgsqlConfig() config.Pgsql

ToPgsqlConfig 转换 config.Pgsql Author [SliverHorn](https://github.com/SliverHorn)

func (*InitDB) ToSqliteConfig

func (i *InitDB) ToSqliteConfig() config.Sqlite

ToSqliteConfig 转换 config.Sqlite Author [Kafumio](https://github.com/Kafumio)

type Login

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

User login structure

type QueryByID

type QueryByID struct {
	ID uint
}

type Register

type Register struct {
	Name         string `json:"name" example:"名称"`
	Username     string `json:"userName" example:"用户名"`
	Password     string `json:"passWord" example:"密码"`
	NickName     string `json:"nickName" example:"昵称"`
	HeaderImg    string `json:"headerImg" example:"头像链接"`
	AuthorityId  uint   `json:"authorityId" swaggertype:"string" example:"int 角色id"`
	Enable       int    `json:"enable" swaggertype:"string" example:"int 是否启用"`
	AuthorityIds []uint `json:"authorityIds" swaggertype:"string" example:"[]uint 角色id"`
	Phone        string `json:"phone" example:"电话号码"`
	Email        string `json:"email" example:"电子邮箱"`
	Province     string `json:"province" example:"省"`
	City         string `json:"city" example:"市"`
	Area         string `json:"area" example:"区/县"`
	Addr         string `json:"addr" example:"详细地址"`
}

Register User register structure

type RollBack

type RollBack struct {
	ID          int  `json:"id" form:"id"`                   // 主键ID
	DeleteTable bool `json:"deleteTable" form:"deleteTable"` // 是否删除表
}

GetById Find by id structure

type SearchApiParams

type SearchApiParams struct {
	system.SysApi
	request.PageInfo
	OrderKey string `json:"orderKey"` // 排序
	Desc     bool   `json:"desc"`     // 排序方式:升序false(默认)|降序true
}

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

type ServiceStation

type ServiceStation struct {
	UIDs string `json:"uids" form:"uids"`
	request.PageInfo
}

type SetUserAuth

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

Modify user's auth structure

type SetUserAuthorities

type SetUserAuthorities struct {
	ID           uint
	AuthorityIds []uint `json:"authorityIds"` // 角色ID
}

Modify user's auth structure

type SysAuthorityBtnReq

type SysAuthorityBtnReq struct {
	MenuID      uint   `json:"menuID"`
	AuthorityId uint   `json:"authorityId"`
	Selected    []uint `json:"selected"`
}

type SysAutoHistory

type SysAutoHistory struct {
	request.PageInfo
}

type SysDictionaryDetailSearch

type SysDictionaryDetailSearch struct {
	system.SysDictionaryDetail
	request.PageInfo
}

type SysExportTemplateSearch

type SysExportTemplateSearch struct {
	system.SysExportTemplate
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type SysOperationRecordSearch

type SysOperationRecordSearch struct {
	system.SysOperationRecord
	request.PageInfo
}

Jump to

Keyboard shortcuts

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