service

package
v0.0.0-...-7404c28 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 89 Imported by: 0

Documentation

Overview

Package service NOTES

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoSyncer

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

RepoSyncer is repo syncer which sync file from master to slave repo

func NewRepoSyncer

func NewRepoSyncer(set dao.Set, repo repository.Provider, spaceMgr *space.Manager, sd serviced.Service) *RepoSyncer

NewRepoSyncer new repo syncer

func (*RepoSyncer) Run

func (s *RepoSyncer) Run()

Run runs the repo syncer

type Service

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

Service do all the data service's work

func NewService

func NewService(sd serviced.Service, ssd serviced.ServiceDiscover, daoSet dao.Set, vaultSet vault.Set,
	esb client.Client, repo repository.Provider) (*Service, error)

NewService create a service instance.

func (*Service) AddTmplsToTmplSets

func (s *Service) AddTmplsToTmplSets(ctx context.Context, req *pbds.AddTmplsToTmplSetsReq) (
	*pbbase.EmptyResp, error)

AddTmplsToTmplSets add templates to template sets.

func (*Service) Approve

func (s *Service) Approve(ctx context.Context, req *pbds.ApproveReq) (*pbds.ApproveResp, error)

Approve publish approve. nolint funlen

func (*Service) BatchDeleteTemplate

func (s *Service) BatchDeleteTemplate(ctx context.Context, req *pbds.BatchDeleteTemplateReq) (*pbbase.EmptyResp,
	error)

BatchDeleteTemplate delete template in batch. nolint: funlen

func (*Service) BatchUpdateLastConsumedTime

BatchUpdateLastConsumedTime 批量更新最后一次拉取时间

func (*Service) BatchUpdateTemplatePermissions

BatchUpdateTemplatePermissions 批量更新模板权限 nolint:funlen

func (*Service) BatchUpsertClientMetrics

func (s *Service) BatchUpsertClientMetrics(ctx context.Context, req *pbds.BatchUpsertClientMetricsReq) (
	*pbds.BatchUpsertClientMetricsResp, error)

BatchUpsertClientMetrics 批量操作client metrics

func (*Service) BatchUpsertConfigItems

func (s *Service) BatchUpsertConfigItems(ctx context.Context, req *pbds.BatchUpsertConfigItemsReq) (
	*pbds.BatchUpsertConfigItemsResp, error)

BatchUpsertConfigItems batch upsert config items. nolint:funlen

func (*Service) BatchUpsertKvs

func (s *Service) BatchUpsertKvs(ctx context.Context, req *pbds.BatchUpsertKvsReq) (*pbds.BatchUpsertKvsResp, error)

BatchUpsertKvs is used to insert or update key-value data in bulk. 1.键存在则更新, 类型不一致直接提示错误 2.键不存在则新增 replace_all为true时,清空表中的数据,但保证前面两条逻辑 nolint:funlen

func (*Service) BatchUpsertTemplates

func (s *Service) BatchUpsertTemplates(ctx context.Context, req *pbds.BatchUpsertTemplatesReq) (
	*pbds.BatchUpsertTemplatesReqResp, error)

BatchUpsertTemplates batch upsert templates. nolint:funlen

func (*Service) CascadeUpdateATB

func (s *Service) CascadeUpdateATB(kt *kit.Kit, tx *gen.QueryTx, atb *table.AppTemplateBinding) error

CascadeUpdateATB update app template binding in cascaded way. Only called by bscp system itself, no need to validate the input, but need the uniqueness verification.

在模版/套餐有被服务引用的情况下,如下场景需要级联更新应用模版绑定数据: 1.对套餐添加/移出模板 (更新套餐接口、添加模版到套餐接口、从套餐移出模版接口) 2.删除套餐(删除套餐接口) 3.创建模版时指定了套餐(创建模版接口) 4.删除模版(删除模版接口、批量删除模版接口) 5.创建模版版本(创建模版版本接口) 6.删除模版版本(删除模版版本接口,暂不开放该接口)

func (*Service) CheckAppTemplateBinding

func (s *Service) CheckAppTemplateBinding(ctx context.Context, req *pbds.CheckAppTemplateBindingReq) (
	*pbds.CheckAppTemplateBindingResp, error)

CheckAppTemplateBinding check conflicts of app template binding.

func (*Service) CheckClientQueryName

func (s *Service) CheckClientQueryName(ctx context.Context, req *pbds.CheckClientQueryNameReq) (
	*pbds.CheckClientQueryNameResp, error)

CheckClientQueryName 检查客户端查询名称

func (*Service) CheckCredentialName

func (s *Service) CheckCredentialName(ctx context.Context, req *pbds.CheckCredentialNameReq) (
	*pbds.CheckCredentialNameResp, error)

CheckCredentialName Check if the credential name exists

func (*Service) CheckReleaseName

func (s *Service) CheckReleaseName(ctx context.Context, req *pbds.CheckReleaseNameReq) (
	*pbds.CheckReleaseNameResp, error)

CheckReleaseName 检测某个服务下已发布的名称是否存在

func (*Service) CheckTemplateSetReferencesApps

CheckTemplateSetReferencesApps 检测模板套餐绑定服务是否超出 nolint:funlen

func (*Service) ClientAnnotationStatistics

func (s *Service) ClientAnnotationStatistics(_ context.Context, _ *pbclient.ClientCommonReq) (
	*structpb.Struct, error)

ClientAnnotationStatistics 客户端附加信息统计

func (*Service) ClientConfigVersionStatistics

func (s *Service) ClientConfigVersionStatistics(ctx context.Context, req *pbclient.ClientCommonReq) (
	*structpb.Struct, error)

ClientConfigVersionStatistics 客户端配置版本统计

func (*Service) ClientLabelStatistics

func (s *Service) ClientLabelStatistics(ctx context.Context, req *pbclient.ClientCommonReq) (
	*structpb.Struct, error)

ClientLabelStatistics 客户端标签统计

func (*Service) ClientPullStatistics

func (s *Service) ClientPullStatistics(ctx context.Context, req *pbclient.ClientCommonReq) (
	*structpb.Struct, error)

ClientPullStatistics 客户端拉取信息统计

func (*Service) ClientPullTrendStatistics

func (s *Service) ClientPullTrendStatistics(ctx context.Context, req *pbclient.ClientCommonReq) (
	*structpb.Struct, error)

ClientPullTrendStatistics 客户端拉取趋势统计

func (*Service) ClientSpecificFailedReason

func (s *Service) ClientSpecificFailedReason(ctx context.Context, req *pbclient.ClientCommonReq) (
	*structpb.Struct, error)

ClientSpecificFailedReason 统计客户端失败详细原因

func (*Service) ClientVersionStatistics

func (s *Service) ClientVersionStatistics(ctx context.Context, req *pbclient.ClientCommonReq) (
	*structpb.Struct, error)

ClientVersionStatistics 客户端版本统计

func (*Service) CompareConfigItemConflicts

func (s *Service) CompareConfigItemConflicts(ctx context.Context, req *pbds.CompareConfigItemConflictsReq) (
	*pbds.CompareConfigItemConflictsResp, error)

CompareConfigItemConflicts compare config item version conflicts

func (*Service) CountGroupsReleasedApps

func (s *Service) CountGroupsReleasedApps(ctx context.Context, req *pbds.CountGroupsReleasedAppsReq) (
	*pbds.CountGroupsReleasedAppsResp, error)

CountGroupsReleasedApps count each group's published apps.

func (*Service) CreateApp

func (s *Service) CreateApp(ctx context.Context, req *pbds.CreateAppReq) (*pbds.CreateResp, error)

CreateApp create application.

func (*Service) CreateAppTemplateBinding

func (s *Service) CreateAppTemplateBinding(ctx context.Context, req *pbds.CreateAppTemplateBindingReq) (
	*pbds.CreateResp, error)

CreateAppTemplateBinding create app template binding.

func (*Service) CreateClientQuery

func (s *Service) CreateClientQuery(ctx context.Context, req *pbds.CreateClientQueryReq) (
	*pbds.CreateClientQueryResp, error)

CreateClientQuery create client query

func (*Service) CreateCommit

func (s *Service) CreateCommit(ctx context.Context, req *pbds.CreateCommitReq) (
	*pbds.CreateResp, error)

CreateCommit create commit.

func (*Service) CreateConfigItem

func (s *Service) CreateConfigItem(ctx context.Context, req *pbds.CreateConfigItemReq) (*pbds.CreateResp, error)

CreateConfigItem create config item.

func (*Service) CreateContent

func (s *Service) CreateContent(ctx context.Context, req *pbds.CreateContentReq) (*pbds.CreateResp, error)

CreateContent create content.

func (*Service) CreateCredential

func (s *Service) CreateCredential(ctx context.Context, req *pbds.CreateCredentialReq) (*pbds.CreateResp, error)

CreateCredential Create Credential

func (*Service) CreateDefaultTmplSpace

func (s *Service) CreateDefaultTmplSpace(ctx context.Context, req *pbds.CreateDefaultTmplSpaceReq) (
	*pbds.CreateResp, error)

CreateDefaultTmplSpace create default template space

func (*Service) CreateGroup

func (s *Service) CreateGroup(ctx context.Context, req *pbds.CreateGroupReq) (*pbds.CreateResp, error)

CreateGroup create group.

func (*Service) CreateHook

func (s *Service) CreateHook(ctx context.Context, req *pbds.CreateHookReq) (*pbds.CreateResp, error)

CreateHook create hook.

func (*Service) CreateHookRevision

func (s *Service) CreateHookRevision(ctx context.Context,
	req *pbds.CreateHookRevisionReq) (*pbds.CreateResp, error)

CreateHookRevision create hook revision with option

func (*Service) CreateKv

func (s *Service) CreateKv(ctx context.Context, req *pbds.CreateKvReq) (*pbds.CreateResp, error)

CreateKv is used to create key-value data.

func (*Service) CreateRelease

func (s *Service) CreateRelease(ctx context.Context, req *pbds.CreateReleaseReq) (*pbds.CreateResp, error)

CreateRelease create release. nolint:funlen

func (*Service) CreateTemplate

func (s *Service) CreateTemplate(ctx context.Context, req *pbds.CreateTemplateReq) (*pbds.CreateResp, error)

CreateTemplate create template.

func (*Service) CreateTemplateRevision

func (s *Service) CreateTemplateRevision(ctx context.Context,
	req *pbds.CreateTemplateRevisionReq) (*pbds.CreateResp, error)

CreateTemplateRevision create template revision.

func (*Service) CreateTemplateSet

func (s *Service) CreateTemplateSet(ctx context.Context, req *pbds.CreateTemplateSetReq) (*pbds.CreateResp, error)

CreateTemplateSet create template set.

func (*Service) CreateTemplateSpace

func (s *Service) CreateTemplateSpace(ctx context.Context, req *pbds.CreateTemplateSpaceReq) (*pbds.CreateResp, error)

CreateTemplateSpace create template space.

func (*Service) CreateTemplateVariable

func (s *Service) CreateTemplateVariable(ctx context.Context, req *pbds.CreateTemplateVariableReq) (*pbds.CreateResp,
	error)

CreateTemplateVariable create template variable.

func (*Service) CredentialScopePreview

func (s *Service) CredentialScopePreview(ctx context.Context, req *pbds.CredentialScopePreviewReq) (
	*pbds.CredentialScopePreviewResp, error)

CredentialScopePreview 关联规则预览配置项

func (*Service) DeleteApp

func (s *Service) DeleteApp(ctx context.Context, req *pbds.DeleteAppReq) (*pbbase.EmptyResp, error)

DeleteApp delete application.

func (*Service) DeleteAppTemplateBinding

func (s *Service) DeleteAppTemplateBinding(ctx context.Context, req *pbds.DeleteAppTemplateBindingReq) (
	*pbbase.EmptyResp, error)

DeleteAppTemplateBinding delete app template binding.

func (*Service) DeleteClientQuery

func (s *Service) DeleteClientQuery(ctx context.Context, req *pbds.DeleteClientQueryReq) (
	*pbbase.EmptyResp, error)

DeleteClientQuery delete client query

func (*Service) DeleteConfigItem

func (s *Service) DeleteConfigItem(ctx context.Context, req *pbds.DeleteConfigItemReq) (*pbbase.EmptyResp, error)

DeleteConfigItem delete config item.

func (*Service) DeleteCredential

func (s *Service) DeleteCredential(ctx context.Context, req *pbds.DeleteCredentialReq) (*pbbase.EmptyResp, error)

DeleteCredential delete credential

func (*Service) DeleteGroup

func (s *Service) DeleteGroup(ctx context.Context, req *pbds.DeleteGroupReq) (*pbbase.EmptyResp, error)

DeleteGroup delete group.

func (*Service) DeleteHook

func (s *Service) DeleteHook(ctx context.Context, req *pbds.DeleteHookReq) (*pbbase.EmptyResp, error)

DeleteHook delete hook.

func (*Service) DeleteHookRevision

func (s *Service) DeleteHookRevision(ctx context.Context,
	req *pbds.DeleteHookRevisionReq) (*pbbase.EmptyResp, error)

DeleteHookRevision delete a HookRevision

func (*Service) DeleteKv

func (s *Service) DeleteKv(ctx context.Context, req *pbds.DeleteKvReq) (*pbbase.EmptyResp, error)

DeleteKv is used to delete key-value data.

func (*Service) DeleteRelease

func (s *Service) DeleteRelease(ctx context.Context, req *pbds.DeleteReleaseReq) (*pbbase.EmptyResp, error)

DeleteRelease delete a release

func (*Service) DeleteTemplate

func (s *Service) DeleteTemplate(ctx context.Context, req *pbds.DeleteTemplateReq) (*pbbase.EmptyResp, error)

DeleteTemplate delete template.

func (*Service) DeleteTemplateRevision

func (s *Service) DeleteTemplateRevision(ctx context.Context,
	req *pbds.DeleteTemplateRevisionReq) (*pbbase.EmptyResp, error)

DeleteTemplateRevision delete template revision.

func (*Service) DeleteTemplateSet

func (s *Service) DeleteTemplateSet(ctx context.Context, req *pbds.DeleteTemplateSetReq) (*pbbase.EmptyResp, error)

DeleteTemplateSet delete template set.

func (*Service) DeleteTemplateSpace

func (s *Service) DeleteTemplateSpace(ctx context.Context,
	req *pbds.DeleteTemplateSpaceReq) (*pbbase.EmptyResp, error)

DeleteTemplateSpace delete template space.

func (*Service) DeleteTemplateVariable

func (s *Service) DeleteTemplateVariable(ctx context.Context, req *pbds.DeleteTemplateVariableReq) (*pbbase.EmptyResp,
	error)

DeleteTemplateVariable delete template variable.

func (*Service) DeleteTmplsFromTmplSets

func (s *Service) DeleteTmplsFromTmplSets(ctx context.Context, req *pbds.DeleteTmplsFromTmplSetsReq) (
	*pbbase.EmptyResp, error)

DeleteTmplsFromTmplSets delete templates from template sets.

func (*Service) DeprecateRelease

func (s *Service) DeprecateRelease(ctx context.Context, req *pbds.DeprecateReleaseReq) (*pbbase.EmptyResp, error)

DeprecateRelease deprecate a release

func (*Service) ExtractAppTmplVariables

func (s *Service) ExtractAppTmplVariables(ctx context.Context, req *pbds.ExtractAppTmplVariablesReq) (
	*pbds.ExtractAppTmplVariablesResp, error)

ExtractAppTmplVariables extract app template variables. the variables come from template and non-template config items

func (*Service) FetchInstanceInfo

func (s *Service) FetchInstanceInfo(ctx context.Context, req *pbds.FetchInstanceInfoReq) (
	*pbds.FetchInstanceInfoResp, error)

FetchInstanceInfo used to iam pull resource info callback.

func (*Service) FindNearExpiryCertKvs

func (s *Service) FindNearExpiryCertKvs(ctx context.Context, req *pbds.FindNearExpiryCertKvsReq) (
	*pbds.FindNearExpiryCertKvsResp, error)

FindNearExpiryCertKvs 查找临近到期证书

func (*Service) GenerateReleaseAndPublish

func (s *Service) GenerateReleaseAndPublish(ctx context.Context, req *pbds.GenerateReleaseAndPublishReq) (
	*pbds.PublishResp, error)

GenerateReleaseAndPublish generate release and publish. nolint: funlen

func (*Service) GetAllBizsOfTmplSpaces

func (s *Service) GetAllBizsOfTmplSpaces(ctx context.Context, req *pbbase.EmptyReq) (
	*pbds.GetAllBizsOfTmplSpacesResp, error)

GetAllBizsOfTmplSpaces get all biz ids of template spaces

func (*Service) GetApp

func (s *Service) GetApp(ctx context.Context, req *pbds.GetAppReq) (*pbapp.App, error)

GetApp get apps by app id.

func (*Service) GetAppByID

func (s *Service) GetAppByID(ctx context.Context, req *pbds.GetAppByIDReq) (*pbapp.App, error)

GetAppByID get apps by only by app id.

func (*Service) GetAppByName

func (s *Service) GetAppByName(ctx context.Context, req *pbds.GetAppByNameReq) (*pbapp.App, error)

GetAppByName get app by app name.

func (*Service) GetAppTmplVariableRefs

func (s *Service) GetAppTmplVariableRefs(ctx context.Context, req *pbds.GetAppTmplVariableRefsReq) (
	*pbds.GetAppTmplVariableRefsResp, error)

GetAppTmplVariableRefs get app template variable references. the variables come from template and non-template config items

func (*Service) GetConfigItem

func (s *Service) GetConfigItem(ctx context.Context, req *pbds.GetConfigItemReq) (*pbci.ConfigItem, error)

GetConfigItem get config item detail

func (*Service) GetContent

func (s *Service) GetContent(ctx context.Context, req *pbds.GetContentReq) (*pbcontent.Content, error)

GetContent get content by id

func (*Service) GetGroupByName

func (s *Service) GetGroupByName(ctx context.Context, req *pbds.GetGroupByNameReq) (*pbgroup.Group, error)

GetGroupByName get group by group name.

func (*Service) GetHook

func (s *Service) GetHook(ctx context.Context, req *pbds.GetHookReq) (*pbds.GetHookResp, error)

GetHook get a hook

func (*Service) GetHookReferencedIDs

func (s *Service) GetHookReferencedIDs(ctx context.Context, req *pbds.GetHookReferencedIDsReq) (
	*pbds.GetHookReferencedIDsResp, error)

GetHookReferencedIDs 获取脚本被引用的IDs

func (*Service) GetHookRevisionByID

func (s *Service) GetHookRevisionByID(ctx context.Context,
	req *pbds.GetHookRevisionByIdReq) (*hr.HookRevision, error)

GetHookRevisionByID get a release

func (*Service) GetHookRevisionByPubState

func (s *Service) GetHookRevisionByPubState(ctx context.Context,
	req *pbds.GetByPubStateReq) (*hr.HookRevision, error)

GetHookRevisionByPubState get a HookRevision by State

func (*Service) GetLastPublish

func (s *Service) GetLastPublish(ctx context.Context, req *pbds.GetLastPublishReq) (*pbds.GetLastPublishResp, error)

GetLastPublish get last publish list

func (*Service) GetLastSelect

func (s *Service) GetLastSelect(ctx context.Context, req *pbds.GetLastSelectReq) (*pbds.GetLastSelectResp, error)

GetLastSelect get last version select publish_type

func (*Service) GetLatestCommit

func (s *Service) GetLatestCommit(ctx context.Context, req *pbds.GetLatestCommitReq) (*pbcommit.Commit, error)

GetLatestCommit get latest commit by config item id

func (*Service) GetRelease

func (s *Service) GetRelease(ctx context.Context, req *pbds.GetReleaseReq) (*pbrelease.Release, error)

GetRelease get release

func (*Service) GetReleaseByName

func (s *Service) GetReleaseByName(ctx context.Context, req *pbds.GetReleaseByNameReq) (*pbrelease.Release, error)

GetReleaseByName get release by release name.

func (*Service) GetReleaseHook

func (s *Service) GetReleaseHook(ctx context.Context, req *pbds.GetReleaseHookReq) (*pbds.GetReleaseHookResp, error)

GetReleaseHook get release's pre hook and post hook

func (*Service) GetReleasedAppBoundTmplRevision

GetReleasedAppBoundTmplRevision get app bound template revision.

func (*Service) GetReleasedAppTmplVariableRefs

GetReleasedAppTmplVariableRefs get released app template variable references. the variables come from template and non-template config items

func (*Service) GetReleasedConfigItem

func (s *Service) GetReleasedConfigItem(ctx context.Context, req *pbds.GetReleasedCIReq) (
	*pbrci.ReleasedConfigItem, error)

GetReleasedConfigItem get released config item

func (*Service) GetReleasedKv

func (s *Service) GetReleasedKv(ctx context.Context, req *pbds.GetReleasedKvReq) (*released_kv.ReleasedKv, error)

GetReleasedKv get released kv

func (*Service) GetReleasesStatus

func (s *Service) GetReleasesStatus(ctx context.Context, req *pbds.GetReleasesStatusReq) (*pbstrategy.Strategy, error)

GetReleasesStatus get last releases status

func (*Service) GetTemplateAndNonTemplateCICount

GetTemplateAndNonTemplateCICount 获取模板和非模板配置项数量

func (*Service) GetTemplateRevision

func (s *Service) GetTemplateRevision(ctx context.Context, req *pbds.GetTemplateRevisionReq) (
	*pbds.GetTemplateRevisionResp, error)

GetTemplateRevision 根据版本号获取 TemplateRevisions

func (*Service) Handler

func (s *Service) Handler() (http.Handler, error)

Handler return service's handler.

func (*Service) HookFetchIDsExcluding

func (s *Service) HookFetchIDsExcluding(ctx context.Context, req *pbds.HookFetchIDsExcludingReq) (
	*pbds.HookFetchIDsExcludingResp, error)

HookFetchIDsExcluding 获取指定ID后排除的ID

func (*Service) ImportFromTemplateSetToApp

func (s *Service) ImportFromTemplateSetToApp(ctx context.Context, req *pbds.ImportFromTemplateSetToAppReq) (
	*pbbase.EmptyResp, error)

ImportFromTemplateSetToApp 从配置模板导入到服务

func (*Service) ImportTemplateVariables

func (s *Service) ImportTemplateVariables(ctx context.Context, req *pbds.ImportTemplateVariablesReq) (
	*pbds.ImportTemplateVariablesResp, error)

ImportTemplateVariables import template variables.

func (*Service) KvFetchIDsExcluding

func (s *Service) KvFetchIDsExcluding(ctx context.Context, req *pbds.KvFetchIDsExcludingReq) (
	*pbds.KvFetchIDsExcludingResp, error)

KvFetchIDsExcluding Kv 获取指定ID后排除的ID

func (*Service) KvFetchKeysExcluding

func (s *Service) KvFetchKeysExcluding(ctx context.Context, req *pbds.KvFetchKeysExcludingReq) (
	*pbds.KvFetchKeysExcludingResp, error)

KvFetchKeysExcluding 获取指定keys后排除的keys

func (*Service) ListAllGroups

func (s *Service) ListAllGroups(ctx context.Context, req *pbds.ListAllGroupsReq) (*pbds.ListAllGroupsResp, error)

ListAllGroups list all groups in biz.

func (*Service) ListAppBoundTmplRevisions

ListAppBoundTmplRevisions list app bound template revisions. nolint:funlen,gocyclo

func (*Service) ListAppGroups

func (s *Service) ListAppGroups(ctx context.Context, req *pbds.ListAppGroupsReq) (*pbds.ListAppGroupsResp, error)

ListAppGroups list groups in app.

func (*Service) ListAppTemplateBindings

func (s *Service) ListAppTemplateBindings(ctx context.Context, req *pbds.ListAppTemplateBindingsReq) (
	*pbds.ListAppTemplateBindingsResp, error)

ListAppTemplateBindings list app template binding.

func (*Service) ListAppTemplateSets

func (s *Service) ListAppTemplateSets(ctx context.Context, req *pbds.ListAppTemplateSetsReq) (
	*pbds.ListAppTemplateSetsResp, error)

ListAppTemplateSets list app template set.

func (*Service) ListAppTmplVariables

func (s *Service) ListAppTmplVariables(ctx context.Context, req *pbds.ListAppTmplVariablesReq) (
	*pbds.ListAppTmplVariablesResp, error)

ListAppTmplVariables list app template variables.

func (*Service) ListAppsByIDs

func (s *Service) ListAppsByIDs(ctx context.Context, req *pbds.ListAppsByIDsReq) (*pbds.ListAppsByIDsResp, error)

ListAppsByIDs list apps by query condition.

func (*Service) ListAppsRest

func (s *Service) ListAppsRest(ctx context.Context, req *pbds.ListAppsRestReq) (*pbds.ListAppsResp, error)

ListAppsRest list apps by query condition.

func (*Service) ListAudits

func (s *Service) ListAudits(ctx context.Context, req *pbds.ListAuditsReq) (*pbds.ListAuditsResp, error)

ListAudits list audits.

func (*Service) ListClientEvents

func (s *Service) ListClientEvents(ctx context.Context, req *pbds.ListClientEventsReq) (
	*pbds.ListClientEventsResp, error)

ListClientEvents List client details query

func (*Service) ListClientLabelAndAnnotation

func (s *Service) ListClientLabelAndAnnotation(ctx context.Context, req *pbds.ListClientLabelAndAnnotationReq) (
	*structpb.Struct, error)

ListClientLabelAndAnnotation 列出客户端标签和注释

func (*Service) ListClientQuerys

func (s *Service) ListClientQuerys(ctx context.Context, req *pbds.ListClientQuerysReq) (
	*pbds.ListClientQuerysResp, error)

ListClientQuerys list client querys

func (*Service) ListClients

func (s *Service) ListClients(ctx context.Context, req *pbds.ListClientsReq) (*pbds.ListClientsResp, error)

ListClients list clients

func (*Service) ListConfigItemByTuple

func (s *Service) ListConfigItemByTuple(ctx context.Context, req *pbds.ListConfigItemByTupleReq) (
	*pbds.ListConfigItemByTupleResp, error)

ListConfigItemByTuple 按照多个字段in查询

func (*Service) ListConfigItemCount

func (s *Service) ListConfigItemCount(ctx context.Context, req *pbds.ListConfigItemCountReq) (
	*pbds.ListConfigItemCountResp, error)

ListConfigItemCount list config items count.

func (*Service) ListConfigItems

func (s *Service) ListConfigItems(ctx context.Context, req *pbds.ListConfigItemsReq) (*pbds.ListConfigItemsResp,
	error)

ListConfigItems list config items by query condition. nolint:funlen,gocyclo

func (*Service) ListCredentialScopes

func (s *Service) ListCredentialScopes(ctx context.Context,
	req *pbds.ListCredentialScopesReq) (*pbds.ListCredentialScopesResp, error)

ListCredentialScopes get credential scopes

func (*Service) ListCredentials

func (s *Service) ListCredentials(ctx context.Context, req *pbds.ListCredentialReq) (*pbds.ListCredentialResp, error)

ListCredentials get credentials

func (*Service) ListGroupReleasedApps

func (s *Service) ListGroupReleasedApps(ctx context.Context, req *pbds.ListGroupReleasedAppsReq) (
	*pbds.ListGroupReleasedAppsResp, error)

ListGroupReleasedApps list group's published apps and their release.

func (*Service) ListHookReferences

func (s *Service) ListHookReferences(ctx context.Context,
	req *pbds.ListHookReferencesReq) (*pbds.ListHookReferencesResp, error)

ListHookReferences ..

func (*Service) ListHookRevisionReferences

ListHookRevisionReferences ..

func (*Service) ListHookRevisions

func (s *Service) ListHookRevisions(ctx context.Context,
	req *pbds.ListHookRevisionsReq) (*pbds.ListHookRevisionsResp, error)

ListHookRevisions list HookRevision with filter

func (*Service) ListHookTags

func (s *Service) ListHookTags(ctx context.Context, req *pbds.ListHookTagReq) (*pbds.ListHookTagResp, error)

ListHookTags list tag

func (*Service) ListHooks

func (s *Service) ListHooks(ctx context.Context, req *pbds.ListHooksReq) (*pbds.ListHooksResp, error)

ListHooks list hooks.

func (*Service) ListInstances

func (s *Service) ListInstances(ctx context.Context, req *pbds.ListInstancesReq) (*pbds.ListInstancesResp, error)

ListInstances list instances used to iam pull resource callback.

func (*Service) ListKvs

func (s *Service) ListKvs(ctx context.Context, req *pbds.ListKvsReq) (*pbds.ListKvsResp, error)

ListKvs is used to list key-value data.

func (*Service) ListLatestTmplBoundUnnamedApps

ListLatestTmplBoundUnnamedApps list the latest template bound unnamed app details.

func (*Service) ListMultiTmplBoundTmplSets

func (s *Service) ListMultiTmplBoundTmplSets(ctx context.Context,
	req *pbds.ListMultiTmplBoundTmplSetsReq) (
	*pbds.ListMultiTmplBoundTmplSetsResp, error)

ListMultiTmplBoundTmplSets list template bound template set details.

func (*Service) ListMultiTmplSetBoundUnnamedApps

ListMultiTmplSetBoundUnnamedApps list template set bound unnamed app details.

func (*Service) ListReleasedAppBoundTmplRevisions

ListReleasedAppBoundTmplRevisions list app bound template revisions.

func (*Service) ListReleasedAppTmplVariables

ListReleasedAppTmplVariables get app template variable references.

func (*Service) ListReleasedConfigItems

func (s *Service) ListReleasedConfigItems(ctx context.Context,
	req *pbds.ListReleasedConfigItemsReq) (
	*pbds.ListReleasedConfigItemsResp, error)

ListReleasedConfigItems list app bound template revisions.

func (*Service) ListReleasedKvs

func (s *Service) ListReleasedKvs(ctx context.Context, req *pbds.ListReleasedKvReq) (*pbds.ListReleasedKvResp, error)

ListReleasedKvs list app bound kv revisions.

func (*Service) ListReleases

func (s *Service) ListReleases(ctx context.Context, req *pbds.ListReleasesReq) (*pbds.ListReleasesResp, error)

ListReleases list releases.

func (*Service) ListTemplateByTuple

func (s *Service) ListTemplateByTuple(ctx context.Context, req *pbds.ListTemplateByTupleReq) (
	*pbds.ListTemplateByTupleReqResp, error)

ListTemplateByTuple 按照多个字段in查询

func (*Service) ListTemplateRevisions

func (s *Service) ListTemplateRevisions(ctx context.Context,
	req *pbds.ListTemplateRevisionsReq) (*pbds.ListTemplateRevisionsResp, error)

ListTemplateRevisions list template revision.

func (*Service) ListTemplateRevisionsByIDs

func (s *Service) ListTemplateRevisionsByIDs(ctx context.Context, req *pbds.ListTemplateRevisionsByIDsReq) (*pbds.
	ListTemplateRevisionsByIDsResp, error)

ListTemplateRevisionsByIDs list template revision by ids.

func (*Service) ListTemplateSetBriefInfoByIDs

ListTemplateSetBriefInfoByIDs list template set by ids.

func (*Service) ListTemplateSets

func (s *Service) ListTemplateSets(ctx context.Context, req *pbds.ListTemplateSetsReq) (*pbds.ListTemplateSetsResp,
	error)

ListTemplateSets list template set.

func (*Service) ListTemplateSetsAndRevisions

ListTemplateSetsAndRevisions 获取模板套餐下所有的模板版本

func (*Service) ListTemplateSetsByIDs

func (s *Service) ListTemplateSetsByIDs(ctx context.Context, req *pbds.ListTemplateSetsByIDsReq) (
	*pbds.ListTemplateSetsByIDsResp, error)

ListTemplateSetsByIDs list template set by ids.

func (*Service) ListTemplateSpaces

func (s *Service) ListTemplateSpaces(ctx context.Context,
	req *pbds.ListTemplateSpacesReq) (*pbds.ListTemplateSpacesResp, error)

ListTemplateSpaces list template space.

func (*Service) ListTemplateVariables

func (s *Service) ListTemplateVariables(ctx context.Context, req *pbds.ListTemplateVariablesReq) (
	*pbds.ListTemplateVariablesResp, error)

ListTemplateVariables list template variable.

func (*Service) ListTemplates

func (s *Service) ListTemplates(ctx context.Context, req *pbds.ListTemplatesReq) (*pbds.ListTemplatesResp, error)

ListTemplates list templates.

func (*Service) ListTemplatesByIDs

func (s *Service) ListTemplatesByIDs(ctx context.Context, req *pbds.ListTemplatesByIDsReq) (
	*pbds.ListTemplatesByIDsResp, error)

ListTemplatesByIDs list templates by ids.

func (*Service) ListTemplatesNotBound

func (s *Service) ListTemplatesNotBound(ctx context.Context, req *pbds.ListTemplatesNotBoundReq) (
	*pbds.ListTemplatesNotBoundResp, error)

ListTemplatesNotBound list templates not bound. 先获取所有模版ID列表,再获取该空间下所有套餐的template_ids字段进行合并,做差集得到目标ID列表,根据这批ID获取对应的详情,做逻辑分页和搜索

func (*Service) ListTmplBoundCounts

func (s *Service) ListTmplBoundCounts(ctx context.Context, req *pbds.ListTmplBoundCountsReq) (
	*pbds.ListTmplBoundCountsResp, error)

ListTmplBoundCounts list template bound counts.

func (*Service) ListTmplBoundNamedApps

func (s *Service) ListTmplBoundNamedApps(ctx context.Context,
	req *pbds.ListTmplBoundNamedAppsReq) (*pbds.ListTmplBoundNamedAppsResp, error)

ListTmplBoundNamedApps list template bound named app details. Deprecated: not in use currently if use it, consider to add column app_name, release_name on table released_app_templates in case of app is deleted.

func (*Service) ListTmplBoundTmplSets

func (s *Service) ListTmplBoundTmplSets(ctx context.Context,
	req *pbds.ListTmplBoundTmplSetsReq) (
	*pbds.ListTmplBoundTmplSetsResp, error)

ListTmplBoundTmplSets list template bound template set details.

func (*Service) ListTmplBoundUnnamedApps

func (s *Service) ListTmplBoundUnnamedApps(ctx context.Context,
	req *pbds.ListTmplBoundUnnamedAppsReq) (
	*pbds.ListTmplBoundUnnamedAppsResp, error)

ListTmplBoundUnnamedApps list template bound unnamed app details.

func (*Service) ListTmplRevisionBoundCounts

ListTmplRevisionBoundCounts list template revision bound counts.

func (*Service) ListTmplRevisionBoundNamedApps

ListTmplRevisionBoundNamedApps list template revision bound named app details. Deprecated: not in use currently if use it, consider to add column app_name, release_name on table released_app_templates in case of app is deleted.

func (*Service) ListTmplRevisionBoundUnnamedApps

ListTmplRevisionBoundUnnamedApps list template revision bound unnamed app details.

func (*Service) ListTmplRevisionNamesByTmplIDs

ListTmplRevisionNamesByTmplIDs list template revision by ids.

func (*Service) ListTmplSetBoundCounts

func (s *Service) ListTmplSetBoundCounts(ctx context.Context, req *pbds.ListTmplSetBoundCountsReq) (
	*pbds.ListTmplSetBoundCountsResp, error)

ListTmplSetBoundCounts list template bound counts.

func (*Service) ListTmplSetBoundNamedApps

func (s *Service) ListTmplSetBoundNamedApps(ctx context.Context,
	req *pbds.ListTmplSetBoundNamedAppsReq) (
	*pbds.ListTmplSetBoundNamedAppsResp, error)

ListTmplSetBoundNamedApps list template set bound named app details. Deprecated: not in use currently if use it, consider to add column app_name, release_name on table released_app_templates in case of app is deleted

func (*Service) ListTmplSetBoundUnnamedApps

ListTmplSetBoundUnnamedApps list template set bound unnamed app details.

func (*Service) ListTmplSetsOfBiz

func (s *Service) ListTmplSetsOfBiz(ctx context.Context, req *pbds.ListTmplSetsOfBizReq) (
	*pbds.ListTmplSetsOfBizResp, error)

ListTmplSetsOfBiz list template sets of one biz.

func (*Service) ListTmplSpacesByIDs

func (s *Service) ListTmplSpacesByIDs(ctx context.Context, req *pbds.ListTmplSpacesByIDsReq) (*pbds.
	ListTmplSpacesByIDsResp, error)

ListTmplSpacesByIDs list template space by ids.

func (*Service) ListTmplsOfTmplSet

func (s *Service) ListTmplsOfTmplSet(ctx context.Context, req *pbds.ListTmplsOfTmplSetReq) (
	*pbds.ListTmplsOfTmplSetResp, error)

ListTmplsOfTmplSet list templates of template set. 获取到该套餐的template_ids字段,根据这批ID获取对应的详情,做逻辑分页和搜索

func (*Service) Ping

func (s *Service) Ping(ctx context.Context, msg *pbds.PingMsg) (*pbds.PingMsg, error)

Ping data service.

func (*Service) Publish

func (s *Service) Publish(ctx context.Context, req *pbds.PublishReq) (*pbds.PublishResp, error)

Publish exec publish strategy. nolint: funlen

func (*Service) PublishHookRevision

func (s *Service) PublishHookRevision(ctx context.Context, req *pbds.PublishHookRevisionReq) (
	*pbbase.EmptyResp, error)

PublishHookRevision publish a release

func (*Service) RemoveAppBoundTmplSet

func (s *Service) RemoveAppBoundTmplSet(ctx context.Context, req *pbds.RemoveAppBoundTmplSetReq) (
	*pbbase.EmptyResp, error)

RemoveAppBoundTmplSet 移除服务绑定的套餐

func (*Service) RetryClients

func (s *Service) RetryClients(ctx context.Context, req *pbds.RetryClientsReq) (*pbbase.EmptyResp, error)

RetryClients 重试客户端执行版本变更回调

func (*Service) SubmitPublishApprove

func (s *Service) SubmitPublishApprove(
	ctx context.Context, req *pbds.SubmitPublishApproveReq) (*pbds.PublishResp, error)

SubmitPublishApprove submit publish strategy. nolint funlen

func (*Service) TemplateVariableFetchIDsExcluding

TemplateVariableFetchIDsExcluding 获取模板变量排除指定ID的ID

func (*Service) UnDeleteConfigItem

func (s *Service) UnDeleteConfigItem(ctx context.Context, req *pbds.UnDeleteConfigItemReq) (*pbbase.EmptyResp, error)

UnDeleteConfigItem 配置项未命名版本恢复 nolint:funlen

func (*Service) UnDeleteKv

func (s *Service) UnDeleteKv(ctx context.Context, req *pbds.UnDeleteKvReq) (*pbbase.EmptyResp, error)

UnDeleteKv Revert the deletion of the key-value pair by restoring it to the version before the last one.

func (*Service) UnDeprecateRelease

func (s *Service) UnDeprecateRelease(ctx context.Context, req *pbds.UnDeprecateReleaseReq) (*pbbase.EmptyResp, error)

UnDeprecateRelease undeprecate a release

func (*Service) UndoConfigItem

func (s *Service) UndoConfigItem(ctx context.Context, req *pbds.UndoConfigItemReq) (*pbbase.EmptyResp, error)

UndoConfigItem 撤消配置项

func (*Service) UndoKv

func (s *Service) UndoKv(ctx context.Context, req *pbds.UndoKvReq) (*pbbase.EmptyResp, error)

UndoKv Undo edited data and return to the latest published version

func (*Service) UpdateApp

func (s *Service) UpdateApp(ctx context.Context, req *pbds.UpdateAppReq) (*pbapp.App, error)

UpdateApp update application.

func (*Service) UpdateAppTemplateBinding

func (s *Service) UpdateAppTemplateBinding(ctx context.Context, req *pbds.UpdateAppTemplateBindingReq) (
	*pbbase.EmptyResp, error)

UpdateAppTemplateBinding update app template binding.

func (*Service) UpdateAppTmplVariables

func (s *Service) UpdateAppTmplVariables(ctx context.Context, req *pbds.UpdateAppTmplVariablesReq) (
	*pbbase.EmptyResp, error)

UpdateAppTmplVariables update app template variables.

func (*Service) UpdateClientQuery

func (s *Service) UpdateClientQuery(ctx context.Context, req *pbds.UpdateClientQueryReq) (
	*pbbase.EmptyResp, error)

UpdateClientQuery update client query

func (*Service) UpdateConfigHook

func (s *Service) UpdateConfigHook(ctx context.Context, req *pbds.UpdateConfigHookReq) (*pbbase.EmptyResp, error)

UpdateConfigHook update ConfigHook.

func (*Service) UpdateConfigItem

func (s *Service) UpdateConfigItem(ctx context.Context, req *pbds.UpdateConfigItemReq) (
	*pbbase.EmptyResp, error)

UpdateConfigItem update config item.

func (*Service) UpdateCredential

func (s *Service) UpdateCredential(ctx context.Context, req *pbds.UpdateCredentialReq) (*pbbase.EmptyResp, error)

UpdateCredential update credential

func (*Service) UpdateCredentialScopes

func (s *Service) UpdateCredentialScopes(ctx context.Context,
	req *pbds.UpdateCredentialScopesReq) (*pbds.UpdateCredentialScopesResp, error)

UpdateCredentialScopes update credential scopes

func (*Service) UpdateGroup

func (s *Service) UpdateGroup(ctx context.Context, req *pbds.UpdateGroupReq) (*pbbase.EmptyResp, error)

UpdateGroup update group. nolint: funlen

func (*Service) UpdateHook

func (s *Service) UpdateHook(ctx context.Context, req *pbds.UpdateHookReq) (*pbbase.EmptyResp, error)

UpdateHook update hook.

func (*Service) UpdateHookRevision

func (s *Service) UpdateHookRevision(ctx context.Context, req *pbds.UpdateHookRevisionReq) (*pbbase.EmptyResp, error)

UpdateHookRevision ..

func (*Service) UpdateKv

func (s *Service) UpdateKv(ctx context.Context, req *pbds.UpdateKvReq) (*pbbase.EmptyResp, error)

UpdateKv is used to update key-value data.

func (*Service) UpdateTemplate

func (s *Service) UpdateTemplate(ctx context.Context, req *pbds.UpdateTemplateReq) (*pbbase.EmptyResp, error)

UpdateTemplate update template.

func (*Service) UpdateTemplateRevision

func (s *Service) UpdateTemplateRevision(ctx context.Context, req *pbds.UpdateTemplateRevisionReq) (
	*pbds.CreateResp, error)

UpdateTemplateRevision 更新模板版本

func (*Service) UpdateTemplateSet

func (s *Service) UpdateTemplateSet(ctx context.Context, req *pbds.UpdateTemplateSetReq) (*pbbase.EmptyResp, error)

UpdateTemplateSet update template set. nolint: funlen

func (*Service) UpdateTemplateSpace

func (s *Service) UpdateTemplateSpace(ctx context.Context,
	req *pbds.UpdateTemplateSpaceReq) (*pbbase.EmptyResp, error)

UpdateTemplateSpace update template space.

func (*Service) UpdateTemplateVariable

func (s *Service) UpdateTemplateVariable(ctx context.Context, req *pbds.UpdateTemplateVariableReq) (*pbbase.EmptyResp,
	error)

UpdateTemplateVariable update template variable.

func (*Service) ValidateAppTemplateBindingUniqueKey

func (s *Service) ValidateAppTemplateBindingUniqueKey(kt *kit.Kit, bizID, appID uint32, name,
	dir string) error

ValidateAppTemplateBindingUniqueKey validate the unique key name+path for an app. if the unique key name+path exists in table app_template_binding for the app, return error.

Directories

Path Synopsis
Package crontab example Synchronize the online status of the client
Package crontab example Synchronize the online status of the client

Jump to

Keyboard shortcuts

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