user

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T primary.Key]() web.Constructor

Types

type Control

type Control[T primary.Key] struct {
	*notify.NotifyMapper[T]
	*mappers.UserMapper[T]
	*mappers.OrgManageMapper[T]
	*sql.DB
	Ak         string        `value:"aurora.baiduAk"`
	HeadAddUrl string        `value:"aurora.oss.BucketURL"`
	Channel    *amqp.Channel // rabbitMQ 通道
	Tenc       *cos.Client
	Notify     *notify.Notification[T]
}

func (*Control[T]) DefaultOrgRole

func (control *Control[T]) DefaultOrgRole(token *tokenutils.Token[T], arg map[string]T) (rep.Response, error)

DefaultOrgRole @Description : @Param arg : @Param token : [Get] => /api/default/our

func (*Control[T]) EditInfo

func (control *Control[T]) EditInfo(args *models.UserModel[T], token *tokenutils.Token[T]) (rep.Response, error)

EditInfo @Description : @Param args : @Param token : [Post] => /api/user/setting/info

func (*Control[T]) GetMessage added in v0.0.2

func (control *Control[T]) GetMessage(token *tokenutils.Token[T]) (rep.Response, error)

func (*Control[T]) GetOurTree

func (control *Control[T]) GetOurTree(args map[string]any, token *tokenutils.Token[T]) (rep.Response, error)

GetOurTree @Description : @Param args : @Param token : [Get] => /api/user/menu

func (*Control[T]) HandleMessage added in v0.0.2

func (control *Control[T]) HandleMessage(args map[string]any) (rep.Response, error)

func (*Control[T]) Info

func (control *Control[T]) Info(token *tokenutils.Token[T]) (rep.Response, error)

Info @Description : @Param token : [Get] => /api/user/info

func (*Control[T]) Login

func (control *Control[T]) Login(login Login) (rep.Response, error)

Login 登录接口

func (*Control[T]) MenuList

func (control *Control[T]) MenuList(args map[string]any, token *tokenutils.Token[T]) (rep.Response, error)

MenuList @Description : @Param args : @Param token : [Get] => /api/user/menuList

func (*Control[T]) Message

func (control *Control[T]) Message(req *http.Request, rew http.ResponseWriter, token *tokenutils.Token[T])

Message @Description : 登录 系统创建消息长连接 @Param rew : @Param req : [Get] => /public/ws

func (*Control[T]) QuitOrg

func (control *Control[T]) QuitOrg(args map[string]int) (rep.Response, error)

QuitOrg @Description : 用户退出自己所在的一个组织 @Param args : orgId(需要退出的组织id) userId(用户id) [Post] => /api/user/quit/org

func (*Control[T]) Send

func (control *Control[T]) Send(message map[string]string)

func (*Control[T]) SetDefaultOrg

func (control *Control[T]) SetDefaultOrg(token *tokenutils.Token[T], args map[string]any) (rep.Response, error)

SetDefaultOrg @Description : 设置用户的默认组织 @Param args : @Param token : [Post] => /api/org/default

func (*Control[T]) SetDefaultOrgRole

func (control *Control[T]) SetDefaultOrgRole(token *tokenutils.Token[T], args map[string]any) (rep.Response, error)

SetDefaultOrgRole @Description : 设置组织默认角色,只有当前默认组织才能够修改默认角色 @Param args : @Param token : [Post] => /api/user/role/default

func (*Control[T]) SettingHeader

func (control *Control[T]) SettingHeader(file *web.MultipartFile, token *tokenutils.Token[T]) (rep.Response, error)

SettingHeader @Description : 用户上传修改头像 @Param file : 上传的头像文件 @Param token : 用户信息 [Post] => /api/user/setting/header

func (*Control[T]) ToolList

func (control *Control[T]) ToolList(args map[string]any, token *tokenutils.Token[T]) (rep.Response, error)

ToolList @Description : @Param args : @Param token : [Get] => /api/user/tool

type Login

type Login struct {
	Account  string
	Password string
}

Jump to

Keyboard shortcuts

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