biz

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 24 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUserNotFound is user not found.
	ErrUserNotFound = errors.NotFound(v1.ErrorReason_USER_NOT_FOUND.String(), "user not found")
)

ProviderSetBiz is biz providers.

Functions

This section is empty.

Types

type AlarmBiz

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

AlarmBiz 告警相关业务逻辑

func NewAlarmBiz

func NewAlarmBiz(alarmRepository repository.Alarm) *AlarmBiz

NewAlarmBiz 创建告警相关业务逻辑

func (*AlarmBiz) GetRealTimeAlarm

func (b *AlarmBiz) GetRealTimeAlarm(ctx context.Context, params *bo.GetRealTimeAlarmParams) (*bizmodel.RealtimeAlarm, error)

GetRealTimeAlarm 获取实时告警明细

func (*AlarmBiz) ListRealTimeAlarms

func (b *AlarmBiz) ListRealTimeAlarms(ctx context.Context, params *bo.GetRealTimeAlarmsParams) ([]*bizmodel.RealtimeAlarm, error)

ListRealTimeAlarms 获取实时告警列表

type AlarmGroupBiz

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

AlarmGroupBiz 告警分组业务

func NewAlarmGroupBiz

func NewAlarmGroupBiz(strategy repository.AlarmGroup) *AlarmGroupBiz

NewAlarmGroupBiz 创建告警分组业务

func (*AlarmGroupBiz) CreateAlarmGroup

CreateAlarmGroup 创建告警分组

func (*AlarmGroupBiz) DeleteAlarmGroup

func (s *AlarmGroupBiz) DeleteAlarmGroup(ctx context.Context, alarmID uint32) error

DeleteAlarmGroup 删除告警分组

func (*AlarmGroupBiz) GetAlarmGroupDetail

func (s *AlarmGroupBiz) GetAlarmGroupDetail(ctx context.Context, groupID uint32) (*bizmodel.AlarmNoticeGroup, error)

GetAlarmGroupDetail 获取告警分组详情

func (*AlarmGroupBiz) ListPage

ListPage 分页查询告警分组

func (*AlarmGroupBiz) MyAlarmGroups

MyAlarmGroups 查询我的告警分组

func (*AlarmGroupBiz) UpdateAlarmGroup

func (s *AlarmGroupBiz) UpdateAlarmGroup(ctx context.Context, params *bo.UpdateAlarmNoticeGroupParams) error

UpdateAlarmGroup 更新告警分组

func (*AlarmGroupBiz) UpdateStatus

UpdateStatus 更新告警分组状态

type AlarmHookBiz

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

AlarmHookBiz is a greeter service.

func NewAlarmHookBiz

func NewAlarmHookBiz(alarmHook repository.AlarmHook) *AlarmHookBiz

NewAlarmHookBiz new AlarmHookBiz

func (*AlarmHookBiz) CreateAlarmHook

func (s *AlarmHookBiz) CreateAlarmHook(ctx context.Context, params *bo.CreateAlarmHookParams) (*bizmodel.AlarmHook, error)

CreateAlarmHook create alarm hook

func (*AlarmHookBiz) DeleteAlarmHook

func (s *AlarmHookBiz) DeleteAlarmHook(ctx context.Context, ID uint32) error

DeleteAlarmHook delete alarm hook

func (*AlarmHookBiz) GetAlarmHook

func (s *AlarmHookBiz) GetAlarmHook(ctx context.Context, ID uint32) (*bizmodel.AlarmHook, error)

GetAlarmHook get alarm hook

func (*AlarmHookBiz) ListPage

ListPage list alarm hook page

func (*AlarmHookBiz) UpdateAlarmHook

func (s *AlarmHookBiz) UpdateAlarmHook(ctx context.Context, params *bo.UpdateAlarmHookParams) error

UpdateAlarmHook update alarm hook

func (*AlarmHookBiz) UpdateStatus

func (s *AlarmHookBiz) UpdateStatus(ctx context.Context, params *bo.UpdateAlarmHookStatusParams) error

UpdateStatus update alarm hook status

type AlarmPageBiz

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

AlarmPageBiz 告警页面管理功能

func NewAlarmPageBiz

func NewAlarmPageBiz(alarmPageRepository repository.AlarmPage) *AlarmPageBiz

NewAlarmPageBiz 创建告警页面管理功能

func (*AlarmPageBiz) ListAlarmPage

func (b *AlarmPageBiz) ListAlarmPage(ctx context.Context, userID uint32) ([]*bizmodel.AlarmPageSelf, error)

ListAlarmPage 告警页面列表

func (*AlarmPageBiz) UpdateAlarmPage

func (b *AlarmPageBiz) UpdateAlarmPage(ctx context.Context, userID uint32, alarmPageIDs []uint32) error

UpdateAlarmPage 更新告警页面

type AuthorizationBiz

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

AuthorizationBiz 授权业务

func NewAuthorizationBiz

func NewAuthorizationBiz(
	bc *palaceconf.Bootstrap,
	userRepo repository.User,
	teamRepo repository.Team,
	cacheRepo repository.Cache,
	teamRoleRepo repository.TeamRole,
	oAuthRepo repository.OAuth,
) *AuthorizationBiz

NewAuthorizationBiz 创建授权业务

func (*AuthorizationBiz) CheckPermission

CheckPermission 检查用户是否有该资源权限

func (*AuthorizationBiz) CheckToken

func (b *AuthorizationBiz) CheckToken(ctx context.Context, req *bo.CheckTokenParams) (*model.SysUser, error)

CheckToken 检查token

func (*AuthorizationBiz) GetOAuthConf

func (b *AuthorizationBiz) GetOAuthConf(provider vobj.OAuthAPP) *oauth2.Config

GetOAuthConf 获取oauth配置

func (*AuthorizationBiz) Login

func (b *AuthorizationBiz) Login(ctx context.Context, req *bo.LoginParams) (*bo.LoginReply, error)

Login 登录

func (*AuthorizationBiz) Logout

func (b *AuthorizationBiz) Logout(ctx context.Context, params *bo.LogoutParams) error

Logout 登出

func (*AuthorizationBiz) OAuthLogin

func (b *AuthorizationBiz) OAuthLogin(ctx context.Context, provider vobj.OAuthAPP, code string) (string, error)

OAuthLogin oauth登录

func (*AuthorizationBiz) OAuthLoginVerifyEmail

func (b *AuthorizationBiz) OAuthLoginVerifyEmail(ctx context.Context, e string) error

OAuthLoginVerifyEmail 验证邮箱

func (*AuthorizationBiz) OauthLogin

func (b *AuthorizationBiz) OauthLogin(ctx context.Context, oauthParams *auth.OauthLoginParams) (*bo.RefreshTokenReply, error)

func (*AuthorizationBiz) RefreshToken

RefreshToken 刷新token

type CaptchaBiz

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

CaptchaBiz 验证码业务

func NewCaptchaBiz

func NewCaptchaBiz(captchaRepo repository.Captcha) *CaptchaBiz

NewCaptchaBiz 创建验证码业务

func (*CaptchaBiz) GenerateCaptcha

func (l *CaptchaBiz) GenerateCaptcha(ctx context.Context, params *bo.GenerateCaptchaParams) (*bo.CaptchaItem, error)

GenerateCaptcha 生成验证码

func (*CaptchaBiz) VerifyCaptcha

func (l *CaptchaBiz) VerifyCaptcha(ctx context.Context, params *bo.ValidateCaptchaParams) error

VerifyCaptcha 验证验证码

type DashboardBiz

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

DashboardBiz 仪表盘业务

func NewDashboardBiz

func NewDashboardBiz(dashboardRepository repository.Dashboard) *DashboardBiz

NewDashboardBiz 创建仪表盘业务

func (*DashboardBiz) CreateDashboard

func (b *DashboardBiz) CreateDashboard(ctx context.Context, req *bo.AddDashboardParams) error

CreateDashboard 创建仪表盘

func (*DashboardBiz) DeleteDashboard

func (b *DashboardBiz) DeleteDashboard(ctx context.Context, req *bo.DeleteDashboardParams) error

DeleteDashboard 删除仪表盘

func (*DashboardBiz) GetDashboard

func (b *DashboardBiz) GetDashboard(ctx context.Context, id uint32) (*bizmodel.Dashboard, error)

GetDashboard 获取仪表盘

func (*DashboardBiz) ListDashboard

func (b *DashboardBiz) ListDashboard(ctx context.Context, params *bo.ListDashboardParams) ([]*bizmodel.Dashboard, error)

ListDashboard 获取仪表盘列表

func (*DashboardBiz) UpdateDashboard

func (b *DashboardBiz) UpdateDashboard(ctx context.Context, req *bo.UpdateDashboardParams) error

UpdateDashboard 更新仪表盘

type DatasourceBiz

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

DatasourceBiz 数据源业务

func NewDatasourceBiz

func NewDatasourceBiz(
	datasourceRepository repository.Datasource,
	datasourceMetricRepository repository.DatasourceMetric,
	datasourceMetricMicroRepository microrepository.DatasourceMetric,
	lock repository.Lock,
) *DatasourceBiz

NewDatasourceBiz 创建数据源业务

func (*DatasourceBiz) CreateDatasource

func (b *DatasourceBiz) CreateDatasource(ctx context.Context, datasource *bo.CreateDatasourceParams) (*bizmodel.Datasource, error)

CreateDatasource 创建数据源

func (*DatasourceBiz) DeleteDatasource

func (b *DatasourceBiz) DeleteDatasource(ctx context.Context, id uint32) error

DeleteDatasource 删除数据源

func (*DatasourceBiz) GetDatasource

func (b *DatasourceBiz) GetDatasource(ctx context.Context, id uint32) (*bizmodel.Datasource, error)

GetDatasource 获取数据源详情

func (*DatasourceBiz) GetDatasourceSelect

func (b *DatasourceBiz) GetDatasourceSelect(ctx context.Context, params *bo.QueryDatasourceListParams) ([]*bo.SelectOptionBo, error)

GetDatasourceSelect 获取数据源下拉列表

func (*DatasourceBiz) ListDatasource

func (b *DatasourceBiz) ListDatasource(ctx context.Context, params *bo.QueryDatasourceListParams) ([]*bizmodel.Datasource, error)

ListDatasource 获取数据源列表

func (*DatasourceBiz) Query

Query 查询数据

func (*DatasourceBiz) SyncDatasourceMeta

func (b *DatasourceBiz) SyncDatasourceMeta(ctx context.Context, id uint32) error

SyncDatasourceMeta 同步数据源元数据

func (*DatasourceBiz) SyncDatasourceMetaV2

func (b *DatasourceBiz) SyncDatasourceMetaV2(ctx context.Context, id uint32) error

SyncDatasourceMetaV2 同步数据源元数据

func (*DatasourceBiz) UpdateDatasourceBaseInfo

func (b *DatasourceBiz) UpdateDatasourceBaseInfo(ctx context.Context, datasource *bo.UpdateDatasourceBaseInfoParams) error

UpdateDatasourceBaseInfo 更新数据源

func (*DatasourceBiz) UpdateDatasourceConfig

func (b *DatasourceBiz) UpdateDatasourceConfig(ctx context.Context, datasource *bo.UpdateDatasourceConfigParams) error

UpdateDatasourceConfig 更新数据源配置

func (*DatasourceBiz) UpdateDatasourceStatus

func (b *DatasourceBiz) UpdateDatasourceStatus(ctx context.Context, status vobj.Status, ids ...uint32) error

UpdateDatasourceStatus 更新数据源状态

type DictBiz

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

DictBiz 字典业务

func NewDictBiz

func NewDictBiz(dictRepo repository.Dict) *DictBiz

NewDictBiz 创建字典业务

func (*DictBiz) CreateDict

func (b *DictBiz) CreateDict(ctx context.Context, dictParam *bo.CreateDictParams) (imodel.IDict, error)

CreateDict 创建字典

func (*DictBiz) DeleteDictByID

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

DeleteDictByID 删除字典

func (*DictBiz) GetDict

func (b *DictBiz) GetDict(ctx context.Context, id uint32) (imodel.IDict, error)

GetDict 获取字典

func (*DictBiz) ListDict

func (b *DictBiz) ListDict(ctx context.Context, listParam *bo.QueryDictListParams) ([]imodel.IDict, error)

ListDict 列表字典

func (*DictBiz) UpdateDict

func (b *DictBiz) UpdateDict(ctx context.Context, updateParam *bo.UpdateDictParams) error

UpdateDict 更新字典

func (*DictBiz) UpdateDictStatusByIds

func (b *DictBiz) UpdateDictStatusByIds(ctx context.Context, updateParams *bo.UpdateDictStatusParams) error

UpdateDictStatusByIds 更新字典状态

type Greeter

type Greeter struct {
	Hello string
}

Greeter is a Greeter model.

type GreeterRepo

type GreeterRepo interface {
	Save(context.Context, *Greeter) (*Greeter, error)
	Update(context.Context, *Greeter) (*Greeter, error)
	FindByID(context.Context, int64) (*Greeter, error)
	ListByHello(context.Context, string) ([]*Greeter, error)
	ListAll(context.Context) ([]*Greeter, error)
}

GreeterRepo is a Greater repo.

type GreeterUsecase

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

GreeterUsecase is a Greeter usecase.

func NewGreeterUsecase

func NewGreeterUsecase(repo GreeterRepo) *GreeterUsecase

NewGreeterUsecase new a Greeter usecase.

func (*GreeterUsecase) CreateGreeter

func (uc *GreeterUsecase) CreateGreeter(ctx context.Context, g *Greeter) (*Greeter, error)

CreateGreeter creates a Greeter, and returns the new Greeter.

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

MenuBiz 菜单业务

func NewMenuBiz

func NewMenuBiz(teamMenuRepo repository.TeamMenu, msgRepo repository.Msg, menuRepo repository.Menu) *MenuBiz

NewMenuBiz 菜单业务

func (b *MenuBiz) BatchCreateMenu(ctx context.Context, params []*bo.CreateMenuParams) error

BatchCreateMenu 批量创建菜单

func (b *MenuBiz) DeleteMenu(ctx context.Context, menuID uint32) error

DeleteMenu 删除菜单

func (b *MenuBiz) GetMenu(ctx context.Context, menuID uint32) (*model.SysMenu, error)

GetMenu 获取菜单详情

func (b *MenuBiz) ListMenuPage(ctx context.Context, params *bo.QueryMenuListParams) ([]*model.SysMenu, error)

ListMenuPage 分页菜单列表

func (b *MenuBiz) MenuAllList(ctx context.Context) ([]*model.SysMenu, error)

MenuAllList 获取所有菜单

func (b *MenuBiz) MenuList(ctx context.Context) ([]*bizmodel.SysTeamMenu, error)

MenuList 菜单列表

func (b *MenuBiz) UpdateMenu(ctx context.Context, params *bo.UpdateMenuParams) error

UpdateMenu 更新菜单

func (b *MenuBiz) UpdateMenuStatus(ctx context.Context, params *bo.UpdateMenuStatusParams) error

UpdateMenuStatus 更新菜单状态

func (b *MenuBiz) UpdateMenuTypes(ctx context.Context, params *bo.UpdateMenuTypeParams) error

UpdateMenuTypes 更新菜单类型

type MetricBiz

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

MetricBiz 指标业务

func NewMetricBiz

func NewMetricBiz(metricRepository repository.Metric, lock repository.Lock) *MetricBiz

NewMetricBiz 创建指标业务

func (*MetricBiz) CreateMetric

func (b *MetricBiz) CreateMetric(ctx context.Context, params *bo.CreateMetricParams) error

CreateMetric 创建指标信息

func (*MetricBiz) DeleteMetricByID

func (b *MetricBiz) DeleteMetricByID(ctx context.Context, id uint32) error

DeleteMetricByID 通过ID删除指标信息

func (*MetricBiz) GetMetricByID

func (b *MetricBiz) GetMetricByID(ctx context.Context, params *bo.GetMetricParams) (detail *bizmodel.DatasourceMetric, err error)

GetMetricByID 通过ID获取指标信息

func (*MetricBiz) GetMetricLabelCount

func (b *MetricBiz) GetMetricLabelCount(ctx context.Context, metricID uint32) (uint32, error)

GetMetricLabelCount 获取指标标签数量

func (*MetricBiz) ListMetric

func (b *MetricBiz) ListMetric(ctx context.Context, params *bo.QueryMetricListParams) ([]*bizmodel.DatasourceMetric, error)

ListMetric 获取指标列表

func (*MetricBiz) SelectMetric

func (b *MetricBiz) SelectMetric(ctx context.Context, params *bo.QueryMetricListParams) ([]*bo.SelectOptionBo, error)

SelectMetric 获取指标列表

func (*MetricBiz) UpdateMetricByID

func (b *MetricBiz) UpdateMetricByID(ctx context.Context, params *bo.UpdateMetricParams) error

UpdateMetricByID 通过ID修改指标信息

type ResourceBiz

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

ResourceBiz 资源业务

func NewResourceBiz

func NewResourceBiz(resourceRepo repository.Resource) *ResourceBiz

NewResourceBiz 创建资源业务

func (*ResourceBiz) GetResource

func (b *ResourceBiz) GetResource(ctx context.Context, id uint32) (*model.SysAPI, error)

GetResource 获取资源详情

func (*ResourceBiz) GetResourceSelectList

func (b *ResourceBiz) GetResourceSelectList(ctx context.Context, params *bo.QueryResourceListParams) ([]*bo.SelectOptionBo, error)

GetResourceSelectList 获取资源下拉列表

func (*ResourceBiz) ListResource

func (b *ResourceBiz) ListResource(ctx context.Context, params *bo.QueryResourceListParams) ([]*model.SysAPI, error)

ListResource 获取资源列表

func (*ResourceBiz) UpdateResourceStatus

func (b *ResourceBiz) UpdateResourceStatus(ctx context.Context, status vobj.Status, ids ...uint32) error

UpdateResourceStatus 更新资源状态

type StrategyBiz

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

StrategyBiz 策略业务

func NewStrategyBiz

func NewStrategyBiz(dictRepo repository.Strategy, strategyRPCRepo microrepository.Strategy) *StrategyBiz

NewStrategyBiz 创建策略业务

func (*StrategyBiz) CopyStrategy

func (b *StrategyBiz) CopyStrategy(ctx context.Context, strategyID uint32) (*bizmodel.Strategy, error)

CopyStrategy 复制策略

func (*StrategyBiz) CreateStrategy

func (b *StrategyBiz) CreateStrategy(ctx context.Context, param *bo.CreateStrategyParams) (*bizmodel.Strategy, error)

CreateStrategy 创建策略

func (*StrategyBiz) DeleteByID

func (b *StrategyBiz) DeleteByID(ctx context.Context, strategyID uint32) error

DeleteByID 删除策略

func (*StrategyBiz) Eval

func (b *StrategyBiz) Eval(ctx context.Context, strategy *bo.Strategy) (*bo.Alarm, error)

Eval 策略评估

func (*StrategyBiz) GetStrategy

func (b *StrategyBiz) GetStrategy(ctx context.Context, strategyID uint32) (*bizmodel.Strategy, error)

GetStrategy 获取策略

func (*StrategyBiz) PushStrategy

func (b *StrategyBiz) PushStrategy(ctx context.Context, strategies []*bo.Strategy) error

PushStrategy 推送策略

func (*StrategyBiz) StrategyPage

func (b *StrategyBiz) StrategyPage(ctx context.Context, param *bo.QueryStrategyListParams) ([]*bizmodel.Strategy, error)

StrategyPage 获取策略分页

func (*StrategyBiz) UpdateByID

func (b *StrategyBiz) UpdateByID(ctx context.Context, param *bo.UpdateStrategyParams) error

UpdateByID 更新策略

func (*StrategyBiz) UpdateStatus

func (b *StrategyBiz) UpdateStatus(ctx context.Context, param *bo.UpdateStrategyStatusParams) error

UpdateStatus 更新策略状态

type StrategyCountBiz

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

StrategyCountBiz 策略计数业务

func NewStrategyCountBiz

func NewStrategyCountBiz(strategyCount repository.StrategyCountRepo) *StrategyCountBiz

NewStrategyCountBiz 创建策略计数业务

func (*StrategyCountBiz) StrategyCount

StrategyCount 策略分组关联策略总数

type StrategyGroupBiz

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

StrategyGroupBiz 策略分组业务

func NewStrategyGroupBiz

func NewStrategyGroupBiz(strategy repository.StrategyGroup) *StrategyGroupBiz

NewStrategyGroupBiz 创建策略分组业务

func (*StrategyGroupBiz) CreateStrategyGroup

func (s *StrategyGroupBiz) CreateStrategyGroup(ctx context.Context, params *bo.CreateStrategyGroupParams) (*bizmodel.StrategyGroup, error)

CreateStrategyGroup 创建策略分组

func (*StrategyGroupBiz) DeleteStrategyGroup

func (s *StrategyGroupBiz) DeleteStrategyGroup(ctx context.Context, params *bo.DelStrategyGroupParams) error

DeleteStrategyGroup 删除策略分组

func (*StrategyGroupBiz) GetStrategyGroupDetail

func (s *StrategyGroupBiz) GetStrategyGroupDetail(ctx context.Context, groupID uint32) (*bizmodel.StrategyGroup, error)

GetStrategyGroupDetail 获取策略分组详情

func (*StrategyGroupBiz) ListPage

ListPage 分页查询策略分组

func (*StrategyGroupBiz) UpdateStatus

UpdateStatus 更新策略分组状态

func (*StrategyGroupBiz) UpdateStrategyGroup

func (s *StrategyGroupBiz) UpdateStrategyGroup(ctx context.Context, params *bo.UpdateStrategyGroupParams) error

UpdateStrategyGroup 更新策略分组

type SubscriberBiz

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

SubscriberBiz 订阅相关业务

func NewSubscriptionStrategyBiz

func NewSubscriptionStrategyBiz(strategyRepo repository.SubscriberStrategy) *SubscriberBiz

NewSubscriptionStrategyBiz 创建订阅相关业务

func (*SubscriberBiz) StrategySubscribersList

func (s *SubscriberBiz) StrategySubscribersList(ctx context.Context, params *bo.QueryStrategySubscriberParams) ([]*bizmodel.StrategySubscriber, error)

StrategySubscribersList 策略订阅用户列表

func (*SubscriberBiz) UnSubscriptionStrategy

func (s *SubscriberBiz) UnSubscriptionStrategy(ctx context.Context, params *bo.UnSubscriberStrategyParams) error

UnSubscriptionStrategy 取消订阅策略

func (*SubscriberBiz) UserSubscriptionStrategy

func (s *SubscriberBiz) UserSubscriptionStrategy(ctx context.Context, params *bo.SubscriberStrategyParams) error

UserSubscriptionStrategy 当前用户订阅策略

func (*SubscriberBiz) UserSubscriptionStrategyList

func (s *SubscriberBiz) UserSubscriptionStrategyList(ctx context.Context, params *bo.QueryUserSubscriberParams) ([]*bizmodel.StrategySubscriber, error)

UserSubscriptionStrategyList 当前用户订阅策略列表

type TeamBiz

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

TeamBiz 团队业务

func NewTeamBiz

func NewTeamBiz(teamRepo repository.Team) *TeamBiz

NewTeamBiz 创建团队业务

func (*TeamBiz) AddTeamMember

func (t *TeamBiz) AddTeamMember(ctx context.Context, params *bo.AddTeamMemberParams) error

AddTeamMember 添加团队成员

func (*TeamBiz) CreateTeam

func (t *TeamBiz) CreateTeam(ctx context.Context, params *bo.CreateTeamParams) (*model.SysTeam, error)

CreateTeam 创建团队

func (*TeamBiz) GetTeam

func (t *TeamBiz) GetTeam(ctx context.Context, teamID uint32) (*model.SysTeam, error)

GetTeam 获取团队信息

func (*TeamBiz) GetUserTeamList

func (t *TeamBiz) GetUserTeamList(ctx context.Context, userID uint32) ([]*model.SysTeam, error)

GetUserTeamList 获取用户团队列表

func (*TeamBiz) ListTeam

func (t *TeamBiz) ListTeam(ctx context.Context, params *bo.QueryTeamListParams) ([]*model.SysTeam, error)

ListTeam 获取团队列表

func (*TeamBiz) ListTeamMember

func (t *TeamBiz) ListTeamMember(ctx context.Context, params *bo.ListTeamMemberParams) ([]*bizmodel.SysTeamMember, error)

ListTeamMember 获取团队成员列表

func (*TeamBiz) RemoveTeamMember

func (t *TeamBiz) RemoveTeamMember(ctx context.Context, params *bo.RemoveTeamMemberParams) error

RemoveTeamMember 移除团队成员

func (*TeamBiz) SetMemberRole

func (t *TeamBiz) SetMemberRole(ctx context.Context, params *bo.SetMemberRoleParams) error

SetMemberRole 设置团队成员角色

func (*TeamBiz) SetTeamAdmin

func (t *TeamBiz) SetTeamAdmin(ctx context.Context, params *bo.SetMemberAdminParams) error

SetTeamAdmin 设置团队管理员

func (*TeamBiz) SetTeamMailConfig

func (t *TeamBiz) SetTeamMailConfig(ctx context.Context, params *bo.SetTeamMailConfigParams) error

SetTeamMailConfig 设置团队邮件配置

func (*TeamBiz) TransferTeamLeader

func (t *TeamBiz) TransferTeamLeader(ctx context.Context, params *bo.TransferTeamLeaderParams) error

TransferTeamLeader 移交团队领导

func (*TeamBiz) UpdateTeam

func (t *TeamBiz) UpdateTeam(ctx context.Context, team *bo.UpdateTeamParams) error

UpdateTeam 更新团队

func (*TeamBiz) UpdateTeamStatus

func (t *TeamBiz) UpdateTeamStatus(ctx context.Context, status vobj.Status, ids ...uint32) error

UpdateTeamStatus 更新团队状态

type TeamRoleBiz

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

TeamRoleBiz 团队角色业务

func NewTeamRoleBiz

func NewTeamRoleBiz(teamRoleRepo repository.TeamRole) *TeamRoleBiz

NewTeamRoleBiz 创建团队角色业务

func (*TeamRoleBiz) CreateTeamRole

func (b *TeamRoleBiz) CreateTeamRole(ctx context.Context, teamRole *bo.CreateTeamRoleParams) (*bizmodel.SysTeamRole, error)

CreateTeamRole 创建团队角色

func (*TeamRoleBiz) DeleteTeamRole

func (b *TeamRoleBiz) DeleteTeamRole(ctx context.Context, id uint32) error

DeleteTeamRole 删除团队角色

func (*TeamRoleBiz) GetTeamRole

func (b *TeamRoleBiz) GetTeamRole(ctx context.Context, id uint32) (*bizmodel.SysTeamRole, error)

GetTeamRole 获取团队角色

func (*TeamRoleBiz) ListTeamRole

func (b *TeamRoleBiz) ListTeamRole(ctx context.Context, params *bo.ListTeamRoleParams) ([]*bizmodel.SysTeamRole, error)

ListTeamRole 获取团队角色列表

func (*TeamRoleBiz) UpdateTeamRole

func (b *TeamRoleBiz) UpdateTeamRole(ctx context.Context, teamRole *bo.UpdateTeamRoleParams) error

UpdateTeamRole 更新团队角色

func (*TeamRoleBiz) UpdateTeamRoleStatus

func (b *TeamRoleBiz) UpdateTeamRoleStatus(ctx context.Context, status vobj.Status, ids ...uint32) error

UpdateTeamRoleStatus 更新团队角色状态

type TemplateBiz

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

TemplateBiz 模板管理业务

func NewTemplateBiz

func NewTemplateBiz(templateRepository repository.Template) *TemplateBiz

NewTemplateBiz 创建模板管理业务

func (*TemplateBiz) CreateTemplateStrategy

func (b *TemplateBiz) CreateTemplateStrategy(ctx context.Context, templateStrategy *bo.CreateTemplateStrategyParams) error

CreateTemplateStrategy 创建模板策略

func (*TemplateBiz) DeleteTemplateStrategy

func (b *TemplateBiz) DeleteTemplateStrategy(ctx context.Context, id uint32) error

DeleteTemplateStrategy 删除模板策略

func (*TemplateBiz) GetTemplateStrategy

func (b *TemplateBiz) GetTemplateStrategy(ctx context.Context, id uint32) (*model.StrategyTemplate, error)

GetTemplateStrategy 获取模板策略详情

func (*TemplateBiz) ListTemplateStrategy

func (b *TemplateBiz) ListTemplateStrategy(ctx context.Context, params *bo.QueryTemplateStrategyListParams) ([]*model.StrategyTemplate, error)

ListTemplateStrategy 获取模板策略列表

func (*TemplateBiz) UpdateTemplateStrategy

func (b *TemplateBiz) UpdateTemplateStrategy(ctx context.Context, templateStrategy *bo.UpdateTemplateStrategyParams) error

UpdateTemplateStrategy 更新模板策略

func (*TemplateBiz) UpdateTemplateStrategyStatus

func (b *TemplateBiz) UpdateTemplateStrategyStatus(ctx context.Context, params *bo.UpdateTemplateStrategyStatusParams) error

UpdateTemplateStrategyStatus 更新模板策略状态

type UserBiz

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

UserBiz 用户业务

func NewUserBiz

func NewUserBiz(userRepo repository.User) *UserBiz

NewUserBiz 创建用户业务

func (*UserBiz) BatchUpdateUserStatus

func (b *UserBiz) BatchUpdateUserStatus(ctx context.Context, params *bo.BatchUpdateUserStatusParams) error

BatchUpdateUserStatus 批量更新用户状态

func (*UserBiz) CreateUser

func (b *UserBiz) CreateUser(ctx context.Context, user *bo.CreateUserParams) (*model.SysUser, error)

CreateUser 创建用户

func (*UserBiz) DeleteUser

func (b *UserBiz) DeleteUser(ctx context.Context, id uint32) error

DeleteUser 删除用户

func (*UserBiz) GetUser

func (b *UserBiz) GetUser(ctx context.Context, id uint32) (*model.SysUser, error)

GetUser 获取用户

func (*UserBiz) GetUserSelectList

func (b *UserBiz) GetUserSelectList(ctx context.Context, params *bo.QueryUserSelectParams) ([]*bo.SelectOptionBo, error)

GetUserSelectList 获取用户下拉列表

func (*UserBiz) ListUser

func (b *UserBiz) ListUser(ctx context.Context, params *bo.QueryUserListParams) ([]*model.SysUser, error)

ListUser 获取用户列表

func (*UserBiz) ResetUserPasswordBySelf

func (b *UserBiz) ResetUserPasswordBySelf(ctx context.Context, req *bo.ResetUserPasswordBySelfParams) error

ResetUserPasswordBySelf 重置自己的密码

func (*UserBiz) UpdateUser

func (b *UserBiz) UpdateUser(ctx context.Context, user *bo.UpdateUserParams) error

UpdateUser 更新用户

func (*UserBiz) UpdateUserAvatar

func (b *UserBiz) UpdateUserAvatar(ctx context.Context, req *bo.UpdateUserAvatarRequest) error

UpdateUserAvatar 更新用户头像

func (*UserBiz) UpdateUserBaseInfo

func (b *UserBiz) UpdateUserBaseInfo(ctx context.Context, user *bo.UpdateUserBaseParams) error

UpdateUserBaseInfo 更新用户基础信息

func (*UserBiz) UpdateUserEmail

func (b *UserBiz) UpdateUserEmail(ctx context.Context, req *bo.UpdateUserEmailRequest) error

UpdateUserEmail 更新用户邮箱

func (*UserBiz) UpdateUserPhone

func (b *UserBiz) UpdateUserPhone(ctx context.Context, req *bo.UpdateUserPhoneRequest) error

UpdateUserPhone 更新用户手机号

Directories

Path Synopsis
bo

Jump to

Keyboard shortcuts

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