biz

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 27 Imported by: 0

README

biz

用于具体的业务组合

Documentation

Index

Constants

This section is empty.

Variables

ProviderSetBiz 注入biz依赖

Functions

This section is empty.

Types

type AlarmPageBiz

type AlarmPageBiz struct {
	// contains filtered or unexported fields
}

func NewPageBiz

func NewPageBiz(pageRepo repository.PageRepo, realtimeRepo repository.AlarmRealtimeRepo, logX repository.SysLogRepo, logger log.Logger) *AlarmPageBiz

NewPageBiz 实例化页面业务

func (*AlarmPageBiz) BindUserPages

func (p *AlarmPageBiz) BindUserPages(ctx context.Context, userId uint32, pageIds []uint32) error

BindUserPages 绑定用户页面

func (*AlarmPageBiz) CountAlarmPageByIds

func (p *AlarmPageBiz) CountAlarmPageByIds(ctx context.Context, ids ...uint32) (map[uint32]int64, error)

CountAlarmPageByIds 通过id列表获取各页面报警数量

func (*AlarmPageBiz) GetStrategyIds

func (p *AlarmPageBiz) GetStrategyIds(ctx context.Context, ids ...uint32) ([]uint32, error)

GetStrategyIds 获取策略id列表

func (*AlarmPageBiz) GetUserAlarmPages

func (p *AlarmPageBiz) GetUserAlarmPages(ctx context.Context, userId uint32) ([]*bo.DictBO, error)

GetUserAlarmPages 获取用户告警页面列表

type AlarmRealtimeBiz

type AlarmRealtimeBiz struct {
	// contains filtered or unexported fields
}

func NewAlarmRealtime

func NewAlarmRealtime(
	dataRepo repository.DataRepo,
	realtimeRepo repository.AlarmRealtimeRepo,
	alarmPageRepo repository.PageRepo,
	logger log.Logger,
) *AlarmRealtimeBiz

func (*AlarmRealtimeBiz) AlarmIntervene

func (l *AlarmRealtimeBiz) AlarmIntervene(ctx context.Context, id uint32, req *bo.AlarmInterveneBO) error

AlarmIntervene 告警干预/介入

func (*AlarmRealtimeBiz) AlarmSuppress

func (l *AlarmRealtimeBiz) AlarmSuppress(ctx context.Context, id uint32, req *bo.AlarmSuppressBO) error

AlarmSuppress 告警抑制

func (*AlarmRealtimeBiz) AlarmUpgrade

func (l *AlarmRealtimeBiz) AlarmUpgrade(ctx context.Context, id uint32, req *bo.AlarmUpgradeBO) error

AlarmUpgrade 告警升级

func (*AlarmRealtimeBiz) GetRealtimeDetailById

func (l *AlarmRealtimeBiz) GetRealtimeDetailById(ctx context.Context, id uint32) (*bo.AlarmRealtimeBO, error)

GetRealtimeDetailById 通过id获取实时告警详情

func (*AlarmRealtimeBiz) GetRealtimeList

func (l *AlarmRealtimeBiz) GetRealtimeList(ctx context.Context, req *bo.ListRealtimeReq) ([]*bo.AlarmRealtimeBO, error)

GetRealtimeList 获取实时告警列表

func (*AlarmRealtimeBiz) HandleRealtime

func (l *AlarmRealtimeBiz) HandleRealtime(ctx context.Context, req ...*bo.AlarmRealtimeBO) ([]*bo.AlarmRealtimeBO, error)

HandleRealtime 创建实时告警

type ApiBiz

type ApiBiz struct {
	// contains filtered or unexported fields
}

func NewApiBiz

func NewApiBiz(
	repo repository.ApiRepo,
	dataRepo repository.DataRepo,
	logX repository.SysLogRepo,
	logger log.Logger,
) *ApiBiz

func (*ApiBiz) CreateApi

func (b *ApiBiz) CreateApi(ctx context.Context, apiBoList ...*bo.ApiBO) ([]*bo.ApiBO, error)

CreateApi 创建api

func (*ApiBiz) DeleteApiById

func (b *ApiBiz) DeleteApiById(ctx context.Context, id uint32) error

DeleteApiById 删除api

func (*ApiBiz) GetApiById

func (b *ApiBiz) GetApiById(ctx context.Context, id uint32) (*bo.ApiBO, error)

GetApiById 获取api

func (*ApiBiz) ListAllApi

func (b *ApiBiz) ListAllApi(ctx context.Context) ([]*bo.ApiBO, error)

ListAllApi 获取api列表

func (*ApiBiz) ListApi

func (b *ApiBiz) ListApi(ctx context.Context, params *bo.ApiListApiReq) ([]*bo.ApiBO, bo.Pagination, error)

ListApi 获取api列表

func (*ApiBiz) UpdateApiById

func (b *ApiBiz) UpdateApiById(ctx context.Context, id uint32, apiBO *bo.ApiBO) (*bo.ApiBO, error)

UpdateApiById 更新api

func (*ApiBiz) UpdateApiStatusById

func (b *ApiBiz) UpdateApiStatusById(ctx context.Context, status vobj.Status, ids []uint32) error

UpdateApiStatusById 更新api状态

type CaptchaBiz

type CaptchaBiz struct {
	// contains filtered or unexported fields
}

func NewCaptchaBiz

func NewCaptchaBiz(captchaRepo repository.CaptchaRepo, logger log.Logger) *CaptchaBiz

func (*CaptchaBiz) GenerateCaptcha

func (b *CaptchaBiz) GenerateCaptcha(ctx context.Context, captchaType captcha.Type, theme captcha.Theme, size ...int) (*bo.CaptchaBO, error)

GenerateCaptcha 生成验证码

func (*CaptchaBiz) VerifyCaptcha

func (b *CaptchaBiz) VerifyCaptcha(ctx context.Context, codeId, codeValue string) error

VerifyCaptcha 验证验证码

type ChatGroupBiz

type ChatGroupBiz struct {
	// contains filtered or unexported fields
}

func NewChatGroupBiz

func NewChatGroupBiz(chatGroupRepo repository.ChatGroupRepo, logX repository.SysLogRepo, logger log.Logger) *ChatGroupBiz

NewChatGroupBiz .

func (*ChatGroupBiz) CreateChatGroup

func (b *ChatGroupBiz) CreateChatGroup(ctx context.Context, chatGroup *bo.ChatGroupBO) (*bo.ChatGroupBO, error)

CreateChatGroup 创建通知群机器人hook

func (*ChatGroupBiz) DeleteChatGroupById

func (b *ChatGroupBiz) DeleteChatGroupById(ctx context.Context, id uint32) error

DeleteChatGroupById 删除通知群机器人hook

func (*ChatGroupBiz) GetChatGroupById

func (b *ChatGroupBiz) GetChatGroupById(ctx context.Context, id uint32) (*bo.ChatGroupBO, error)

GetChatGroupById 获取通知群机器人hook

func (*ChatGroupBiz) ListChatGroup

func (b *ChatGroupBiz) ListChatGroup(ctx context.Context, req *bo.ListChatGroupReq) ([]*bo.ChatGroupBO, error)

ListChatGroup 获取通知群机器人hook列表

func (*ChatGroupBiz) UpdateChatGroupById

func (b *ChatGroupBiz) UpdateChatGroupById(ctx context.Context, chatGroup *bo.ChatGroupBO, id uint32) error

UpdateChatGroupById 更新通知群机器人hook

type DashboardBiz

type DashboardBiz struct {
	// contains filtered or unexported fields
}

func NewDashboardBiz

func NewDashboardBiz(
	dashboardRepo repository.DashboardRepo,
	chartRepo repository.ChartRepo,
	logX repository.SysLogRepo,
	logger log.Logger,
) *DashboardBiz

func (*DashboardBiz) CreateChart

func (l *DashboardBiz) CreateChart(ctx context.Context, chartInfo *bo.MyChartBO) (*bo.MyChartBO, error)

CreateChart 创建图表

func (*DashboardBiz) CreateDashboard

func (l *DashboardBiz) CreateDashboard(ctx context.Context, dashboardInfo *bo.MyDashboardConfigBO) (*bo.MyDashboardConfigBO, error)

CreateDashboard 创建dashboard

func (*DashboardBiz) DeleteChartById

func (l *DashboardBiz) DeleteChartById(ctx context.Context, chartId uint32) error

DeleteChartById 删除图表

func (*DashboardBiz) DeleteDashboardById

func (l *DashboardBiz) DeleteDashboardById(ctx context.Context, dashboardId uint32) error

DeleteDashboardById 删除dashboard

func (*DashboardBiz) GetChartDetail

func (l *DashboardBiz) GetChartDetail(ctx context.Context, chartId uint32) (*bo.MyChartBO, error)

GetChartDetail 获取图表详情

func (*DashboardBiz) GetDashboardById

func (l *DashboardBiz) GetDashboardById(ctx context.Context, dashboardId uint32) (*bo.MyDashboardConfigBO, error)

GetDashboardById 获取dashboard详情

func (*DashboardBiz) ListChartByPage

func (l *DashboardBiz) ListChartByPage(ctx context.Context, pgInfo bo.Pagination, scopes ...basescopes.ScopeMethod) ([]*bo.MyChartBO, error)

ListChartByPage 查询图表列表

func (*DashboardBiz) ListDashboard

func (l *DashboardBiz) ListDashboard(ctx context.Context, req *bo.ListDashboardReq) ([]*bo.MyDashboardConfigBO, error)

ListDashboard 查询dashboard列表

func (*DashboardBiz) UpdateChartById

func (l *DashboardBiz) UpdateChartById(ctx context.Context, chartId uint32, chartInfo *bo.MyChartBO) (*bo.MyChartBO, error)

UpdateChartById 更新图表

func (*DashboardBiz) UpdateDashboardById

func (l *DashboardBiz) UpdateDashboardById(ctx context.Context, dashboardId uint32, dashboardInfo *bo.MyDashboardConfigBO) (*bo.MyDashboardConfigBO, error)

UpdateDashboardById 更新dashboard

type DictBiz

type DictBiz struct {
	// contains filtered or unexported fields
}

func NewDictBiz

func NewDictBiz(dictRepo repository.PromDictRepo, logX repository.SysLogRepo, logger log.Logger) *DictBiz

NewDictBiz 实例化字典业务

func (*DictBiz) BatchUpdateDictStatus

func (b *DictBiz) BatchUpdateDictStatus(ctx context.Context, status vobj.Status, ids []uint32) error

BatchUpdateDictStatus 批量更新字典状态

func (*DictBiz) CreateDict

func (b *DictBiz) CreateDict(ctx context.Context, dict *bo.DictBO) (*bo.DictBO, error)

CreateDict 创建字典

func (*DictBiz) DeleteDictByIds

func (b *DictBiz) DeleteDictByIds(ctx context.Context, id ...uint32) error

DeleteDictByIds 删除字典

func (*DictBiz) GetDictById

func (b *DictBiz) GetDictById(ctx context.Context, id uint32) (*bo.DictBO, error)

GetDictById 获取字典详情

func (*DictBiz) ListDict

func (b *DictBiz) ListDict(ctx context.Context, req *bo.ListDictRequest) ([]*bo.DictBO, error)

ListDict 获取字典列表

func (*DictBiz) UpdateDict

func (b *DictBiz) UpdateDict(ctx context.Context, dictBO *bo.DictBO) (*bo.DictBO, error)

UpdateDict 更新字典

type EndpointBiz

type EndpointBiz struct {
	// contains filtered or unexported fields
}

func NewEndpointBiz

func NewEndpointBiz(endpointRepo repository.EndpointRepo, logX repository.SysLogRepo, logger log.Logger) *EndpointBiz

func (*EndpointBiz) AppendEndpoint

func (b *EndpointBiz) AppendEndpoint(ctx context.Context, endpoint *bo.CreateEndpointReq) (*bo.EndpointBO, error)

AppendEndpoint 新增

func (*EndpointBiz) DeleteEndpointById

func (b *EndpointBiz) DeleteEndpointById(ctx context.Context, ids ...uint32) error

DeleteEndpointById 删除

func (*EndpointBiz) DetailById

func (b *EndpointBiz) DetailById(ctx context.Context, id uint32) (*bo.EndpointBO, error)

DetailById 查询详情

func (*EndpointBiz) ListEndpoint

func (b *EndpointBiz) ListEndpoint(ctx context.Context, params *bo.ListEndpointReq) ([]*bo.EndpointBO, error)

ListEndpoint 查询

func (*EndpointBiz) UpdateEndpointById

func (b *EndpointBiz) UpdateEndpointById(ctx context.Context, endpoint *bo.UpdateEndpointReq) (*bo.EndpointBO, error)

UpdateEndpointById 更新

func (*EndpointBiz) UpdateStatusByIds

func (b *EndpointBiz) UpdateStatusByIds(ctx context.Context, ids []uint32, status vobj.Status) error

UpdateStatusByIds 批量更新状态

type HistoryBiz

type HistoryBiz struct {
	// contains filtered or unexported fields
}

HistoryBiz .

func NewHistoryBiz

func NewHistoryBiz(
	historyRepo repository.HistoryRepo,
	alarmPageRepo repository.PageRepo,
	msgRepo repository.MsgRepo,
	strategyRepo repository.StrategyRepo,
	alarmRealtimeBiz *AlarmRealtimeBiz,
	logX repository.SysLogRepo,
	logger log.Logger,
) *HistoryBiz

NewHistoryBiz .

func (*HistoryBiz) GetHistoryDetail

func (a *HistoryBiz) GetHistoryDetail(ctx context.Context, id uint32) (*bo.AlarmHistoryBO, error)

GetHistoryDetail 查询历史详情

func (*HistoryBiz) HandleHistory

func (a *HistoryBiz) HandleHistory(ctx context.Context, historyBO ...*bo.AlarmHistoryBO) ([]*bo.AlarmHistoryBO, error)

HandleHistory 维护告警数据

func (*HistoryBiz) ListHistory

func (a *HistoryBiz) ListHistory(ctx context.Context, req *bo.ListHistoryRequest) ([]*bo.AlarmHistoryBO, error)

ListHistory 查询历史列表

type NotifyBiz

type NotifyBiz struct {
	// contains filtered or unexported fields
}

func NewNotifyBiz

func NewNotifyBiz(
	repo repository.NotifyRepo,
	logX repository.SysLogRepo,
	msgRepo repository.MsgRepo,
	strategyRepo repository.StrategyRepo,
	userRepo repository.UserRepo,
	logger log.Logger,
) *NotifyBiz

func (*NotifyBiz) CheckNotifyName

func (b *NotifyBiz) CheckNotifyName(ctx context.Context, name string, id ...uint32) error

CheckNotifyName 检查通知名称是否存在

func (*NotifyBiz) CreateNotify

func (b *NotifyBiz) CreateNotify(ctx context.Context, notifyBo *bo.NotifyBO) (*bo.NotifyBO, error)

CreateNotify 创建通知对象

func (*NotifyBiz) DeleteNotifyById

func (b *NotifyBiz) DeleteNotifyById(ctx context.Context, id uint32) error

DeleteNotifyById 删除通知对象

func (*NotifyBiz) GetNotifyById

func (b *NotifyBiz) GetNotifyById(ctx context.Context, id uint32) (*bo.NotifyBO, error)

GetNotifyById 获取通知对象

func (*NotifyBiz) ListNotify

func (b *NotifyBiz) ListNotify(ctx context.Context, req *bo.ListNotifyRequest) ([]*bo.NotifyBO, error)

ListNotify 获取通知对象列表

func (*NotifyBiz) TestNotifyTemplate

func (b *NotifyBiz) TestNotifyTemplate(ctx context.Context, req *bo.TestNotifyTemplateParams) error

TestNotifyTemplate 测试告警消息

func (*NotifyBiz) UpdateNotifyById

func (b *NotifyBiz) UpdateNotifyById(ctx context.Context, id uint32, notifyBo *bo.NotifyBO) error

UpdateNotifyById 更新通知对象

type NotifyTemplateBiz

type NotifyTemplateBiz struct {
	repository.NotifyTemplateRepo
	// contains filtered or unexported fields
}

func NewNotifyTemplateBiz

func NewNotifyTemplateBiz(
	repo repository.NotifyTemplateRepo,
	logger log.Logger,
) *NotifyTemplateBiz

func (*NotifyTemplateBiz) CreateTemplate

CreateTemplate 创建通知模板

func (*NotifyTemplateBiz) DeleteTemplate

func (n *NotifyTemplateBiz) DeleteTemplate(ctx context.Context, templateId uint32) error

DeleteTemplate 删除通知模板

func (*NotifyTemplateBiz) GetTemplate

func (n *NotifyTemplateBiz) GetTemplate(ctx context.Context, templateId uint32) (*bo.NotifyTemplateBO, error)

GetTemplate 获取通知模板详情

func (*NotifyTemplateBiz) ListTemplate

ListTemplate 获取通知模板列表

func (*NotifyTemplateBiz) UpdateTemplate

func (n *NotifyTemplateBiz) UpdateTemplate(ctx context.Context, req *bo.NotifyTemplateUpdateBo) error

UpdateTemplate 更新通知模板

type PingBiz

type PingBiz struct {
	// contains filtered or unexported fields
}

PingBiz is a Ping useCase.

func NewPingRepo

func NewPingRepo(repo repository.PingRepo, logger log.Logger) *PingBiz

NewPingRepo new a Ping useCase.

func (*PingBiz) Ping

func (l *PingBiz) Ping(ctx context.Context, g *bo.Ping) (*bo.Ping, error)

Ping creates a Ping, and returns the new Ping.

type RoleBiz

type RoleBiz struct {
	// contains filtered or unexported fields
}

func NewRoleBiz

func NewRoleBiz(roleRepo repository.RoleRepo, apiRepo repository.ApiRepo, dataRepo repository.DataRepo, logX repository.SysLogRepo, logger log.Logger) *RoleBiz

func (*RoleBiz) CreateRole

func (b *RoleBiz) CreateRole(ctx context.Context, roleBO *bo.RoleBO) (*bo.RoleBO, error)

CreateRole 创建角色

func (*RoleBiz) DeleteRoleByIds

func (b *RoleBiz) DeleteRoleByIds(ctx context.Context, ids []uint32) error

DeleteRoleByIds 删除角色

func (*RoleBiz) GetRoleById

func (b *RoleBiz) GetRoleById(ctx context.Context, id uint32) (*bo.RoleBO, error)

GetRoleById 获取角色

func (*RoleBiz) ListRole

func (b *RoleBiz) ListRole(ctx context.Context, req *bo.ListRoleReq) ([]*bo.RoleBO, error)

ListRole 角色列表

func (*RoleBiz) RelateApiById

func (b *RoleBiz) RelateApiById(ctx context.Context, roleId uint32, apiIds []uint32) error

RelateApiById 关联角色和api

func (*RoleBiz) UpdateRoleById

func (b *RoleBiz) UpdateRoleById(ctx context.Context, roleBO *bo.RoleBO) (*bo.RoleBO, error)

UpdateRoleById 更新角色

func (*RoleBiz) UpdateRoleStatusById

func (b *RoleBiz) UpdateRoleStatusById(ctx context.Context, status vobj.Status, ids []uint32) error

UpdateRoleStatusById 更新角色状态

type StrategyBiz

type StrategyBiz struct {
	// contains filtered or unexported fields
}

func NewStrategyBiz

func NewStrategyBiz(strategyRepo repository.StrategyRepo, notifyRepo repository.NotifyRepo, logX repository.SysLogRepo, logger log.Logger) *StrategyBiz

NewStrategyBiz 创建策略业务对象

func (*StrategyBiz) BatchUpdateStrategyStatusByIds

func (b *StrategyBiz) BatchUpdateStrategyStatusByIds(ctx context.Context, status vobj.Status, ids []uint32) error

BatchUpdateStrategyStatusByIds 批量更新策略状态

func (*StrategyBiz) BindStrategyNotifyObject

func (b *StrategyBiz) BindStrategyNotifyObject(ctx context.Context, strategyId uint32, notifyIds []uint32) error

BindStrategyNotifyObject 绑定策略的通知对象

func (*StrategyBiz) CreateStrategy

func (b *StrategyBiz) CreateStrategy(ctx context.Context, strategyBO *bo.StrategyBO) (*bo.StrategyBO, error)

CreateStrategy 创建策略

func (*StrategyBiz) DeleteStrategyByIds

func (b *StrategyBiz) DeleteStrategyByIds(ctx context.Context, ids ...uint32) error

DeleteStrategyByIds 删除策略

func (*StrategyBiz) ExportStrategy

func (b *StrategyBiz) ExportStrategy(ctx context.Context, req *bo.ExportStrategyRequest) ([]*bo.StrategyBO, error)

ExportStrategy 导出策略

func (*StrategyBiz) GetStrategyById

func (b *StrategyBiz) GetStrategyById(ctx context.Context, id uint32) (*bo.StrategyBO, error)

GetStrategyById 获取策略详情

func (*StrategyBiz) GetStrategyWithNotifyObjectById

func (b *StrategyBiz) GetStrategyWithNotifyObjectById(ctx context.Context, id uint32) (*bo.StrategyBO, error)

GetStrategyWithNotifyObjectById 获取策略详情(包含通知对象)

func (*StrategyBiz) ListStrategy

func (b *StrategyBiz) ListStrategy(ctx context.Context, req *bo.ListStrategyRequest) ([]*bo.StrategyBO, error)

ListStrategy 获取策略列表

func (*StrategyBiz) SelectStrategy

func (b *StrategyBiz) SelectStrategy(ctx context.Context, req *bo.SelectStrategyRequest) ([]*bo.StrategyBO, error)

SelectStrategy 查询策略

func (*StrategyBiz) UpdateStrategyById

func (b *StrategyBiz) UpdateStrategyById(ctx context.Context, id uint32, strategyBO *bo.StrategyBO) (*bo.StrategyBO, error)

UpdateStrategyById 更新策略

type StrategyGroupBiz

type StrategyGroupBiz struct {
	// contains filtered or unexported fields
}

func NewStrategyGroupBiz

func NewStrategyGroupBiz(strategyGroupRepo repository.StrategyGroupRepo, logX repository.SysLogRepo, logger log.Logger) *StrategyGroupBiz

func (*StrategyGroupBiz) BatchCreate

func (l *StrategyGroupBiz) BatchCreate(ctx context.Context, strategyGroups []*bo.StrategyGroupBO) ([]*bo.StrategyGroupBO, error)

BatchCreate 批量创建

func (*StrategyGroupBiz) BatchUpdateStatus

func (l *StrategyGroupBiz) BatchUpdateStatus(ctx context.Context, status vobj.Status, ids []uint32) error

func (*StrategyGroupBiz) Create

func (l *StrategyGroupBiz) Create(ctx context.Context, strategyGroup *bo.StrategyGroupBO) (*bo.StrategyGroupBO, error)

func (*StrategyGroupBiz) DeleteByIds

func (l *StrategyGroupBiz) DeleteByIds(ctx context.Context, ids ...uint32) error

func (*StrategyGroupBiz) GetById

func (l *StrategyGroupBiz) GetById(ctx context.Context, id uint32) (*bo.StrategyGroupBO, error)

func (*StrategyGroupBiz) List

func (*StrategyGroupBiz) ListAllLimit

func (l *StrategyGroupBiz) ListAllLimit(ctx context.Context, limit int, scopes ...basescopes.ScopeMethod) ([]*bo.StrategyGroupBO, error)

func (*StrategyGroupBiz) UpdateById

func (l *StrategyGroupBiz) UpdateById(ctx context.Context, strategyGroup *bo.StrategyGroupBO) (*bo.StrategyGroupBO, error)

type SysLogBiz

type SysLogBiz struct {
	repository.SysLogRepo
	// contains filtered or unexported fields
}

func NewSysLogBiz

func NewSysLogBiz(repo repository.SysLogRepo, logger log.Logger) *SysLogBiz

func (*SysLogBiz) ListSysLog

func (b *SysLogBiz) ListSysLog(ctx context.Context, req *bo.ListSyslogReq) ([]*bo.SysLogBo, error)

ListSysLog 获取日志列表

type UserBiz

type UserBiz struct {
	// contains filtered or unexported fields
}

func NewUserBiz

func NewUserBiz(
	userRepo repository.UserRepo,
	dataRepo repository.DataRepo,
	roleRepo repository.RoleRepo,
	logX repository.SysLogRepo,
	logger log.Logger,
) *UserBiz

func (*UserBiz) CheckNewUser

func (b *UserBiz) CheckNewUser(ctx context.Context, userBo *bo.UserBO) error

CheckNewUser 检查新用户信息

func (*UserBiz) CreateUser

func (b *UserBiz) CreateUser(ctx context.Context, userBo *bo.UserBO) (*bo.UserBO, error)

CreateUser 创建用户

func (*UserBiz) DeleteUserByIds

func (b *UserBiz) DeleteUserByIds(ctx context.Context, ids []uint32) error

DeleteUserByIds 删除用户

func (*UserBiz) EditUserPassword

func (b *UserBiz) EditUserPassword(ctx context.Context, authClaims *middler.AuthClaims, oldPassword, newPassword string) (*bo.UserBO, error)

EditUserPassword 修改密码

func (*UserBiz) GetUserInfoById

func (b *UserBiz) GetUserInfoById(ctx context.Context, id uint32) (*bo.UserBO, error)

GetUserInfoById 获取用户信息

func (*UserBiz) GetUserList

func (b *UserBiz) GetUserList(ctx context.Context, params *bo.GetUserListReq) ([]*bo.UserBO, error)

GetUserList 获取用户列表

func (*UserBiz) LoginByUsernameAndPassword

func (b *UserBiz) LoginByUsernameAndPassword(ctx context.Context, username, pwd string) (userBO *bo.UserBO, token string, err error)

LoginByUsernameAndPassword 登录

func (*UserBiz) Logout

func (b *UserBiz) Logout(ctx context.Context, authClaims *middler.AuthClaims) error

Logout 退出登录

func (*UserBiz) RefreshToken

func (b *UserBiz) RefreshToken(ctx context.Context, authClaims *middler.AuthClaims, roleId uint32) (userBO *bo.UserBO, token string, err error)

RefreshToken 刷新token

func (*UserBiz) RelateRoles

func (b *UserBiz) RelateRoles(ctx context.Context, userId uint32, roleIds []uint32) error

RelateRoles 关联角色

func (*UserBiz) UpdateUserById

func (b *UserBiz) UpdateUserById(ctx context.Context, id uint32, userBo *bo.UserBO) (*bo.UserBO, error)

UpdateUserById 更新用户信息

func (*UserBiz) UpdateUserRoleRelation

func (b *UserBiz) UpdateUserRoleRelation(userId uint32)

UpdateUserRoleRelation 更新用户角色关系

func (*UserBiz) UpdateUserStatusById

func (b *UserBiz) UpdateUserStatusById(ctx context.Context, status vobj.Status, ids []uint32) error

UpdateUserStatusById 更新用户状态

Directories

Path Synopsis
do

Jump to

Keyboard shortcuts

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