bundle

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: AGPL-3.0 Imports: 38 Imported by: 4

Documentation

Overview

Package bundle 定义了整个 dice 的 client 方法 用法: b := bundle.New() b.CallXXX()

Package bundle 见 bundle.go

Package bundle 见 bundle.go

Package bundle 见 bundle.go

Index

Constants

View Source
const (
	ClusterEvent               = "cluster"
	OrgEvent                   = "org"
	ProjectEvent               = "project"
	ApplicationEvent           = "application"
	RuntimeEvent               = "runtime"
	ReleaseEvent               = "release"
	ApproveEvent               = "approve"
	ApprovalStatusChangedEvent = "approvalStatusChanged"
	IssueEvent                 = "issue"
	PipelineYmlEvent           = "pipelineYml"
	GitPushEvent               = "git_push"
)

Event types

View Source
const (
	CreateAction = "create"
	UpdateAction = "update"
	DeleteAction = "delete"
)

Event actions

View Source
const (
	// sys
	RoleSysManager = "Manager"

	// org
	RoleOrgManager         = "Manager"
	RoleOrgDev             = "Dev"
	RoleOrgOps             = "Ops"
	RoleOrgSupport         = "Support"
	RoleOrgDataManager     = "DataManager"
	RoleOrgDataEngineer    = "DataEngineer"
	RoleOrgReporter        = "Reporter"
	RoleOrgEdgeAppEngineer = "EdgeOps"
	RoleOrgGuest           = "Guest"

	// project
	RoleProjectOwner    = "Owner"
	RoleProjectLead     = "Lead"
	RoleProjectPM       = "PM"
	RoleProjectPD       = "PD"
	RoleProjectDev      = "Dev"
	RoleProjectQA       = "QA"
	RoleProjectReporter = "Reporter"
	RoleProjectGuest    = "Guest"

	// app
	RoleAppOwner = "Owner"
	RoleAppLead  = "Lead"
	RoleAppDev   = "Dev"
	RoleAppQA    = "QA"
	RoleAppOps   = "Ops"
	RoleAppGuest = "Guest"

	// publisher
	RolePublisherManager = "PublisherManager"
	RolePublisherMember  = "PublisherMember"
)

Variables

This section is empty.

Functions

func GenExample

func GenExample(schema *openapi3.Schema)

为 *openapi3.Schema 生成 Example, 就地修改 schema.Example 字段 生成前 Schema 应当是展开的, 不能包含引用

func GetApplicationRuntimesAPI

func GetApplicationRuntimesAPI() string

func GetRuntimeServicesAPI

func GetRuntimeServicesAPI(runtimeID uint64) string

Types

type AbilityAppReq

type AbilityAppReq struct {
	OrgId           uint64 `json:"orgId"`
	ClusterId       uint64 `json:"clusterId"`
	ClusterName     string `json:"clusterName"`
	ApplicationName string `json:"applicationName"`
	Operator        string `json:"operator"`
}

Deprecated

type AccessKeysListResponse added in v1.1.0

type AccessKeysListResponse struct {
	Data []model.AccessKey `json:"data"`
}

type AkSkResponse added in v1.1.0

type AkSkResponse struct {
	Data model.AccessKey `json:"data"`
}

type Bundle

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

Bundle 定义了所有方法的集合对象.

func New

func New(options ...Option) *Bundle

New 创建一个新的 Bundle 实例对象,通过 Bundle 对象可以直接调用所有方法.

func (*Bundle) AddMember added in v1.1.0

func (b *Bundle) AddMember(req apistructs.MemberAddRequest, userID string) error

func (*Bundle) AddOrUpdateNamespaceConfig

func (b *Bundle) AddOrUpdateNamespaceConfig(namespace string, items []apistructs.EnvConfig, encrypt bool) error

AddOrUpdateNamespaceConfig 新增或更新 namespace config .

func (*Bundle) AddonMetrics

func (b *Bundle) AddonMetrics(path string, paramValues url.Values) (map[string]interface{}, error)

UnregisterAddon 注销 runtime addon

func (*Bundle) BatchCreateAuditEvent

func (b *Bundle) BatchCreateAuditEvent(audits *apistructs.AuditBatchCreateRequest) error

BatchCreateAuditEvent 批量创建审计事件

func (*Bundle) CancelDiceAutotestScene

func (b *Bundle) CancelDiceAutotestScene(req apistructs.AutotestCancelSceneRequest) (string, error)

func (*Bundle) CancelDiceAutotestTestPlan

func (b *Bundle) CancelDiceAutotestTestPlan(req apistructs.AutotestCancelTestPlansRequest) (string, error)

func (*Bundle) CancelPipeline

func (b *Bundle) CancelPipeline(req apistructs.PipelineCancelRequest) error

func (*Bundle) CancelServiceGroup

func (b *Bundle) CancelServiceGroup(namespace, name string) error

CancelServiceGroup will be DEPRECATED

func (*Bundle) CapacityInfo

func (b *Bundle) CapacityInfo(clustername string) (*apistructs.CapacityInfoResponse, error)

func (*Bundle) CheckIfRoleIsManager

func (b *Bundle) CheckIfRoleIsManager(role string) bool

CheckIfRoleIsManager Determine whether role is an administrator.

func (*Bundle) CheckPermission

CheckPermission 鉴权

func (*Bundle) CloseMergeRequest

func (b *Bundle) CloseMergeRequest(appID int64, mrID int) error

CloseMergeRequest 关闭mr

func (*Bundle) CloseTicket

func (b *Bundle) CloseTicket(ticketID int64, userID string) (int64, error)

CloseTicket 关闭工单

func (*Bundle) CollectLogs

func (b *Bundle) CollectLogs(source string, body io.Reader) error

CollectLogs 收集日志

func (*Bundle) CollectMetrics

func (b *Bundle) CollectMetrics(metrics *apistructs.Metrics) error

CollectMetrics 收集指标

func (*Bundle) CollectNotifyMetrics

func (b *Bundle) CollectNotifyMetrics(metrics *apistructs.Metric) error

func (*Bundle) CopyAutoTestScene

func (b *Bundle) CopyAutoTestScene(req apistructs.AutotestSceneCopyRequest) (uint64, error)

func (*Bundle) CopyTestSpace

func (b *Bundle) CopyTestSpace(spaceID uint64, userID string) error

CopyTestSpace 复制测试空间

func (*Bundle) CountAppByProID added in v1.1.0

func (b *Bundle) CountAppByProID(proID uint64) (int64, error)

CountAppByProID count app by proID

func (*Bundle) CountMembersWithoutExtraByScope added in v1.1.0

func (b *Bundle) CountMembersWithoutExtraByScope(scopeType string, scopeID uint64) (int, error)

CountMembersWithoutExtraByScope count member

func (*Bundle) CreateAPIAsset

CreateAPIAsset 创建 API Asset

func (*Bundle) CreateApp added in v1.1.0

CreateApp create app

func (*Bundle) CreateApprove

func (b *Bundle) CreateApprove(req *apistructs.ApproveCreateRequest, userID string) (*apistructs.ApproveDTO, error)

func (*Bundle) CreateAuditEvent

func (b *Bundle) CreateAuditEvent(audits *apistructs.AuditCreateRequest) error

CreateAuditEvent 创建审计事件

func (*Bundle) CreateAutoTestScene

func (b *Bundle) CreateAutoTestScene(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) CreateAutoTestSceneInput

func (b *Bundle) CreateAutoTestSceneInput(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) CreateAutoTestSceneOutput

func (b *Bundle) CreateAutoTestSceneOutput(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) CreateAutoTestSceneStep

func (b *Bundle) CreateAutoTestSceneStep(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) CreateCheckRun

func (b *Bundle) CreateCheckRun(appID int64, request apistructs.CheckRun) (*apistructs.CheckRun, error)

func (*Bundle) CreateClientConsumer

func (b *Bundle) CreateClientConsumer(orgID uint64, clientName string) (dto *apistructs.ClientInfoDto, err error)

创建调用方

func (*Bundle) CreateCloudAddon

func (b *Bundle) CreateCloudAddon(orgID, userID, pathWithName string, body *map[string]interface{}) (*apistructs.CreateCloudResourceBaseResponseData, error)

func (*Bundle) CreateCloudAddonWithInstance

func (b *Bundle) CreateCloudAddonWithInstance(orgID, userID, pathWithName, resourceName string, body *map[string]interface{}) (*apistructs.CreateCloudResourceBaseResponseData, error)

func (*Bundle) CreateCluster added in v1.1.0

func (b *Bundle) CreateCluster(req *apistructs.ClusterCreateRequest, header ...http.Header) error

CreateCluster Create cluster with event

func (*Bundle) CreateClusterWithOrg added in v1.1.0

func (b *Bundle) CreateClusterWithOrg(userID string, orgID uint64, req *apistructs.ClusterCreateRequest, header ...http.Header) error

func (*Bundle) CreateComment

func (b *Bundle) CreateComment(req *apistructs.CommentCreateRequest) (int64, error)

CreateComment 创建评论

func (*Bundle) CreateDopOrg added in v1.1.0

func (b *Bundle) CreateDopOrg(userID string, req *apistructs.OrgCreateRequest) (*apistructs.OrgDTO, error)

CreateDopOrg create org

func (*Bundle) CreateEdgeApp

func (b *Bundle) CreateEdgeApp(req *apistructs.EdgeAppCreateRequest, identify apistructs.Identity) error

func (*Bundle) CreateEdgeCfgSetItem

func (b *Bundle) CreateEdgeCfgSetItem(req *apistructs.EdgeCfgSetItemCreateRequest, identify apistructs.Identity) error

func (*Bundle) CreateEdgeConfigset

func (b *Bundle) CreateEdgeConfigset(req *apistructs.EdgeConfigSetCreateRequest, identify apistructs.Identity) error

func (*Bundle) CreateEdgeSite

func (b *Bundle) CreateEdgeSite(req *apistructs.EdgeSiteCreateRequest, identify apistructs.Identity) error

func (*Bundle) CreateEmailNotify

func (b *Bundle) CreateEmailNotify(templatename string, params map[string]string, locale string, orgid uint64, emailaddrs []string) error

func (*Bundle) CreateEndpoint

func (b *Bundle) CreateEndpoint(orgID, projectID uint64, workspace string, packageDto apistructs.PackageDto) (endpointID string, err error)

创建流量入口

func (*Bundle) CreateErrorLog

func (b *Bundle) CreateErrorLog(errorLog *apistructs.ErrorLogCreateRequest) error

CreateErrorLog 创建错误日志

func (*Bundle) CreateEvent

func (b *Bundle) CreateEvent(ev *apistructs.EventCreateRequest) error

CreateEvent 创建一个 event 发送到 eventbox 服务.

func (*Bundle) CreateEventNotify added in v1.1.0

func (b *Bundle) CreateEventNotify(ev *apistructs.EventBoxRequest) error

func (*Bundle) CreateFileTreeNodes

func (b *Bundle) CreateFileTreeNodes(req apistructs.UnifiedFileTreeNodeCreateRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) CreateGatewayTenant added in v1.1.0

func (b *Bundle) CreateGatewayTenant(req *apistructs.GatewayTenantRequest) error

func (*Bundle) CreateGittarCommit

CreateGittarCommit 创建commit

func (*Bundle) CreateGittarCommitV2

func (b *Bundle) CreateGittarCommitV2(repo string, request apistructs.GittarCreateCommitRequest, orgID int) (*apistructs.GittarCreateCommitResponse, error)

CreateGittarCommit 创建commit

func (*Bundle) CreateGittarCommitV3

func (b *Bundle) CreateGittarCommitV3(orgID uint64, userID, repo string,
	commit *apistructs.GittarCreateCommitRequest) (*apistructs.GittarCreateCommitResponse, error)

CreateGittarCommit 创建commit

func (*Bundle) CreateGittarFileTreeNodes

func (b *Bundle) CreateGittarFileTreeNodes(req apistructs.UnifiedFileTreeNodeCreateRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) CreateGroupNotifyEvent

func (b *Bundle) CreateGroupNotifyEvent(groupNotifyRequest apistructs.EventBoxGroupNotifyRequest) error

func (*Bundle) CreateIssuePanel

func (b *Bundle) CreateIssuePanel(req apistructs.IssuePanelRequest) (int64, error)

func (*Bundle) CreateIssueTicket

func (b *Bundle) CreateIssueTicket(createReq apistructs.IssueCreateRequest) (uint64, error)

CreateIssueTicket 创建工单 TODO 和ps_ticket的bundle同名了,待前者废弃后改回

func (*Bundle) CreateJob added in v1.1.0

func (b *Bundle) CreateJob(job apistructs.JobFromUser) (jsonResp apistructs.JobCreateResponse, err error)

func (*Bundle) CreateJobVolume

func (b *Bundle) CreateJobVolume(v apistructs.JobVolume) (string, error)

CreateJobVolume create job volume

func (*Bundle) CreateMBox

func (b *Bundle) CreateMBox(request *apistructs.CreateMBoxRequest) error

CreateMBox 创建站内信记录

func (*Bundle) CreateMSPTenant added in v1.2.0

func (b *Bundle) CreateMSPTenant(projectID, workspace, tenantType, tenantGroup string) (string, error)

func (*Bundle) CreateMboxNotify

func (b *Bundle) CreateMboxNotify(templatename string, params map[string]string, locale string, orgid uint64, users []string) error

func (*Bundle) CreateMessage

func (b *Bundle) CreateMessage(message *apistructs.MessageCreateRequest) error

CreateMessage 发送消息(不包括 event ), `Message.Labels` 见 `MessageLabel`

func (*Bundle) CreateNamespace

func (b *Bundle) CreateNamespace(createReq apistructs.NamespaceCreateRequest) error

CreateNamespace 创建配置中心 Namespace

func (*Bundle) CreateNamespaceRelations

func (b *Bundle) CreateNamespaceRelations(createReq apistructs.NamespaceRelationCreateRequest) error

CreateNamespaceRelations 创建 Namespace 关联关系

func (*Bundle) CreateNoticeRequest

func (b *Bundle) CreateNoticeRequest(userID string, orgID uint64, body io.Reader) (*apistructs.NoticeCreateResponse, error)

func (*Bundle) CreateNotifyHistory

func (b *Bundle) CreateNotifyHistory(request *apistructs.CreateNotifyHistoryRequest) (int64, error)

func (*Bundle) CreateOrEditNotify

func (b *Bundle) CreateOrEditNotify(submitData *apistructs.EditOrCreateModalData, inParams *apistructs.InParams, userId string) error

func (*Bundle) CreateOrUpdateClientLimits

func (b *Bundle) CreateOrUpdateClientLimits(clientID, endpointID string, limits []apistructs.LimitType) (err error)

func (*Bundle) CreateOrUpdateComponentIngress

func (b *Bundle) CreateOrUpdateComponentIngress(req apistructs.ComponentIngressUpdateRequest) error

Create or update component ingress

func (*Bundle) CreateOrUpdateEndpointRootRoute

func (b *Bundle) CreateOrUpdateEndpointRootRoute(endpointID, redirectAddr, redirectPath string) (err error)

创建或更新路由规则

func (*Bundle) CreateOrg added in v1.0.1

func (b *Bundle) CreateOrg(userID string, req *apistructs.OrgCreateRequest) (*apistructs.OrgDTO, error)

CreateOrg create org

func (*Bundle) CreateOrgClusterRelationsByOrg added in v1.1.0

func (b *Bundle) CreateOrgClusterRelationsByOrg(clusterName string, userID string, orgID uint64) error

CreateOrgClusterRelationsByOrg create orgClusters relation by orgID

func (*Bundle) CreatePipeline

func (b *Bundle) CreatePipeline(req interface{}) (*apistructs.PipelineDTO, error)

CreatePipeline 创建流水线 如何从结构体便捷地构造关键参数 pipeline.yml 内容: 1. 构造对象: py := apistructs.PipelineYml 对象 2. 序列化对象: byteContent := yaml.Marshal(&py)

Tips: 1. 使用 bundle 调用时,如果有用户信息,需要在 req.UserID 字段赋值

func (*Bundle) CreatePipelineCron

func (b *Bundle) CreatePipelineCron(req apistructs.PipelineCronCreateRequest) (uint64, error)

func (*Bundle) CreateProject added in v1.1.0

func (b *Bundle) CreateProject(req apistructs.ProjectCreateRequest, userID string) (uint64, error)

CreateProject create project

func (*Bundle) CreateQaFileTreeNodes

func (b *Bundle) CreateQaFileTreeNodes(req apistructs.UnifiedFileTreeNodeCreateRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) CreateRelease added in v1.1.0

func (b *Bundle) CreateRelease(req apistructs.ReleaseCreateRequest, orgID uint64, userID string) (string, error)

func (*Bundle) CreateRepo

CreateRepo 从gittar创建应用

func (*Bundle) CreateRuntime added in v1.1.0

func (*Bundle) CreateSceneSet

func (b *Bundle) CreateSceneSet(req apistructs.SceneSetRequest) (*uint64, error)

func (*Bundle) CreateServiceGroup

func (b *Bundle) CreateServiceGroup(sg apistructs.ServiceGroupCreateV2Request) error

CreateServiceGroup create servicegroup

func (*Bundle) CreateTestAPI

func (b *Bundle) CreateTestAPI(req apistructs.ApiTestInfo) error

CreateTestAPI 创建API 测试

func (*Bundle) CreateTestPlanV2

func (b *Bundle) CreateTestPlanV2(req apistructs.TestPlanV2CreateRequest) error

CreateTestPlanV2 创建测试计划

func (*Bundle) CreateTestPlansV2Step

func (b *Bundle) CreateTestPlansV2Step(req apistructs.TestPlanV2StepAddRequest) (uint64, error)

CreateTestPlansV2Step 新建测试计划步骤

func (*Bundle) CreateTestSpace

func (b *Bundle) CreateTestSpace(name string, projectID int64, description string, userID string) error

CreateTestSpace 创建测试空间

func (*Bundle) CreateTicket

func (b *Bundle) CreateTicket(requestID string, req *apistructs.TicketCreateRequest) (int64, error)

CreateTicket 创建工单 - param: requestID http header,用于幂等性校验

func (*Bundle) CreateWebhook

func (b *Bundle) CreateWebhook(r apistructs.CreateHookRequest) error

func (*Bundle) DecreaseReference

func (b *Bundle) DecreaseReference(releaseID string) error

DecreaseReference 减小 release 引用

func (*Bundle) DeleteApp added in v1.1.0

func (b *Bundle) DeleteApp(appID uint64, userID string) (*apistructs.ApplicationDTO, error)

DeleteApp delete app

func (*Bundle) DeleteAutoTestScene

func (b *Bundle) DeleteAutoTestScene(req apistructs.AutotestSceneRequest) error

func (*Bundle) DeleteAutoTestSceneInput

func (b *Bundle) DeleteAutoTestSceneInput(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) DeleteAutoTestSceneStep

func (b *Bundle) DeleteAutoTestSceneStep(req apistructs.AutotestSceneRequest) error

func (*Bundle) DeleteClientConsumer

func (b *Bundle) DeleteClientConsumer(clientID string) (err error)

删除调用方

func (*Bundle) DeleteCloudAddon

func (b *Bundle) DeleteCloudAddon(orgID, userID, pathWithName string, body *map[string]interface{}) error

func (*Bundle) DeleteCloudAddonResource

func (b *Bundle) DeleteCloudAddonResource(orgID, userID, pathWithName, resourceName string, body *map[string]interface{}) error

func (*Bundle) DeleteCluster added in v1.1.0

func (b *Bundle) DeleteCluster(clusterName string, header ...http.Header) error

DeleteCluster Delete cluster with event

func (*Bundle) DeleteDiceFile

func (b *Bundle) DeleteDiceFile(uuid string) error

DeleteDiceFile 根据 uuid 删除文件

func (*Bundle) DeleteEdgeApp

func (b *Bundle) DeleteEdgeApp(appID int64, identify apistructs.Identity) error

func (*Bundle) DeleteEdgeCfgSetItem

func (b *Bundle) DeleteEdgeCfgSetItem(siteID int64, identify apistructs.Identity) error

func (*Bundle) DeleteEdgeConfigset

func (b *Bundle) DeleteEdgeConfigset(siteID int64, identify apistructs.Identity) error

func (*Bundle) DeleteEdgeSite

func (b *Bundle) DeleteEdgeSite(siteID int64, identify apistructs.Identity) error

func (*Bundle) DeleteEndpoint

func (b *Bundle) DeleteEndpoint(endpointID string) (err error)

删除流量入口

func (*Bundle) DeleteFileTreeNodes

func (b *Bundle) DeleteFileTreeNodes(req apistructs.UnifiedFileTreeNodeDeleteRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) DeleteGitRepo

func (b *Bundle) DeleteGitRepo(gitRepo string) error

DeleteGitRepo 从gittar删除应用gitRepo

func (*Bundle) DeleteGittarFileTreeNodes

func (b *Bundle) DeleteGittarFileTreeNodes(req apistructs.UnifiedFileTreeNodeDeleteRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) DeleteImageManifests

func (b *Bundle) DeleteImageManifests(clusterIDOrName string, images []string) (
	*apistructs.RegistryManifestsRemoveResponseData, error)

DeleteImageManifests 调用 officer 删除 registry image manifests, 真实镜像 blob 由 soldier 删除.

func (*Bundle) DeleteIssuePanel

func (b *Bundle) DeleteIssuePanel(req apistructs.IssuePanelRequest) (*apistructs.IssuePanel, error)

func (*Bundle) DeleteJob added in v1.1.0

func (b *Bundle) DeleteJob(namespace string, name string) (jsonResp apistructs.JobDeleteResponse, err error)

func (*Bundle) DeleteMember

func (b *Bundle) DeleteMember(req apistructs.MemberRemoveRequest) error

DeleteMember 移除成员

func (*Bundle) DeleteNamespace

func (b *Bundle) DeleteNamespace(name string) error

DeleteNamespace 删除配置中心 Namespace

func (*Bundle) DeleteNamespaceConfig

func (b *Bundle) DeleteNamespaceConfig(namespace string, key string) error

DeleteNamespaceConfig 删除 namespace 配置.

func (*Bundle) DeleteNamespaceRelation

func (b *Bundle) DeleteNamespaceRelation(defaultNamespace string) error

DeleteNamespaceRelation 删除配置中心 namespace relation

func (*Bundle) DeleteNotice added in v1.1.0

func (b *Bundle) DeleteNotice(noticeID, orgID uint64, userID string) (*apistructs.NoticeDeleteResponse, error)

func (*Bundle) DeleteNotifyRecord

func (b *Bundle) DeleteNotifyRecord(scope, scopeId string, id uint64, userId string) error

func (*Bundle) DeleteOrg added in v1.1.0

func (b *Bundle) DeleteOrg(idOrName interface{}) (*apistructs.OrgDTO, error)

DeleteOrg delete org by id from core-service.

func (*Bundle) DeletePipeline

func (b *Bundle) DeletePipeline(pipelineID uint64) error

func (*Bundle) DeletePipelineCron

func (b *Bundle) DeletePipelineCron(cronID uint64) error

func (*Bundle) DeleteProject added in v1.1.0

func (b *Bundle) DeleteProject(id, orgID uint64, userID string) (*apistructs.ProjectDTO, error)

DeleteProject delete project

func (*Bundle) DeleteQaFileTreeNodes

func (b *Bundle) DeleteQaFileTreeNodes(req apistructs.UnifiedFileTreeNodeDeleteRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) DeleteRepo

func (b *Bundle) DeleteRepo(appID int64) error

DeleteRepo 从gittar删除应用gitRepo 新接口

func (*Bundle) DeleteRuntimeService

func (b *Bundle) DeleteRuntimeService(runtimeID uint64) error

DeleteRuntimeService 删除runtime前,调用hepa

func (*Bundle) DeleteSceneSet

func (b *Bundle) DeleteSceneSet(req apistructs.SceneSetRequest) error

func (*Bundle) DeleteServiceGroup

func (b *Bundle) DeleteServiceGroup(namespace, name string) error

DeleteServiceGroup delete servicegroup

func (*Bundle) DeleteTestAPI

func (b *Bundle) DeleteTestAPI(apiID int64) error

DeleteTestAPI 删除 API 测试

func (*Bundle) DeleteTestPlansV2Step

func (b *Bundle) DeleteTestPlansV2Step(req apistructs.TestPlanV2StepDeleteRequest) error

DeleteTestPlansV2Step 删除测试计划步骤

func (*Bundle) DeleteTestSpace

func (b *Bundle) DeleteTestSpace(id uint64, userID string) error

DeleteTestSpace 删除测试空间

func (*Bundle) DeleteTicket

func (b *Bundle) DeleteTicket(ticketID int64) (int64, error)

DeleteTicket 删除工单

func (*Bundle) DeleteTicketByTargetID

func (b *Bundle) DeleteTicketByTargetID(targetID int64, ticketType string, targetType string) error

DeleteTicketByTargetID 根据targetID删除工单

func (*Bundle) DereferenceCluster added in v1.1.0

func (b *Bundle) DereferenceCluster(orgID uint64, clusterName, userID string) (string, error)

DereferenceCluster delete the relation of org and cluster

func (*Bundle) DestroyUsers

func (b *Bundle) DestroyUsers(req apistructs.MemberDestroyRequest) error

DestroyUsers 删除用户一切成员信息

func (*Bundle) DoRemoteAliyunAction

func (b *Bundle) DoRemoteAliyunAction(orgId, clusterName, endpointType string, endpointMap map[string]string, request requests.AcsRequest, response responses.AcsResponse) error

DoRemoteAliyunAction client action remote do by aliyun

func (*Bundle) DownloadDiceFile

func (b *Bundle) DownloadDiceFile(uuid string) (io.ReadCloser, error)

DownloadDiceFile 根据 uuid 返回文件流

func (*Bundle) DragSceneSet

func (b *Bundle) DragSceneSet(req apistructs.SceneSetRequest) error

func (*Bundle) ExecuteApiTest

func (b *Bundle) ExecuteApiTest(req apistructs.ApiTestsActionRequest) (uint64, error)

ExecuteApiTest 执行接口测试

func (*Bundle) ExportAuditExcel added in v1.1.0

func (b *Bundle) ExportAuditExcel(orgID, userID string, params url.Values) (io.ReadCloser, *httpclient.Response, error)

func (*Bundle) ExportTestSpace added in v1.1.0

func (b *Bundle) ExportTestSpace(userID string, req apistructs.AutoTestSpaceExportRequest) error

ExportTestSpace export autotest space

func (*Bundle) FetchDeploymentConfig

func (b *Bundle) FetchDeploymentConfig(namespace string) (map[string]string, map[string]string, error)

FetchDeploymentConfig 通过 namespace 查询部署配置 return (ENV, FILE, error)

func (*Bundle) FetchNamespaceConfig

func (b *Bundle) FetchNamespaceConfig(fetchReq apistructs.EnvConfigFetchRequest) (map[string]string, error)

FetchNamespaceConfig 通过 namespace 查询配置.

func (*Bundle) FetchPublisher

func (b *Bundle) FetchPublisher(publisherID uint64) (*apistructs.PublisherDTO, error)

FetchPublisher 获取 publisher 详情

func (*Bundle) FindClusterResource

func (b *Bundle) FindClusterResource(clusterName, orgID string) (*apistructs.ResourceReferenceData, error)

func (*Bundle) FindFileTreeNodeAncestors

func (b *Bundle) FindFileTreeNodeAncestors(req apistructs.UnifiedFileTreeNodeFindAncestorsRequest, orgID uint64) (result []apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) FindGittarFileTreeNodeAncestors

func (b *Bundle) FindGittarFileTreeNodeAncestors(req apistructs.UnifiedFileTreeNodeFindAncestorsRequest, orgID uint64) (result []apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) FindQaFileTreeNodeAncestors

func (b *Bundle) FindQaFileTreeNodeAncestors(req apistructs.UnifiedFileTreeNodeFindAncestorsRequest, orgID uint64) (result []apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) ForceDeleteServiceGroup

func (b *Bundle) ForceDeleteServiceGroup(req apistructs.ServiceGroupDeleteRequest) error

ForceDeleteServiceGroup delete service group with force option

func (*Bundle) FuzzySearchFileTreeNodes

func (b *Bundle) FuzzySearchFileTreeNodes(query apistructs.UnifiedFileTreeNodeFuzzySearchRequest, orgID uint64) (result []apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) FuzzySearchGittarFileTreeNodes

func (b *Bundle) FuzzySearchGittarFileTreeNodes(query apistructs.UnifiedFileTreeNodeFuzzySearchRequest, orgID uint64) (result []apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) FuzzySearchQaFileTreeNodes

func (b *Bundle) FuzzySearchQaFileTreeNodes(query apistructs.UnifiedFileTreeNodeFuzzySearchRequest, orgID uint64) (result []apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) GetAPIOperation

func (b *Bundle) GetAPIOperation(orgID uint64, userID string, id uint64) (*apistructs.APIOperation, error)

GetAPIOperation 查询 operation 详情 id: apistructs.APIOperationSummary{}.ID

func (*Bundle) GetAccessKeyByAccessKeyID added in v1.1.0

func (b *Bundle) GetAccessKeyByAccessKeyID(ak string) (model.AccessKey, error)

func (*Bundle) GetAddon

func (b *Bundle) GetAddon(addonid string) (*apistructs.AddonFetchResponseData, error)

func (*Bundle) GetAllGroups

func (b *Bundle) GetAllGroups(scope, scopeId, orgId, userId string) ([]apistructs.AllGroups, error)

func (*Bundle) GetAllMyApps

get my apps by paging

func (*Bundle) GetAllOrganizational

func (b *Bundle) GetAllOrganizational() (*apistructs.GetAllOrganizationalData, error)

GetAllOrganizational 获取所有的组织架构

func (*Bundle) GetAllProjects added in v1.1.0

func (b *Bundle) GetAllProjects() ([]apistructs.ProjectDTO, error)

GetAllProjects get all projects

func (*Bundle) GetAllTemplates

func (b *Bundle) GetAllTemplates(scope, scopeId, userId string) (map[string]string, error)

func (*Bundle) GetAllValidBranchWorkspace

func (b *Bundle) GetAllValidBranchWorkspace(appId uint64) ([]apistructs.ValidBranch, error)

func (*Bundle) GetApp

func (b *Bundle) GetApp(id uint64) (*apistructs.ApplicationDTO, error)

GetApp get app by id from core-service.

func (*Bundle) GetAppBranchRules

func (b *Bundle) GetAppBranchRules(appId uint64) ([]*apistructs.BranchRule, error)

GetAppBranchRules 查询应用分支规则

func (*Bundle) GetAppPublishItemRelationsGroupByENV

func (b *Bundle) GetAppPublishItemRelationsGroupByENV(appID uint64) (*apistructs.QueryAppPublishItemRelationGroupByENVResponse, error)

GetAppPublishItemRelationsGroupByENV 根据 appID 获取应用关联的发布内容

func (*Bundle) GetApplicationRuntimes

func (b *Bundle) GetApplicationRuntimes(applicationID uint64, orgID uint64, userID string) ([]*GetApplicationRuntimesDataEle, error)

(cmdb) 获取 application 下的 runtimes

func (*Bundle) GetApprove added in v1.1.0

func (b *Bundle) GetApprove(orgID, userID string, approveID int64) (*apistructs.ApproveDetailResponse, error)

func (*Bundle) GetAppsByProject

func (b *Bundle) GetAppsByProject(projectID, orgID uint64, userID string) (*apistructs.ApplicationListResponseData, error)

GetAppsByProject 根据 projectID 获取应用列表

func (*Bundle) GetAppsByProjectAndAppName

func (b *Bundle) GetAppsByProjectAndAppName(projectID, orgID uint64, userID string, appName string) (*apistructs.ApplicationListResponseData, error)

get applications by projectID and app name

func (*Bundle) GetAppsByProjectSimple

func (b *Bundle) GetAppsByProjectSimple(projectID, orgID uint64, userID string) (*apistructs.ApplicationListResponseData, error)

GetAppsByProjectSimple 根据 projectID 获取应用列表简单信息

func (*Bundle) GetAutoTestScene

func (b *Bundle) GetAutoTestScene(req apistructs.AutotestSceneRequest) (*apistructs.AutoTestScene, error)

func (*Bundle) GetAutoTestSceneStep

func (*Bundle) GetBranchRules

func (b *Bundle) GetBranchRules(scopeType apistructs.ScopeType, scopeID uint64) ([]*apistructs.BranchRule, error)

GetBranchRules 查询分支规则

func (*Bundle) GetBranchWorkspaceConfig

func (b *Bundle) GetBranchWorkspaceConfig(appId uint64, branch string) (*apistructs.ValidBranch, error)

func (*Bundle) GetBranchWorkspaceConfigByProject

func (b *Bundle) GetBranchWorkspaceConfigByProject(projectID uint64, branch string) (*apistructs.ValidBranch, error)

func (*Bundle) GetClientCredentials

func (b *Bundle) GetClientCredentials(clientID string) (dto *apistructs.ClientInfoDto, err error)

获取调用方凭证信息

func (*Bundle) GetCloudAccount

func (b *Bundle) GetCloudAccount(accountID uint64) (*apistructs.CloudAccountAllInfo, error)

func (*Bundle) GetCluster

func (b *Bundle) GetCluster(idOrName string) (*apistructs.ClusterInfo, error)

GetCluster 查询集群

func (*Bundle) GetClusterInfo

func (b *Bundle) GetClusterInfo(clusterName string, identify apistructs.Identity) (map[string]interface{}, error)

func (*Bundle) GetCurrentUser

func (b *Bundle) GetCurrentUser(userID string) (*apistructs.UserInfo, error)

func (*Bundle) GetDiceYAML

func (b *Bundle) GetDiceYAML(releaseID string, workspace ...string) (*diceyml.DiceYaml, error)

GetDiceYAML 拉取 dice.yml

func (*Bundle) GetDopOrg added in v1.1.0

func (b *Bundle) GetDopOrg(idOrName interface{}) (*apistructs.OrgDTO, error)

GetDopOrg get org by id from dop

func (*Bundle) GetDopOrgByDomain added in v1.1.0

func (b *Bundle) GetDopOrgByDomain(domain string, userID string) (*apistructs.OrgDTO, error)

GetDopOrgByDomain 通过域名获取企业

func (*Bundle) GetEdgeApp

func (b *Bundle) GetEdgeApp(appID uint64, identify apistructs.Identity) (*apistructs.EdgeAppInfo, error)

func (*Bundle) GetEdgeCfgSetItem

func (b *Bundle) GetEdgeCfgSetItem(itemID int64, identify apistructs.Identity) (*apistructs.EdgeCfgSetItemInfo, error)

func (*Bundle) GetEdgeConfigSet

func (b *Bundle) GetEdgeConfigSet(itemID int64, identify apistructs.Identity) (*apistructs.EdgeConfigSetInfo, error)

func (*Bundle) GetEdgeInstanceInfo

func (b *Bundle) GetEdgeInstanceInfo(orgID int64, appName, site string, identify apistructs.Identity) ([]apistructs.InstanceInfoData, error)

func (*Bundle) GetEdgeSite

func (b *Bundle) GetEdgeSite(siteID int64, identify apistructs.Identity) (*apistructs.EdgeSiteInfo, error)

func (*Bundle) GetEdgeSiteInitShell

func (b *Bundle) GetEdgeSiteInitShell(siteID int64, identify apistructs.Identity) (map[string]interface{}, error)

func (*Bundle) GetEndpoint

func (b *Bundle) GetEndpoint(endpointID string) (dto *apistructs.PackageInfoDto, err error)

获取流量入口详情

func (*Bundle) GetExtensionVersion

func (*Bundle) GetFileTreeNode

func (b *Bundle) GetFileTreeNode(req apistructs.UnifiedFileTreeNodeGetRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) GetGittarBlobNode

func (b *Bundle) GetGittarBlobNode(repo string, orgID string) (string, error)

获取文件的内容

func (*Bundle) GetGittarBlobNodeInfo

func (b *Bundle) GetGittarBlobNodeInfo(blobPath string, orgID string) (*apistructs.GittarBlobRspData, error)

func (*Bundle) GetGittarBranches

func (b *Bundle) GetGittarBranches(repo string) ([]string, error)

GetGittarBranches 获取指定应用的所有分支

func (*Bundle) GetGittarBranchesV2

func (b *Bundle) GetGittarBranchesV2(repo string, orgID string, onlyBranchNames bool) ([]string, error)

GetGittarBranchesV2 获取指定应用的所有分支

func (*Bundle) GetGittarCommit

func (b *Bundle) GetGittarCommit(repo, ref string) (*apistructs.Commit, error)

GetGittarCommit 获取commit 历史信息 pageNo==pageSize==1

func (*Bundle) GetGittarCompare added in v1.1.0

func (b *Bundle) GetGittarCompare(after, before string, appID int64) (*apistructs.GittarCompareData, error)

GetGittarCompare gittar compare between commits

func (*Bundle) GetGittarFile

func (b *Bundle) GetGittarFile(repoUrl, ref, filePath, userName, passWord string) (string, error)

GetGittarFile 从gittar获取指定文件内容

func (*Bundle) GetGittarFileTreeNode

func (b *Bundle) GetGittarFileTreeNode(req apistructs.UnifiedFileTreeNodeGetRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) GetGittarHost

func (b *Bundle) GetGittarHost() (string, error)

func (*Bundle) GetGittarLines

func (b *Bundle) GetGittarLines(lines *GittarLines, userName, passWord string) ([]string, error)

GetGittarLines 从gittar获取指定区间的代码行数

func (*Bundle) GetGittarStats

func (b *Bundle) GetGittarStats(appID int64) (*apistructs.GittarStatsData, error)

GetGittarStats 获取仓库概览信息

func (*Bundle) GetGittarTags

func (b *Bundle) GetGittarTags(repo string) ([]string, error)

GetGittarTags 获取指定应用的所有Tag

func (*Bundle) GetGittarTree

func (b *Bundle) GetGittarTree(repo, orgID string) (*apistructs.GittarTreeData, error)

GetGittarTree 获取目录内容

func (*Bundle) GetGittarTreeNode

func (b *Bundle) GetGittarTreeNode(repo string, orgID string, simple bool) ([]apistructs.TreeEntry, error)

获取目录的子节点

func (*Bundle) GetGittarTreeNodeInfo

func (b *Bundle) GetGittarTreeNodeInfo(treePath, orgID string) (*apistructs.GittarTreeRspData, error)

func (*Bundle) GetHostMetricInfo

func (b *Bundle) GetHostMetricInfo(clusterName string) (map[string]*apistructs.HostMetric, error)

func (*Bundle) GetInstanceInfo

GetInstanceInfo 实例状态 list

func (*Bundle) GetIssue

func (b *Bundle) GetIssue(id uint64) (*apistructs.Issue, error)

GetIssue 通过id获取事件

func (*Bundle) GetIssuePanel

func (*Bundle) GetIssuePanelIssue

func (b *Bundle) GetIssuePanelIssue(req apistructs.IssuePanelRequest) (*apistructs.IssuePanelIssueIDs, error)

func (*Bundle) GetIssueStage

func (b *Bundle) GetIssueStage(orgID int64, issueType apistructs.IssueType) ([]apistructs.IssueStage, error)

func (*Bundle) GetIssueStateBelong

func (*Bundle) GetIssueStatesByID

func (b *Bundle) GetIssueStatesByID(req []int64) ([]apistructs.IssueStatus, error)

func (*Bundle) GetIssuesForWorkbench

func (b *Bundle) GetIssuesForWorkbench(req apistructs.IssuePagingRequest) (*apistructs.IssuePagingResponse, error)

func (*Bundle) GetIteration

func (b *Bundle) GetIteration(id uint64) (*apistructs.Iteration, error)

GetIteration 通过id获取迭代

func (*Bundle) GetJobStatus added in v1.1.0

func (b *Bundle) GetJobStatus(namespace string, name string) (status apistructs.StatusCode, err error)

func (*Bundle) GetLabel

func (b *Bundle) GetLabel(id uint64) (*apistructs.ProjectLabel, error)

GetLabel 通过id获取label

func (*Bundle) GetLocale

func (b *Bundle) GetLocale(locales ...string) *i18n.LocaleResource

GetLocale 获取对应语言对象

func (*Bundle) GetLocaleByRequest

func (b *Bundle) GetLocaleByRequest(request *http.Request) *i18n.LocaleResource

GetLocaleByRequest 从request获取语言对象

func (*Bundle) GetLocaleLoader

func (b *Bundle) GetLocaleLoader() *i18n.LocaleResourceLoader

func (*Bundle) GetMSProjects added in v1.2.0

func (b *Bundle) GetMSProjects(orgID, userID string, params url.Values) ([]apistructs.MicroServiceProjectResponseData, error)

func (*Bundle) GetMemberByToken

func (b *Bundle) GetMemberByToken(request *apistructs.GetMemberByTokenRequest) (*apistructs.Member, error)

GetMemberByToken get member by token

func (*Bundle) GetMonitorAlertByID

func (b *Bundle) GetMonitorAlertByID(id int64) (*apistructs.Alert, error)

GetMonitorAlertByID .

func (*Bundle) GetMonitorAlertByScope

func (b *Bundle) GetMonitorAlertByScope(scope, scopeID string) (*apistructs.Alert, error)

GetMonitorAlertByScope .

func (*Bundle) GetMonitorCustomAlertByID

func (b *Bundle) GetMonitorCustomAlertByID(id int64) (*apistructs.Alert, error)

GetMonitorCustomAlertByID .

func (*Bundle) GetMonitorCustomAlertByScope

func (b *Bundle) GetMonitorCustomAlertByScope(scope, scopeID string) (*apistructs.Alert, error)

GetMonitorCustomAlertByScope .

func (*Bundle) GetMonitorReportTasksByID

func (b *Bundle) GetMonitorReportTasksByID(id int64) (*apistructs.ReportTask, error)

GetMonitorReportTasksByID .

func (*Bundle) GetMonitorStatusMetricDetails

func (b *Bundle) GetMonitorStatusMetricDetails(metricID string) (*apistructs.MonitorStatusMetricDetails, error)

GetMonitorStatusMetricDetails .

func (*Bundle) GetMyApps

func (b *Bundle) GetMyApps(userid string, orgid uint64) (*apistructs.ApplicationListResponseData, error)

func (*Bundle) GetMyProjectIDs added in v1.1.0

func (b *Bundle) GetMyProjectIDs(orgID uint64, userID string) ([]uint64, error)

GetMyProjectIDs get projectIDs by orgID adn userID from core-services.

func (*Bundle) GetNexusOrgDockerCredentialByImage

func (b *Bundle) GetNexusOrgDockerCredentialByImage(orgID uint64, image string) (*apistructs.NexusUser, error)

func (*Bundle) GetNotifyConfig

func (b *Bundle) GetNotifyConfig(orgIDstr, userID string) (*apistructs.NotifyConfigUpdateRequestBody, error)

GetNotifyConfig 获取通知配置

func (*Bundle) GetNotifyConfigMS

func (b *Bundle) GetNotifyConfigMS(userId, orgId string) (bool, error)

func (*Bundle) GetNotifyDetail

func (b *Bundle) GetNotifyDetail(id uint64) (*apistructs.DetailResponse, error)

func (*Bundle) GetNotifyGroupDetail

func (b *Bundle) GetNotifyGroupDetail(id int64, orgID int64, userID string) (*apistructs.NotifyGroupDetail, error)

GetNotifyGroupDetail 查询通知组详情

func (*Bundle) GetOpenapiOAuth2Token

applyOpenAPIToken 从 openapi 动态获取 oauth2 token

func (*Bundle) GetOrg

func (b *Bundle) GetOrg(idOrName interface{}) (*apistructs.OrgDTO, error)

GetOrg get org by id from core-service.

func (*Bundle) GetOrgAccount

func (b *Bundle) GetOrgAccount(orgId, vendor string) (*apistructs.CloudAccount, error)

GetOrgAccount 获取云账号信息

func (*Bundle) GetOrgByDomain

func (b *Bundle) GetOrgByDomain(domain, orgName, userID string) (*apistructs.OrgDTO, error)

GetOrgByDomain 通过域名获取企业

func (*Bundle) GetOrgClusterRelationsByOrg added in v1.1.0

func (b *Bundle) GetOrgClusterRelationsByOrg(orgID uint64) ([]apistructs.OrgClusterRelationDTO, error)

GetOrgClusterRelationsByOrg get orgClusters relation by orgID

func (*Bundle) GetPermissionByGitReference

func (b *Bundle) GetPermissionByGitReference(branch *apistructs.ValidBranch) string

func (*Bundle) GetPipeline

func (b *Bundle) GetPipeline(pipelineID uint64) (*apistructs.PipelineDetailDTO, error)

func (*Bundle) GetPipelineCron

func (b *Bundle) GetPipelineCron(cronID uint64) (*apistructs.PipelineCronDTO, error)

func (*Bundle) GetPipelineReportSet

func (b *Bundle) GetPipelineReportSet(pipelineID uint64, types []string) (*apistructs.PipelineReportSet, error)

func (*Bundle) GetPipelineTask

func (b *Bundle) GetPipelineTask(pipelineID, taskID uint64) (*apistructs.PipelineTaskDTO, error)

func (*Bundle) GetPipelineV2 added in v1.1.0

func (*Bundle) GetPodInfo

func (*Bundle) GetProject

func (b *Bundle) GetProject(id uint64) (*apistructs.ProjectDTO, error)

GetProject get project by id from core-services.

func (*Bundle) GetProjectBranchRules

func (b *Bundle) GetProjectBranchRules(projectId uint64) ([]*apistructs.BranchRule, error)

GetProjectBranchRules 查询项目分支规则

func (*Bundle) GetProjectByOrgIdAndName added in v1.1.0

func (b *Bundle) GetProjectByOrgIdAndName(orgId uint64, name string, userID string) (*apistructs.ProjectDTO, error)

GetProjectByOrgIdAndName get project by orgId and name from cmdb.

func (*Bundle) GetProjectListByStates added in v1.1.0

GetProjectListByStates list projects by states

func (*Bundle) GetProjectMetric

func (b *Bundle) GetProjectMetric(paramValues url.Values) (map[string]interface{}, error)

GetProjectMetric 项目资源汇总信息

func (*Bundle) GetProjectNamespaceInfo

func (b *Bundle) GetProjectNamespaceInfo(projectID uint64) (*apistructs.ProjectNameSpaceInfo, error)

GetProjectNamespaceInfo 获取项目级命名空间信息

func (*Bundle) GetProjectNamespaceWithoutErr

func (b *Bundle) GetProjectNamespaceWithoutErr(projectID uint64, workspace string) string

GetProjectNamespaceWithoutErr 忽略错误根据workspace获取项目级命名空间

func (*Bundle) GetPublishItem

func (b *Bundle) GetPublishItem(publishItemID int64) (*apistructs.PublishItem, error)

func (*Bundle) GetQaFileTreeNode

func (b *Bundle) GetQaFileTreeNode(req apistructs.UnifiedFileTreeNodeGetRequest, orgID uint64) (result *apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) GetRelease

func (b *Bundle) GetRelease(releaseID string) (*apistructs.ReleaseGetResponseData, error)

GetRelease 获取release信息

func (*Bundle) GetRuntimeServices

func (b *Bundle) GetRuntimeServices(runtimeID uint64, orgID uint64, userID string) (*GetRuntimeServicesResponseData, error)

func (*Bundle) GetRuntimes added in v1.1.0

func (b *Bundle) GetRuntimes(name, applicationId, workspace, orgID, userID string) ([]apistructs.RuntimeSummaryDTO, error)

func (*Bundle) GetSceneSet

func (b *Bundle) GetSceneSet(req apistructs.SceneSetRequest) (*apistructs.SceneSet, error)

func (*Bundle) GetSceneSets

func (b *Bundle) GetSceneSets(req apistructs.SceneSetRequest) ([]apistructs.SceneSet, error)

func (*Bundle) GetServiceGroupStatus

func (b *Bundle) GetServiceGroupStatus(namespace, name string) (*apistructs.MultiLevelStatus, error)

GetServiceGroupStatus will be DEPRECATED

func (*Bundle) GetTenantGroupDetails

func (b *Bundle) GetTenantGroupDetails(tenantGroup string) (*apistructs.TenantGroupDetails, error)

GetTenantGroupDetails .

func (*Bundle) GetTenantGroupID

func (b *Bundle) GetTenantGroupID(projectID uint64, workspace string) (id string, err error)

获取tenant-group id

func (*Bundle) GetTestAPI

func (b *Bundle) GetTestAPI(apiID int64) (*apistructs.ApiTestInfo, error)

GetTestAPI 获取指定 API 测试信息

func (*Bundle) GetTestPlanV2

func (b *Bundle) GetTestPlanV2(testPlanID uint64) (*apistructs.TestPlanV2GetResponse, error)

GetTestPlanV2 获取测试计划详情

func (*Bundle) GetTestPlanV2Step

func (b *Bundle) GetTestPlanV2Step(stepID uint64) (*apistructs.TestPlanV2Step, error)

GetTestPlanV2 获取测试计划步骤

func (*Bundle) GetTestSpace

func (b *Bundle) GetTestSpace(id uint64) (*apistructs.AutoTestSpace, error)

ListTestSpace 获取测试空间列表

func (*Bundle) GetUserRelationPublisher

func (b *Bundle) GetUserRelationPublisher(userID string, orgID string) (*apistructs.PagingPublisherDTO, error)

func (*Bundle) GetWorkbenchData

func (b *Bundle) GetWorkbenchData(userID string, req apistructs.WorkbenchRequest) (*apistructs.WorkbenchResponse, error)

func (*Bundle) GetWorkspaceClusterByAppBranch

func (b *Bundle) GetWorkspaceClusterByAppBranch(appID uint64, gitRef string) (
	app *apistructs.ApplicationDTO,
	project *apistructs.ProjectDTO,
	branchRule *apistructs.ValidBranch,
	workspace apistructs.DiceWorkspace,
	clusterName string,
	err error,
)

GetWorkspaceClusterByAppBranch 根据 appID 和 branch 返回环境和集群

func (*Bundle) GrantEndpointToClient

func (b *Bundle) GrantEndpointToClient(clientID, endpointID string) (err error)

授权调用方流量入口权限

func (*Bundle) IncreaseReference

func (b *Bundle) IncreaseReference(releaseID string) error

IncreaseReference 增加 release 引用

func (*Bundle) InspectServiceGroup

func (b *Bundle) InspectServiceGroup(namespace, name string) (
	*apistructs.ServiceGroup, error)

InspectServiceGroup get servicegroup info

func (*Bundle) InspectServiceGroupWithTimeout

func (b *Bundle) InspectServiceGroupWithTimeout(namespace, name string) (*apistructs.ServiceGroup, error)

TODO: an ugly hack, need refactor, it may cause goroutine explosion

func (*Bundle) InternalRemoveTestPlanCaseRelIssueRelationsByIssueID

func (b *Bundle) InternalRemoveTestPlanCaseRelIssueRelationsByIssueID(issueID uint64) error

InternalRemoveTestPlanCaseRelIssueRelationsByIssueID 内部使用,根据 issueID 删除测试计划用例与 bug 的关联关系

func (*Bundle) IsEnabledProjectNamespaceWithoutErr

func (b *Bundle) IsEnabledProjectNamespaceWithoutErr(projectID uint64) bool

IsEnabledProjectNamespaceWithoutErr 忽略错误获取项目级命名空间是否开启

func (*Bundle) KMSCreateKey

func (*Bundle) KMSDecrypt

func (*Bundle) KMSDescribeKey

func (*Bundle) KMSEncrypt

func (*Bundle) KMSGenerateDataKey

典型使用场景(信封加密): 在本地进行数据加密: 1. 调用 KMSGenerateDataKey 获取 DEK(数据加密密钥) 2. 使用 DEK 的明文,在本地完成离线数据加密,随后清除内存中的 DEK 明文 3. 将 DEK 的密文,和本地离线加密后的数据一并进行存储 在本地进行数据解密: 1. 调用 KMSDecrypt 解密本地存储的 DEK 密文,获取 DEK 明文 2. 使用 DEK 明文,在本地完成离线数据解密,随后清除内存中的 DEK 明文

func (*Bundle) KillPod

func (*Bundle) ListAccessKeys added in v1.1.0

func (b *Bundle) ListAccessKeys(req apistructs.AccessKeyListQueryRequest) ([]model.AccessKey, error)

func (*Bundle) ListAddonByRuntimeID

func (b *Bundle) ListAddonByRuntimeID(runtimeID string) (*apistructs.AddonListResponse, error)

ListAddonByRuntimeID 通过RuntimeID查询addon

func (*Bundle) ListApprove added in v1.1.0

func (b *Bundle) ListApprove(orgID uint64, userID string, params url.Values) (*apistructs.ApproveListResponse, error)

func (*Bundle) ListAuditEvent added in v1.1.0

func (b *Bundle) ListAuditEvent(orgID string, userID string, params url.Values) (*apistructs.AuditsListResponse, error)

func (*Bundle) ListAutoTestGlobalConfig

ListAutoTestGlobalConfig 获取全局配置

func (*Bundle) ListAutoTestScene

func (b *Bundle) ListAutoTestScene(req apistructs.AutotestSceneRequest) (uint64, []apistructs.AutoTestScene, error)

func (*Bundle) ListAutoTestSceneInput

func (b *Bundle) ListAutoTestSceneInput(req apistructs.AutotestSceneRequest) ([]apistructs.AutoTestSceneInput, error)

func (*Bundle) ListAutoTestSceneOutput

func (b *Bundle) ListAutoTestSceneOutput(req apistructs.AutotestSceneRequest) ([]apistructs.AutoTestSceneOutput, error)

func (*Bundle) ListAutoTestSceneStep

func (b *Bundle) ListAutoTestSceneStep(req apistructs.AutotestSceneRequest) ([]apistructs.AutoTestSceneStep, error)

func (*Bundle) ListAutoTestStepOutput

func (b *Bundle) ListAutoTestStepOutput(req apistructs.AutotestListStepOutPutRequest) (map[string]string, error)

func (*Bundle) ListByAddonName

func (b *Bundle) ListByAddonName(addonName, projectID, workspace string) (*apistructs.AddonNameResponse, error)

ListByAddonName 通过addonName查询数据

func (*Bundle) ListClusters

func (b *Bundle) ListClusters(clusterType string, orgID ...uint64) ([]apistructs.ClusterInfo, error)

ListClusters 返回 org 下所有集群; 当 orgID == "" 时,返回所有集群.

func (*Bundle) ListClustersWithType added in v1.2.0

func (b *Bundle) ListClustersWithType(clusterType string) ([]apistructs.ClusterInfo, error)

ListClustersWithType List clusters with cluster type

func (*Bundle) ListDopOrgs added in v1.1.0

ListDopOrgs 分页查询企业

func (*Bundle) ListDopProject added in v1.1.0

func (b *Bundle) ListDopProject(userID string, req apistructs.ProjectListRequest) (*apistructs.PagingProjectDTO, error)

func (*Bundle) ListDopPublicOrgs added in v1.1.0

func (b *Bundle) ListDopPublicOrgs(req *apistructs.OrgSearchRequest) (*apistructs.PagingOrgDTO, error)

ListDopPublicOrgs get list of public orgs form dop

func (*Bundle) ListEdgeCluster

func (b *Bundle) ListEdgeCluster(orgID uint64, valueType string, identify apistructs.Identity) ([]map[string]interface{}, error)

func (*Bundle) ListEdgeSelectApps

func (b *Bundle) ListEdgeSelectApps(orgID, clusterID int64, exceptName string, valueType string, identify apistructs.Identity) ([]map[string]interface{}, error)

func (*Bundle) ListEdgeSelectConfigSet

func (b *Bundle) ListEdgeSelectConfigSet(orgID, clusterID int64, valueType string, identify apistructs.Identity) ([]map[string]interface{}, error)

func (*Bundle) ListEdgeSelectSite

func (b *Bundle) ListEdgeSelectSite(orgID, clusterID int64, valueType string, identify apistructs.Identity) ([]map[string]interface{}, error)

func (*Bundle) ListFileRecords added in v1.1.0

func (*Bundle) ListFileTreeNodes

func (b *Bundle) ListFileTreeNodes(req apistructs.UnifiedFileTreeNodeListRequest, orgID uint64) (results []apistructs.UnifiedFileTreeNode, err error)

func (*Bundle) ListGittarFileTreeNodes

func (b *Bundle) ListGittarFileTreeNodes(req apistructs.UnifiedFileTreeNodeListRequest, orgID uint64) (results []apistructs.UnifiedFileTreeNode, err error)

gittar

func (*Bundle) ListLabel added in v1.1.0

ListLabel list label

func (*Bundle) ListLabelByIDs added in v1.1.0

func (b *Bundle) ListLabelByIDs(ids []uint64) ([]apistructs.ProjectLabel, error)

ListLabelByIDs list label by ids

func (*Bundle) ListLabelByNameAndProjectID added in v1.1.0

func (b *Bundle) ListLabelByNameAndProjectID(projectID uint64, names []string) ([]apistructs.ProjectLabel, error)

ListLabelByNameAndProjectID list label by names and projectID

func (*Bundle) ListMemberRoles added in v1.1.0

ListMemberRoles list member roles

func (*Bundle) ListMemberRolesByUser

ListMemberRolesByUser 查看某个用户在一个scope下的权限

func (*Bundle) ListMembers

func (b *Bundle) ListMembers(req apistructs.MemberListRequest) ([]apistructs.Member, error)

func (*Bundle) ListMyProject

func (b *Bundle) ListMyProject(userID string, req apistructs.ProjectListRequest) (*apistructs.PagingProjectDTO, error)

ListMyProject 获取用户加入的项目

func (*Bundle) ListNoticeByOrgID

func (b *Bundle) ListNoticeByOrgID(orgID uint64, userID string, params url.Values) (*apistructs.NoticeListResponse, error)

func (*Bundle) ListOrgs

func (b *Bundle) ListOrgs(req *apistructs.OrgSearchRequest, orgID string) (*apistructs.PagingOrgDTO, error)

ListOrgs 分页查询企业

func (*Bundle) ListProject

func (*Bundle) ListProjectIterations

func (b *Bundle) ListProjectIterations(req apistructs.IterationPagingRequest, orgID string) ([]apistructs.Iteration, error)

ListProjectIterations 查询项目迭代

func (*Bundle) ListPublicOrgs

func (b *Bundle) ListPublicOrgs(req *apistructs.OrgSearchRequest) (*apistructs.PagingOrgDTO, error)

ListPublicOrgs get list of public orgs

func (*Bundle) ListPublicProject

func (b *Bundle) ListPublicProject(userID string, req apistructs.ProjectListRequest) (*apistructs.PagingProjectDTO, error)

ListPublicProject 获取公开项目列表

func (*Bundle) ListQaFileTreeNodes

func (b *Bundle) ListQaFileTreeNodes(req apistructs.UnifiedFileTreeNodeListRequest, orgID uint64) (results []apistructs.UnifiedFileTreeNode, err error)

qa

func (*Bundle) ListScopeManagersByScopeID added in v1.1.0

func (b *Bundle) ListScopeManagersByScopeID(req apistructs.ListScopeManagersByScopeIDRequest) (
	[]apistructs.Member, error)

ListScopeManagersByScopeID list manages by scopeID

func (*Bundle) ListScopeRole

func (b *Bundle) ListScopeRole(userID, orgID string) (*apistructs.ScopeRoleList, error)

ListScopeRole 获取给定用户所有角色权限

func (*Bundle) ListTestAPI

func (b *Bundle) ListTestAPI(usecaseID int64) ([]*apistructs.ApiTestInfo, error)

ListTestAPI 获取 API 测试列表

func (*Bundle) ListTestPlanCaseRel

func (b *Bundle) ListTestPlanCaseRel(testCaseIDs []uint64) ([]apistructs.TestPlanCaseRel, error)

func (*Bundle) ListTestSpace

func (b *Bundle) ListTestSpace(projectID int64, pageSize int64, pageNo int64) (*apistructs.AutoTestSpaceList, error)

ListTestSpace 获取测试空间列表

func (*Bundle) ListTicket

ListTicket 工单列表

func (*Bundle) ListUsers

func (*Bundle) MetricsRouting

func (b *Bundle) MetricsRouting(pathRouting, name string, paramValues url.Values) (interface{}, error)

GetProjectMetric 项目资源汇总信息

func (*Bundle) MoveAutoTestScene

func (b *Bundle) MoveAutoTestScene(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) MoveAutoTestSceneStep

func (b *Bundle) MoveAutoTestSceneStep(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) MoveTestPlansV2Step

func (b *Bundle) MoveTestPlansV2Step(req apistructs.TestPlanV2StepUpdateRequest) error

MoveTestPlansV2Step 移动测试计划步骤

func (*Bundle) MySQLCheck

func (b *Bundle) MySQLCheck(mysqlExec *apistructs.MysqlExec, soldierUrl string) error

MySQLCheck 主从初始化

func (*Bundle) MySQLExec

func (b *Bundle) MySQLExec(mysqlExec *apistructs.MysqlExec, soldierUrl string) error

MySQLExec 初始化mysql数据库

func (*Bundle) MySQLExecFile

func (b *Bundle) MySQLExecFile(mysqlExec *apistructs.MysqlExec, soldierUrl string) error

MySQLExecFile 初始化mysql init.sql

func (*Bundle) MySQLInit

func (b *Bundle) MySQLInit(mysqlExecList *[]apistructs.MysqlExec, soldierUrl string) error

MySQLInit 主从初始化

func (*Bundle) NotifyList

func (b *Bundle) NotifyList(req apistructs.NotifyPageRequest) (*[]apistructs.DataItem, error)

func (*Bundle) OfflineEdgeAppSite

func (b *Bundle) OfflineEdgeAppSite(appID uint64, req *apistructs.EdgeAppSiteRequest, identify apistructs.Identity) error

func (*Bundle) OperatePipeline

func (b *Bundle) OperatePipeline(pipelineID uint64, req apistructs.PipelineOperateRequest) error

func (*Bundle) PageIssues

func (*Bundle) PagingTestPlansV2

PagingTestPlansV2 分页查询测试计划列表

func (*Bundle) ParsePipelineYmlGraph

func (b *Bundle) ParsePipelineYmlGraph(req apistructs.PipelineYmlParseGraphRequest) (*apistructs.PipelineYml, error)

ParsePipelineYmlGraph 解析并校验 pipeline yaml 文件

func (*Bundle) PatchCluster added in v1.1.0

func (b *Bundle) PatchCluster(req *apistructs.ClusterPatchRequest, header ...http.Header) error

PatchCluster patch cluster with event

func (*Bundle) ProjectResource

func (b *Bundle) ProjectResource(projectIDs []uint64) (*apistructs.ProjectResourceResponse, error)

UnregisterAddon 注销 runtime addon

func (*Bundle) PublishORUnPublishNotice

func (b *Bundle) PublishORUnPublishNotice(orgID uint64, noticeID uint64, userID, publishType string) error

func (*Bundle) PublisherItemRefered

func (b *Bundle) PublisherItemRefered(libID uint64) (uint64, error)

PublisherItemRefered 根据发布内容 id 查看是否被库应用引用

func (*Bundle) PushLog

func (b *Bundle) PushLog(req *apistructs.LogPushRequest) error

PushLog 推日志

func (*Bundle) PutRuntimeService

func (b *Bundle) PutRuntimeService(req *apistructs.RuntimeServiceRequest) error

PutRuntimeService 部署runtime之后,orchestrator需要将服务域名信息通过此接口提交给hepa

func (*Bundle) QueryAppPublishItemRelations

QueryAppPublishItemRelations 查询应用关联的发布内容

func (*Bundle) QueryClusterInfo

func (b *Bundle) QueryClusterInfo(name string) (apistructs.ClusterInfoData, error)

QueryClusterInfo 查询集群信息

func (*Bundle) QueryExtensionVersions

func (b *Bundle) QueryExtensionVersions(req apistructs.ExtensionVersionQueryRequest) ([]apistructs.ExtensionVersion, error)

func (*Bundle) QueryExtensions

func (b *Bundle) QueryExtensions(req apistructs.ExtensionQueryRequest) ([]apistructs.Extension, error)

func (*Bundle) QueryNotifiesBySource

func (b *Bundle) QueryNotifiesBySource(orgID string, sourceType, sourceID, itemName, label string, clusterNames ...string) ([]*apistructs.NotifyDetail, error)

func (*Bundle) QueryPublishItems

func (*Bundle) RegisterConfig added in v1.1.0

func (b *Bundle) RegisterConfig(desc string, configList []apistructs.MonitorConfig) error

func (*Bundle) RegisterGittarHook

func (b *Bundle) RegisterGittarHook(r apistructs.GittarRegisterHookRequest) error

RegisterGittarHook 向 gittar 注册 webhook

func (*Bundle) RemoveAppPublishItemRelations

func (b *Bundle) RemoveAppPublishItemRelations(publishItemID int64) error

func (*Bundle) RenderPipelineTemplate

func (*Bundle) ReopenTicket

func (b *Bundle) ReopenTicket(ticketID int64, userID string) (int64, error)

ReopenTicket 重新打开工单

func (*Bundle) RerunFailedPipeline

func (b *Bundle) RerunFailedPipeline(req apistructs.PipelineRerunFailedRequest) (*apistructs.PipelineDTO, error)

func (*Bundle) RerunPipeline

func (*Bundle) ResetClientCredentials

func (b *Bundle) ResetClientCredentials(clientID string) (dto *apistructs.ClientInfoDto, err error)

重置调用方密钥

func (*Bundle) ResourceInfo

func (b *Bundle) ResourceInfo(clustername string, brief bool) (*apistructs.ClusterResourceInfoData, error)

PARAM: brief, 是否需要已使用资源信息

func (*Bundle) RestartEdgeAppSite

func (b *Bundle) RestartEdgeAppSite(appID uint64, req *apistructs.EdgeAppSiteRequest, identify apistructs.Identity) error

func (*Bundle) RevokeEndpointFromClient

func (b *Bundle) RevokeEndpointFromClient(clientID, endpointID string) (err error)

收回调用方流量入口权限

func (*Bundle) RunPipeline

func (b *Bundle) RunPipeline(req apistructs.PipelineRunRequest) error

func (*Bundle) RunSoldierScript

func (b *Bundle) RunSoldierScript(scriptName string, params map[string]string) error

func (*Bundle) ScaleServiceGroup added in v1.0.1

func (b *Bundle) ScaleServiceGroup(sg apistructs.UpdateServiceGroupScaleRequst) error

ScaleServiceGroup scale service group

func (*Bundle) ScopeRoleAccess

func (b *Bundle) ScopeRoleAccess(userID string, req *apistructs.ScopeRoleAccessRequest) (*apistructs.ScopeRole, error)

ScopeRoleAccess 查询给定用户是否有相应权限

func (*Bundle) SearchAPIOperations

func (b *Bundle) SearchAPIOperations(orgID uint64, userID string, keyword string) ([]*apistructs.APIOperationSummary, error)

SearchAPIOperations 从集市中搜索 API 列表 keyword 可以为接口名(对应 oas3 文件中的 operationId) 或路径

func (*Bundle) SearchExtensions

func (*Bundle) SearchGittarFiles

func (b *Bundle) SearchGittarFiles(appID int64, ref string, pattern string, basePath string, depth int64) ([]*apistructs.TreeEntry, error)

SearchGittarFiles 获取仓库概览信息

func (*Bundle) SearchUser added in v1.1.0

func (b *Bundle) SearchUser(params url.Values) (*apistructs.UserListResponseData, error)

func (*Bundle) ServiceGroupConfigUpdate

func (b *Bundle) ServiceGroupConfigUpdate(sg apistructs.ServiceGroup) error

InspectServiceGroup get servicegroup info

func (*Bundle) StartJob added in v1.1.0

func (b *Bundle) StartJob(namespace string, name string) (jsonResp apistructs.JobStartResponse, err error)

func (*Bundle) StartPipelineCron

func (b *Bundle) StartPipelineCron(cronID uint64) (*apistructs.PipelineCronDTO, error)

func (*Bundle) StateCheckPermission added in v1.1.0

StateCheckPermission 鉴权

func (*Bundle) StopJob added in v1.1.0

func (b *Bundle) StopJob(namespace string, name string) (jsonResp apistructs.JobStopResponse, err error)

func (*Bundle) StopPipelineCron

func (b *Bundle) StopPipelineCron(cronID uint64) (*apistructs.PipelineCronDTO, error)

func (*Bundle) SwitchNotifyRecord

func (b *Bundle) SwitchNotifyRecord(scope, scopeId, userId string, operation *apistructs.SwitchOperationData) error

func (*Bundle) UpdateApp added in v1.1.0

func (b *Bundle) UpdateApp(req apistructs.ApplicationUpdateRequestBody, appID uint64, userID string) (interface{}, error)

UpdateApp update app

func (*Bundle) UpdateApprove added in v1.1.0

func (b *Bundle) UpdateApprove(orgID uint64, userID string, approveID int64, body io.Reader) (
	*apistructs.ApproveUpdateResponse, error)

func (*Bundle) UpdateAutoTestScene

func (b *Bundle) UpdateAutoTestScene(req apistructs.AutotestSceneSceneUpdateRequest) (uint64, error)

func (*Bundle) UpdateAutoTestSceneInputs

func (b *Bundle) UpdateAutoTestSceneInputs(req apistructs.AutotestSceneInputUpdateRequest) (uint64, error)

func (*Bundle) UpdateAutoTestSceneOutput

func (b *Bundle) UpdateAutoTestSceneOutput(req apistructs.AutotestSceneOutputUpdateRequest) (uint64, error)

func (*Bundle) UpdateAutoTestSceneStep

func (b *Bundle) UpdateAutoTestSceneStep(req apistructs.AutotestSceneRequest) (uint64, error)

func (*Bundle) UpdateCluster

func (b *Bundle) UpdateCluster(req apistructs.ClusterUpdateRequest, header ...http.Header) error

UpdateCluster update cluster

func (*Bundle) UpdateEdgeApp

func (b *Bundle) UpdateEdgeApp(req *apistructs.EdgeAppUpdateRequest, appID uint64, identify apistructs.Identity) error

func (*Bundle) UpdateEdgeCfgSetItem

func (b *Bundle) UpdateEdgeCfgSetItem(req *apistructs.EdgeCfgSetItemUpdateRequest, cfgSetItemID int64, identify apistructs.Identity) error

func (*Bundle) UpdateEdgeConfigset

func (b *Bundle) UpdateEdgeConfigset(req *apistructs.EdgeConfigSetUpdateRequest, siteID int64, identify apistructs.Identity) error

func (*Bundle) UpdateEdgeSite

func (b *Bundle) UpdateEdgeSite(req *apistructs.EdgeSiteUpdateRequest, siteID int64, identify apistructs.Identity) error

func (*Bundle) UpdateEndpoint

func (b *Bundle) UpdateEndpoint(endpointID string, packageDto apistructs.PackageDto) (err error)

更新流量入口

func (*Bundle) UpdateIssuePanel

func (b *Bundle) UpdateIssuePanel(req apistructs.IssuePanelRequest) (int64, error)

func (*Bundle) UpdateIssuePanelIssue

func (b *Bundle) UpdateIssuePanelIssue(userID string, panelID, issueID, projectID int64) error

UpdateIssuePanelIssue 更新事件所属看板

func (*Bundle) UpdateIssueTicket

func (b *Bundle) UpdateIssueTicket(updateReq apistructs.IssueUpdateRequest, issueID uint64) error

UpdateIssueTicket 更新ticket

func (*Bundle) UpdateIssueTicketUser

func (b *Bundle) UpdateIssueTicketUser(UserID string, updateReq apistructs.IssueUpdateRequest, issueID uint64) error

UpdateIssueTicketUser 更新ticket,带User-ID

func (*Bundle) UpdateMemberUserInfo

func (b *Bundle) UpdateMemberUserInfo(req apistructs.MemberUserInfoUpdateRequest) error

UpdateMemberUserInfo 更新成员的用户信息

func (*Bundle) UpdateNotice added in v1.1.0

func (b *Bundle) UpdateNotice(noticeID, orgID uint64, userID string, body io.Reader) (
	*apistructs.NoticeUpdateResponse, error)

func (*Bundle) UpdateOrg added in v1.1.0

func (b *Bundle) UpdateOrg(userID string, orgID int64, req *apistructs.OrgUpdateRequestBody) (*apistructs.OrgDTO, error)

UpdateOrg update org

func (*Bundle) UpdatePipelineCron added in v1.1.0

func (b *Bundle) UpdatePipelineCron(req apistructs.PipelineCronUpdateRequest) error

UpdatePipelineCron update pipeline cron

func (*Bundle) UpdateProjectActiveTime

func (b *Bundle) UpdateProjectActiveTime(req apistructs.ProjectActiveTimeUpdateRequest) error

UpdateProjectActiveTime 更新项目活跃时间

func (*Bundle) UpdateReference

func (b *Bundle) UpdateReference(releaseID string, increase ...bool) error

UpdateReference 更新 release 引用

func (*Bundle) UpdateRepo

func (b *Bundle) UpdateRepo(request apistructs.UpdateRepoRequest) error

UpdateRepo 更新仓库配置

func (*Bundle) UpdateSceneSet

func (b *Bundle) UpdateSceneSet(req apistructs.SceneSetRequest) (*apistructs.SceneSet, error)

func (*Bundle) UpdateServiceGroup

func (b *Bundle) UpdateServiceGroup(sg apistructs.ServiceGroupUpdateV2Request) error

UpdateServiceGroup update servicegroup

func (*Bundle) UpdateTestAPI

func (b *Bundle) UpdateTestAPI(req apistructs.ApiTestInfo) error

UpdateTestAPI 更新 API 测试

func (*Bundle) UpdateTestPlanV2

func (b *Bundle) UpdateTestPlanV2(req apistructs.TestPlanV2UpdateRequest) error

UpdateTestPlanV2 更新测试计划

func (*Bundle) UpdateTestPlanV2Step

func (b *Bundle) UpdateTestPlanV2Step(req apistructs.TestPlanV2StepUpdateRequest) error

GetTestPlanV2 获取测试计划步骤

func (*Bundle) UpdateTestSpace

func (b *Bundle) UpdateTestSpace(name string, id uint64, description string, userID string) error

UpdateTestSpace 更新测试空间

func (*Bundle) UploadFile

func (b *Bundle) UploadFile(req apistructs.FileUploadRequest, clientTimeout ...int64) (*apistructs.File, error)

UploadFile 上传文件

type CreateAPIAssetResponse

type CreateAPIAssetResponse struct {
	apistructs.Header
	Data apistructs.APIAssetID `json:"data"`
}

type GetApplicationRuntimesDataEle

type GetApplicationRuntimesDataEle struct {
	ID                    uint64                              `json:"id"`
	Name                  string                              `json:"name"`
	ClusterID             uint64                              `json:"clusterId"`
	ClusterName           string                              `json:"clusterName"`
	ClusterType           string                              `json:"clusterType"`
	CreatedAt             time.Time                           `json:"createdAt"`
	DeleteStatus          string                              `json:"deleteStatus"`
	DeployStatus          string                              `json:"deployStatus"`
	Errors                interface{}                         `json:"errors"`
	Extra                 *GetApplicationRuntimesDataEleExtra `json:"extra"`
	LastMessage           interface{}                         `json:"lastMessage"`
	LastOperateTime       time.Time                           `json:"lastOperateTime"`
	LastOperator          string                              `json:"lastOperator"`
	LastOperatorAvatar    string                              `json:"lastOperatorAvatar"`
	LastOperatorName      string                              `json:"lastOperatorName"`
	ProjectID             uint64                              `json:"projectId"`
	ReleaseID             string                              `json:"releaseId"`
	ServiceGroupName      string                              `json:"serviceGroupName"`
	ServiceGroupNamespace string                              `json:"serviceGroupNamespace"`
	Services              interface{}                         `json:"services"`
	Source                string                              `json:"source"`
	Status                string                              `json:"status"`
	TimeCreated           time.Time                           `json:"timeCreated"`
	UpdatedAt             time.Time                           `json:"updatedAt"`
}

type GetApplicationRuntimesDataEleExtra

type GetApplicationRuntimesDataEleExtra struct {
	ApplicationID uint64
	BuildID       uint64
	Workspace     string
}

type GetApplicationRuntimesResponse

type GetApplicationRuntimesResponse struct {
	apistructs.Header
	Data []*GetApplicationRuntimesDataEle
}

type GetRuntimeServicesResponse

type GetRuntimeServicesResponse struct {
	apistructs.Header
	Data *GetRuntimeServicesResponseData
}

type GetRuntimeServicesResponseData

type GetRuntimeServicesResponseData struct {
	ID                    uint64                                            `json:"id"`
	Name                  string                                            `json:"name"`
	ServiceGroupName      string                                            `json:"serviceGroupName"`
	ServiceGroupNamespace string                                            `json:"serviceGroupNamespace"`
	Source                string                                            `json:"source"`
	Status                string                                            `json:"status"`
	DeployStatus          string                                            `json:"deployStatus"`
	DeleteStatus          string                                            `json:"deleteStatus"`
	ReleaseId             string                                            `json:"releaseId"`
	ClusterId             uint64                                            `json:"clusterId"`
	ClusterName           string                                            `json:"clusterName"`
	ClusterType           string                                            `json:"clusterType"`
	Extra                 *GetRuntimeServicesResponseDataExtra              `json:"extra"`
	ProjectID             uint64                                            `json:"projectId"`
	Services              map[string]*GetRuntimeServicesResponseDataService `json:"services"`
}

type GetRuntimeServicesResponseDataExtra

type GetRuntimeServicesResponseDataExtra struct {
	ApplicationId uint64 `json:"applicationId"`
	BuildId       uint64 `json:"buildId"`
	Workspace     string `json:"workspace"`
}

type GetRuntimeServicesResponseDataService

type GetRuntimeServicesResponseDataService struct {
	Addrs  []string `json:"addrs"`
	Expose []string `json:"expose"`
}

type GittarFileTree

type GittarFileTree struct {
	url.Values
}

GittarFileTree 用以描述 gittar 文件路径

func NewGittarFileTree

func NewGittarFileTree(inode string) (*GittarFileTree, error)

func (*GittarFileTree) ApplicationID

func (t *GittarFileTree) ApplicationID() string

func (*GittarFileTree) ApplicationName

func (t *GittarFileTree) ApplicationName() string

func (*GittarFileTree) BlobPath

func (t *GittarFileTree) BlobPath() string

/wb/{projectName}/{appName}/blob/{branch}/{pathFromRepoRoot}

func (*GittarFileTree) BranchName

func (t *GittarFileTree) BranchName() string

func (*GittarFileTree) BranchesPath

func (t *GittarFileTree) BranchesPath() string

func (*GittarFileTree) Clone

func (t *GittarFileTree) Clone() *GittarFileTree

func (*GittarFileTree) DeletePathFromRepoRoot

func (t *GittarFileTree) DeletePathFromRepoRoot() *GittarFileTree

func (*GittarFileTree) Inode

func (t *GittarFileTree) Inode() string

func (*GittarFileTree) PathFromRepoRoot

func (t *GittarFileTree) PathFromRepoRoot() string

func (*GittarFileTree) ProjectID

func (t *GittarFileTree) ProjectID() string

func (*GittarFileTree) ProjectName

func (t *GittarFileTree) ProjectName() string

func (*GittarFileTree) RepoPath

func (t *GittarFileTree) RepoPath() string

func (*GittarFileTree) SetApplicationIDName

func (t *GittarFileTree) SetApplicationIDName(id, name string) *GittarFileTree

func (*GittarFileTree) SetBranchName

func (t *GittarFileTree) SetBranchName(name string) *GittarFileTree

func (*GittarFileTree) SetPathFromRepoRoot

func (t *GittarFileTree) SetPathFromRepoRoot(name string) *GittarFileTree

func (*GittarFileTree) SetProjectIDName

func (t *GittarFileTree) SetProjectIDName(id, name string) *GittarFileTree

func (*GittarFileTree) TreePath

func (t *GittarFileTree) TreePath() string

/wb/{projectName}/{appName}/tree/{branch}/{pathFromRepoRoot}

type GittarLines

type GittarLines struct {
	Repo     string
	CommitID string
	Path     string
	Since    string
	To       string
}

GittarLines 获取指定代码行数的参数

type Option

type Option func(*Bundle)

Option 定义 Bundle 对象的配置选项.

func WithAPIM

func WithAPIM() Option

func WithAddOnPlatform

func WithAddOnPlatform() Option

WithAddOnPlatform 根据环境变量配置创建 addOnPlatform 客户端.

func WithAllAvailableClients

func WithAllAvailableClients() Option

WithAllAvailableClients 将环境变量中所有可以拿到的客户端均注入

func WithCMDB

func WithCMDB() Option

WithCMDB 根据环境变量配置创建 cmdb 客户端.

func WithCMP added in v1.1.0

func WithCMP() Option

WithCMP 根据环境变量配置创建 cmp 客户端.

func WithClusterManager added in v1.1.0

func WithClusterManager() Option

WithClusterManager create cluster manager client with CLUSTER_MANAGER

func WithCollector

func WithCollector() Option

WithCollector 根据环境变量创建 collector 客户端

func WithCoreServices added in v1.1.0

func WithCoreServices() Option

func WithDOP added in v1.1.0

func WithDOP() Option

func WithDiceHub

func WithDiceHub() Option

WithDiceHub 根据环境变量配置创建 dicehub 客户端.

func WithECP added in v1.1.0

func WithECP() Option

WithECP create ecp client with CLUSTER_MANAGER

func WithEventBox

func WithEventBox() Option

WithEventBox 根据环境变量配置创建 eventbox 客户端.

func WithGittar

func WithGittar() Option

WithGittar 根据环境变量创建 gittar 客户端

func WithGittarAdaptor

func WithGittarAdaptor() Option

WithGittarAdaptor 根据环境变量创建 gittar-adaptor 客户端

func WithHTTPClient

func WithHTTPClient(hc *httpclient.HTTPClient) Option

WithHTTPClient 配置 http 客户端对象.

func WithHepa

func WithHepa() Option

WithHepa 根据环境变量创建 hepa 客户端

func WithI18nLoader

func WithI18nLoader(i18nLoader *i18n.LocaleResourceLoader) Option

WithI18nLoader 配置 i18n对象

func WithKMS

func WithKMS() Option

func WithMSP added in v1.1.0

func WithMSP() Option

WithMSP 根据环境变量创建 msp 客户端

func WithMonitor

func WithMonitor() Option

WithMonitor 根据环境变量创建 monitor 客户端

func WithOpenapi

func WithOpenapi() Option

WithOpenapi 根据环境变量配置创建 openapi 客户端.

func WithOrchestrator

func WithOrchestrator() Option

WithOrchestrator 根据环境变量配置创建 orachestrator 客户端.

func WithPipeline

func WithPipeline() Option

func WithQA

func WithQA() Option

WithQA 根据环境变量配置创建 QA 客户端.

func WithScheduler

func WithScheduler() Option

WithScheduler 根据环境变量配置创建 scheduler 客户端.

func WithSoldier

func WithSoldier(addr ...string) Option

WithSoldier 根据环境变量配置创建 soldier 客户端. 支持直接设置 addr,优先级高于环境变量.

func WithTMC

func WithTMC() Option

WithTMC 根据环境变量创建 tmc 客户端

type RoleInfo

type RoleInfo struct {
	Role      string `json:"role"`
	IsHide    bool   `json:"isHide"`
	I18nKey   string `json:"i18nKey"`
	IsManager bool   `json:"isManager"`
	// 用来排序的字段
	Level int `json:"-"`
}

RoleInfo Role info

type SearchAPIOperationHandle

type SearchAPIOperationHandle interface {
	// SearchAPIOperations 从集市中搜索 API 列表
	// keyword 可以为接口名(对应 oas3 文件中的 operationId) 或路径
	SearchAPIOperations(keyword string) ([]*apistructs.APIOperationSummary, error)

	// APIOperationSummary 接口摘要信息, 作为搜索结果列表的 item
	// 其中 AssetID + Version + Path + Method 能确定唯一的一篇文档
	GetAPIOperation(assetID, version, path, method string) (*apistructs.APIOperation, error)
}

SearchAPIOperationHandle 操作集市 API 搜索的手柄

type Sender

type Sender = string

Sender alias as string

const (
	SenderCMDB           Sender = "cmdb"
	SenderDiceHub        Sender = "dicehub"
	SenderScheduler      Sender = "scheduler"
	SenderOrchestrator   Sender = "orchestrator"
	SenderCoreServices   Sender = "coreServices"
	SenderClusterManager Sender = "clusterManager"
	SenderDOP            Sender = "dop"
	SenderGittar         Sender = "gittar"
)

Event sender collections

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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