service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Rand = rand.New(rand.NewSource(time.Now().UnixNano()))

Functions

func CheckUserUnique

func CheckUserUnique(name string, id ...int64) (bool, error)

Types

type Login

type Login struct {
	ID       string `json:"id" valid:"required"`
	Account  string `json:"account" valid:"required"`
	Password string `json:"password" valid:"required"`
	Captcha  string `json:"captcha" valid:"required"`
}

Login 用户登录

func (*Login) Do

func (l *Login) Do(c *gin.Context) error

type PasswordChange

type PasswordChange struct {
	AuthID   int64
	Password string `json:"password" valid:"required"`
	Confirm  string `json:"confirm" valid:"required"`
}

func (*PasswordChange) Do

func (p *PasswordChange) Do() error

ChangePassword ...

type PasswordReset

type PasswordReset struct {
	ID int64 `json:"id" valid:"required"`
}

func (*PasswordReset) Do

func (p *PasswordReset) Do() error

type UserAdd

type UserAdd struct {
	Name  string `json:"name" valid:"required"`
	EMail string `json:"email" valid:"required"`
	Role  int    `json:"role" valid:"required"`
}

func (*UserAdd) Do

func (u *UserAdd) Do() error

type UserDelete

type UserDelete struct {
	ID int64 `json:"id"`
}

func (*UserDelete) Do

func (u *UserDelete) Do() error

type UserEdit

type UserEdit struct {
	ID    int64  `json:"id" valid:"required"`
	Name  string `json:"name" valid:"required"`
	EMail string `json:"email" valid:"required"`
	Role  int    `json:"role" valid:"required"`
}

func (*UserEdit) Do

func (u *UserEdit) Do() error

type UserList

type UserList struct {
	Page int    `json:"page" valid:"required"`
	Size int    `json:"size" valid:"required"`
	Name string `json:"name"`
	Role int    `json:"role"`
}

func (*UserList) Do

func (u *UserList) Do() (*reply.UserListReply, error)

Jump to

Keyboard shortcuts

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