Documentation ¶
Overview ¶
Package application 应用逻辑封装
Index ¶
- type Application
- func (a *Application) BuildItemMonitorPipelineCmsNs(appID int64, workspace string) string
- func (a *Application) Create(userID string, createReq *apistructs.ApplicationCreateRequest) (*model.Application, error)
- func (a *Application) CreateWithEvent(userID string, createReq *apistructs.ApplicationCreateRequest) (*model.Application, error)
- func (a *Application) Delete(applicationID int64) (*model.Application, error)
- func (a *Application) DeleteWithEvent(applicationID int64) error
- func (a *Application) Get(applicationID int64) (*model.Application, error)
- func (a *Application) GetAllApps() ([]model.Application, error)
- func (a *Application) GetAllAppsByProject(projectID int64) ([]model.Application, error)
- func (a *Application) Init(initReq *apistructs.ApplicationInitRequest) (uint64, error)
- func (a *Application) List(orgID, projectID int64, userID string, ...) (int, []model.Application, error)
- func (a *Application) ListByProjectID(projectID, pageNum, pageSize int64) ([]model.Application, error)
- func (a *Application) ListMyApplications(orgID int64, userID string, request *apistructs.ApplicationListRequest) (int, []model.Application, error)
- func (a *Application) Pin(appID int64, userID string) error
- func (a *Application) PipelineCmsConfigRequest(request *apistructs.UpdateAppPublishItemRelationRequest) error
- func (a *Application) PrepareAbilityApp(req types.AbilityAppReq) (int64, error)
- func (a *Application) QueryPublishItemRelations(req apistructs.QueryAppPublishItemRelationRequest) ([]apistructs.AppPublishItemRelation, error)
- func (a *Application) RemovePublishItemRelations(request *apistructs.RemoveAppPublishItemRelationsRequest) error
- func (a *Application) UnPin(appID int64, userID string) error
- func (a *Application) Update(appID int64, updateReq *apistructs.ApplicationUpdateRequestBody) (*model.Application, error)
- func (a *Application) UpdatePublishItemRelations(request *apistructs.UpdateAppPublishItemRelationRequest) error
- func (a *Application) UpdateWithEvent(appID int64, updateReq *apistructs.ApplicationUpdateRequestBody) (*model.Application, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application 应用操作封装
func (*Application) BuildItemMonitorPipelineCmsNs ¶
func (a *Application) BuildItemMonitorPipelineCmsNs(appID int64, workspace string) string
BuildItemMonitorPipelineCmsNs 生成namespace
func (*Application) Create ¶
func (a *Application) Create(userID string, createReq *apistructs.ApplicationCreateRequest) (*model.Application, error)
Create 创建应用
func (*Application) CreateWithEvent ¶
func (a *Application) CreateWithEvent(userID string, createReq *apistructs.ApplicationCreateRequest) (*model.Application, error)
CreateWithEvent 创建应用 & 发送事件
func (*Application) Delete ¶
func (a *Application) Delete(applicationID int64) (*model.Application, error)
Delete 删除应用
func (*Application) DeleteWithEvent ¶
func (a *Application) DeleteWithEvent(applicationID int64) error
DeleteWithEvent 删除应用 & 发送事件
func (*Application) Get ¶
func (a *Application) Get(applicationID int64) (*model.Application, error)
Get 获取应用
func (*Application) GetAllApps ¶
func (a *Application) GetAllApps() ([]model.Application, error)
GetAllApps 获取所有app列表
func (*Application) GetAllAppsByProject ¶
func (a *Application) GetAllAppsByProject(projectID int64) ([]model.Application, error)
GetAllAppsByProject 根据projectID 获取应用
func (*Application) Init ¶
func (a *Application) Init(initReq *apistructs.ApplicationInitRequest) (uint64, error)
Init 应用初始化
func (*Application) List ¶
func (a *Application) List(orgID, projectID int64, userID string, request *apistructs.ApplicationListRequest) ( int, []model.Application, error)
List 应用列表/查询
func (*Application) ListByProjectID ¶
func (a *Application) ListByProjectID(projectID, pageNum, pageSize int64) ([]model.Application, error)
ListByProjectID 根据projectID获取应用列表
func (*Application) ListMyApplications ¶
func (a *Application) ListMyApplications(orgID int64, userID string, request *apistructs.ApplicationListRequest) ( int, []model.Application, error)
ListMyApplications 我的应用列表
func (*Application) PipelineCmsConfigRequest ¶
func (a *Application) PipelineCmsConfigRequest(request *apistructs.UpdateAppPublishItemRelationRequest) error
PipelineCmsConfigRequest 请求pipeline cms,将publisherKey和publishItemKey设置进配置管理
func (*Application) PrepareAbilityApp ¶
func (a *Application) PrepareAbilityApp(req types.AbilityAppReq) (int64, error)
PrepareAbilityApp 能力相关 TODO addon-platform支持通过scheduler直接部署能力后,删除
func (*Application) QueryPublishItemRelations ¶
func (a *Application) QueryPublishItemRelations(req apistructs.QueryAppPublishItemRelationRequest) ([]apistructs.AppPublishItemRelation, error)
QueryPublishItemRelations 查询应用发布内容关联关系
func (*Application) RemovePublishItemRelations ¶
func (a *Application) RemovePublishItemRelations(request *apistructs.RemoveAppPublishItemRelationsRequest) error
func (*Application) UnPin ¶
func (a *Application) UnPin(appID int64, userID string) error
UnPin unpin 应用
func (*Application) Update ¶
func (a *Application) Update(appID int64, updateReq *apistructs.ApplicationUpdateRequestBody) ( *model.Application, error)
Update 更新应用
func (*Application) UpdatePublishItemRelations ¶
func (a *Application) UpdatePublishItemRelations(request *apistructs.UpdateAppPublishItemRelationRequest) error
UpdatePublishItemRelations 增量更新或创建publishItemRelations
func (*Application) UpdateWithEvent ¶
func (a *Application) UpdateWithEvent(appID int64, updateReq *apistructs.ApplicationUpdateRequestBody) (*model.Application, error)
UpdateWithEvent 更新应用 & 发送事件
Click to show internal directories.
Click to hide internal directories.