user

package
v0.11.34 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldUserName      = "UserName"
	FieldPassword      = "Password"
	FieldName          = "Name"
	FieldPhone         = "Phone"
	FieldEmail         = "Email"
	FieldToken         = "Token"
	FieldLastLoginTime = "LastLoginTime"
)

Variables

View Source
var (
	ColumnUserName      = domain.ColumnName(FieldUserName)
	ColumnPassword      = domain.ColumnName(FieldPassword)
	ColumnName          = domain.ColumnName(FieldName)
	ColumnPhone         = domain.ColumnName(FieldPhone)
	ColumnEmail         = domain.ColumnName(FieldEmail)
	ColumnToken         = domain.ColumnName(FieldToken)
	ColumnLastLoginTime = domain.ColumnName(FieldLastLoginTime)
)

Functions

This section is empty.

Types

type CreateUserJsonBody

type CreateUserJsonBody struct {
	UserName string `json:"userName" binding:"required" assign:"toField:UserName"`
	Password string `json:"password" binding:"required" assign:"toField:Password"`
	Name     string `json:"name" assign:"toField:Name"`
	Phone    string `json:"phone" assign:"toField:Phone"`
	Email    string `json:"email" assign:"toField:Email"`
}

type DeleteUserQueryParams

type DeleteUserQueryParams struct {
	request.IDQueryParam
}

type Entity

type Entity struct {
	entity.Base
	UserName      string    `sqlmapping:"column:user_name;notUpdate" sqlresult:"column:user_name" check:"required,lte=256"`
	Password      string    `sqlmapping:"column:password" sqlresult:"column:password" check:"required,lte=256"`
	Name          string    `sqlmapping:"column:name;updateClear" sqlresult:"column:name" check:"lte=256"`
	Phone         string    `sqlmapping:"column:phone;updateClear" sqlresult:"column:phone" check:"lte=128"`
	Email         string    `sqlmapping:"column:email;updateClear" sqlresult:"column:email" check:"lte=512"`
	Token         string    `sqlmapping:"column:token;notUpdate" sqlresult:"column:token"`
	LastLoginTime time.Time `sqlmapping:"column:last_login_time;notUpdate" sqlresult:"column:last_login_time" check:"required,timezero"`

	RoleIDs []string `sqlmapping:"-" sqlresult:"-"`

	entity.TimeFields
}

func (*Entity) DomainCNName

func (e *Entity) DomainCNName() string

func (*Entity) DomainCamelName

func (e *Entity) DomainCamelName() string

func (*Entity) ForCreate

func (e *Entity) ForCreate() error

func (*Entity) ForDelete

func (e *Entity) ForDelete() error

func (*Entity) ForUpdate

func (e *Entity) ForUpdate() error

type GetRolesOfUserQueryParams

type GetRolesOfUserQueryParams struct {
	request.BaseQueryWithIDParams
}

type GetUserQueryParams

type GetUserQueryParams struct {
	request.IDQueryParam
}

type GetUsersQueryParams

type GetUsersQueryParams struct {
	request.BaseQueryParams
	UserName string `form:"userName" assign:"toField:UserName"`
	Name     string `form:"name" assign:"toField:Name"`
	Phone    string `form:"phone" assign:"toField:Phone"`
	Email    string `form:"email" assign:"toField:Email"`
}

type Info

type Info struct {
	application.InfoIDField
	UserName      string `json:"userName" sqlresult:"column:user_name"`
	Name          string `json:"name" sqlresult:"column:name"`
	Phone         string `json:"phone" sqlresult:"column:phone"`
	Email         string `json:"email" sqlresult:"column:email"`
	LastLoginTime string `json:"lastLoginTime" sqlresult:"column:last_login_time"`
	application.InfoTimeFields
}

func (*Info) GetID

func (info *Info) GetID() string

func (*Info) GetName

func (info *Info) GetName() string

func (*Info) GetUserName

func (info *Info) GetUserName() string

type Simple

type Simple struct {
	// schema
	Schema string

	// AES加密用到的Key
	AESKey string

	// 鉴权中间件
	AuthMiddleware binding.Middleware
}

Simple Bind参数

func (*Simple) Bind

func (simple *Simple) Bind(binder *binding.Binder)

type UpdateRolesOfUserJsonBody

type UpdateRolesOfUserJsonBody struct {
	request.IDJsonBody
	RoleIDs []string `json:"roleIds" assign:"toField:RoleIDs"`
}

type UpdateUserJsonBody

type UpdateUserJsonBody struct {
	request.IDJsonBody
	Password string `json:"password" assign:"toField:Password"`
	Name     string `json:"name" assign:"toField:Name"`
	Phone    string `json:"phone" assign:"toField:Phone"`
	Email    string `json:"email" assign:"toField:Email"`
}

Jump to

Keyboard shortcuts

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