application

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package application 应用逻辑封装

Index

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 New

func New(options ...Option) *Application

New 新建 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

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) Pin

func (a *Application) Pin(appID int64, userID string) error

Pin pin 应用

func (*Application) PipelineCmsConfigRequest

func (a *Application) PipelineCmsConfigRequest(request *apistructs.UpdateAppPublishItemRelationRequest) error

PipelineCmsConfigRequest 请求pipeline cms,将publisherKey和publishItemKey设置进配置管理

func (*Application) QueryPublishItemRelations

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

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 更新应用 & 发送事件

type Option

type Option func(*Application)

Option 定义 Appliction 对象的配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 db client

func WithPipelineCms

func WithPipelineCms(cms cmspb.CmsServiceServer) Option

func WithUCClient

func WithUCClient(uc *ucauth.UCClient) Option

WithUCClient 配置 uc client

Jump to

Keyboard shortcuts

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