system

package
v0.0.0-...-61dbfe3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(userName string) (model.SysUser, error)

Types

type Auth

type Auth struct {
	UserName string
	Password string
}

func (*Auth) Authenticate

func (a *Auth) Authenticate() (*model.SysUser, error)

type Casbin

type Casbin struct {
	RoleId     int          `json:"role_id" form:"role_id" description:"角色ID"`
	CasbinRule []CasbinRule `json:"casbin_infos" description:"权限模型列表"`
}

func (Casbin) Add

func (c Casbin) Add() error

func (Casbin) CasbinList

func (c Casbin) CasbinList() [][]string

type CasbinRule

type CasbinRule struct {
	Path   string `json:"path" form:"path"`
	Method string `json:"method" form:"method"`
}

type Role

type Role struct {
	RoleId   int
	RoleName string
	RoleKey  string
}

func (*Role) Add

func (r *Role) Add() error

func (*Role) Edit

func (r *Role) Edit() error

func (*Role) ExistById

func (r *Role) ExistById() (bool, error)

func (*Role) RemoveSysRole

func (r *Role) RemoveSysRole()

func (*Role) SysRoleList

func (r *Role) SysRoleList()

type SysUser

type SysUser struct {
	UserId      int
	NickName    string
	UserName    string
	Password    string
	RePassword  string
	PhoneNumber string
	Sex         int
	Email       string

	PageNum  int
	PageSize int
}

func (*SysUser) Add

func (u *SysUser) Add() error

Add 添加用户

func (*SysUser) AddUser

func (u *SysUser) AddUser() error

AddUser 注册用户

func (*SysUser) Edit

func (u *SysUser) Edit() error

func (*SysUser) ExistByEmail

func (u *SysUser) ExistByEmail() (bool, error)

ExistByEmail 邮箱是否存在

func (*SysUser) ExistByPhoneNumber

func (u *SysUser) ExistByPhoneNumber() (bool, error)

ExistByPhoneNumber 手机号是否存在

func (*SysUser) ExistByUserId

func (u *SysUser) ExistByUserId() (bool, error)

ExistByUserId 用户ID是否存在

func (*SysUser) ExistByUserName

func (u *SysUser) ExistByUserName() (bool, error)

ExistByUserName 用户名是否存在

type UserVoucher

type UserVoucher struct {
	UserId    int
	VoucherId int
}

func (*UserVoucher) FetchVoucher

func (uv *UserVoucher) FetchVoucher() (int64, error)

Jump to

Keyboard shortcuts

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