addon

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CREATE_DB        = "CREATE DATABASE IF NOT EXISTS `%s`;"
	CREATE_USER      = "CREATE USER '%s'@'%%' IDENTIFIED by '%s';"
	GRANT_USER_TO_DB = "GRANT ALL ON %s.* TO '%s'@'%%';"
	FLUSH            = "flush privileges;"
)
View Source
const ErdaEncryptedValue string = "ERDA_ENCRYPTED"

ErdaEncryptedValue encrypted value

Variables

View Source
var (
	// AddonInfos 市场addon全集 key: addonName, value: apistructs.Extension
	AddonInfos sync.Map
	// ProjectInfos 项目信息缓存  key: projectId, value: apistructs.ProjectDTO
	ProjectInfos sync.Map
	// AppInfos app列表缓存 key: appID, value: apistructs.ApplicationDTO
	AppInfos sync.Map
)
View Source
var ExtensionDeployAddon = map[string]string{"mysql": "", "redis": "", "consul": "", "canal": "", "kafka": "", "rabbitmq": "", "rocketmq": "", "terminus-elasticsearch": "", "terminus-zookeeper": ""} // key 为 appID, value 为应用详情

ExtensionDeployAddon .

Functions

func GetAddonConfig added in v1.3.0

func GetAddonConfig(cfgStr string) (map[string]interface{}, error)

GetAddonConfig return unmarshal config

func IsEncryptedValueByKey

func IsEncryptedValueByKey(key string) bool

IsEncryptedValueByKey Determine whether it is an encrypted field by key

func IsEncryptedValueByValue

func IsEncryptedValueByValue(value string) bool

IsEncryptedValueByValue Determine whether it is an encrypted field by value

func Min

func Min(x, y int) int

比较大小int

Types

type Addon

type Addon struct {
	Logger *log.DeployLogHelper
	// contains filtered or unexported fields
}

Addon addon 实例对象封装

func New

func New(options ...Option) *Addon

New 新建 addon service

func (*Addon) AddonConfigCallback

func (a *Addon) AddonConfigCallback(insId string, response *apistructs.AddonConfigCallBackResponse) error

AddonConfigCallback addon配置回调

func (*Addon) AddonCreate

func (a *Addon) AddonCreate(req apistructs.AddonDirectCreateRequest) (string, error)

func (*Addon) AddonDelete

func (a *Addon) AddonDelete(req apistructs.AddonDirectDeleteRequest) error

func (*Addon) AddonDeprovisionCallback

func (a *Addon) AddonDeprovisionCallback(insId string) error

AddonDeprovisionCallback addon删除回调

func (*Addon) AddonProvisionCallback

func (a *Addon) AddonProvisionCallback(insId string, response *apistructs.AddonCreateCallBackResponse) error

AddonProvisionCallback addon创建回调

func (*Addon) AddonYmlExport

func (a *Addon) AddonYmlExport(projectID string) (*diceyml.Object, error)

func (*Addon) AddonYmlImport

func (a *Addon) AddonYmlImport(projectID uint64, yml diceyml.Object, userid string) error

func (*Addon) ApacheZookeeperDeployStatus

func (a *Addon) ApacheZookeeperDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

ApacheZookeeperDeployStatus zk状态拉取

func (*Addon) AttachAndCreate

func (a *Addon) AttachAndCreate(params *apistructs.AddonHandlerCreateItem) (*apistructs.AddonInstanceRes, error)

AttachAndCreate addon创建,runtime建立关系方法

func (*Addon) BatchCreate

func (a *Addon) BatchCreate(req *apistructs.AddonCreateRequest) error

BatchCreate 批量创建 addons

func (*Addon) BuildAddonAndTenantMap

func (a *Addon) BuildAddonAndTenantMap(projectAddons []dbclient.AddonInstanceRouting, projectAddonTenants []dbclient.AddonInstanceTenant) (
	addonnameMap map[string][]dbclient.AddonInstanceRouting, addonIDMap map[string]dbclient.AddonInstanceRouting,
	addonTenantNameMap map[string][]dbclient.AddonInstanceTenant, addonTenantIDMap map[string]dbclient.AddonInstanceTenant)

func (*Addon) BuildCanalServiceItem

func (a *Addon) BuildCanalServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object) error

buildCanalServiceItem 构造canal的service信息

func (*Addon) BuildCommonServiceItem

func (a *Addon) BuildCommonServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

BuildCommonServiceItem 构造标准化的addon发布service body

func (*Addon) BuildConsulServiceItem

func (a *Addon) BuildConsulServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

buildConsulServiceItem 构造consul的service信息

func (*Addon) BuildESOperatorServiceItem

func (a *Addon) BuildESOperatorServiceItem(addonIns *dbclient.AddonInstance, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

func (*Addon) BuildEsServiceItem

func (a *Addon) BuildEsServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

buildEsServiceItem 构造es的service信息

func (*Addon) BuildKafkaServiceItem

func (a *Addon) BuildKafkaServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

buildKafkaServiceItem 构造kafka的service信息

func (*Addon) BuildMysqlOperatorServiceItem

func (a *Addon) BuildMysqlOperatorServiceItem(addonIns *dbclient.AddonInstance, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

buildMysqlOperatorServiceItem 生成operator发布的格式

func (*Addon) BuildMysqlServiceItem

func (a *Addon) BuildMysqlServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

buildMysqlServiceItem 构造mysql的service信息

func (*Addon) BuildRabbitmqServiceItem

func (a *Addon) BuildRabbitmqServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object) error

BuildRabbitmqServiceItem 构造rabbitmq的service信息

func (*Addon) BuildRealZkServiceItem

func (a *Addon) BuildRealZkServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

BuildRealZkServiceItem 构造zookeeper的service信息

func (*Addon) BuildRedisOperatorServiceItem

func (a *Addon) BuildRedisOperatorServiceItem(addonIns *dbclient.AddonInstance, addonDice *diceyml.Object) error

buildRedisOperatorServiceItem redis operator build service item

func (*Addon) BuildRedisServiceItem

func (a *Addon) BuildRedisServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object) error

buildRedisServiceItem 构造redis的service信息

func (*Addon) BuildRocketMqServiceItem

func (a *Addon) BuildRocketMqServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

func (*Addon) BuildZookeeperServiceItem

func (a *Addon) BuildZookeeperServiceItem(params *apistructs.AddonHandlerCreateItem, addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension, addonDice *diceyml.Object, clusterInfo *apistructs.ClusterInfoData) error

buildZookeeperServiceItem 构造zookeeper的service信息

func (*Addon) CanalDeployStatus

func (a *Addon) CanalDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

CanalDeployStatus canal状态拉取

func (*Addon) CheckCustomAddonPermission

func (a *Addon) CheckCustomAddonPermission(userID string, orgID, projecID uint64) (bool, error)

CheckCustomAddonPermission 校验 custom addon 权限

func (*Addon) CommonDeployStatus

func (a *Addon) CommonDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup,
	addonDice *diceyml.Object, addonSpec *apistructs.AddonExtension) (map[string]string, error)

CommonDeployStatus 通用addon状态拉取

func (*Addon) ConsulDeployStatus

func (a *Addon) ConsulDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

ConsulDeployStatus consul状态拉取

func (*Addon) CreateAddonProvider

func (a *Addon) CreateAddonProvider(req *apistructs.AddonProviderRequest, addonName, providerDomain, userId string) (int, *apistructs.AddonProviderResponse, error)

CreateAddonProvider 请求addon provider,获取新的addon实例

func (*Addon) CreateAddonTenant

func (a *Addon) CreateAddonTenant(name string, addonInstanceRoutingID string, config map[string]string) (string, error)

CreateAddonTenant

func (*Addon) CreateCustom

func (a *Addon) CreateCustom(req *apistructs.CustomAddonCreateRequest) (*map[string]string, error)

CreateCustom 创建自定义 addon

func (*Addon) CreateMysqlTenant

func (a *Addon) CreateMysqlTenant(name string, addoninsRouting *dbclient.AddonInstanceRouting, addonins *dbclient.AddonInstance, config map[string]string) (string, error)

func (*Addon) DecryptPassword

func (a *Addon) DecryptPassword(kmskey *string, password string) (string, error)

optional: kmskey

func (*Addon) Delete

func (a *Addon) Delete(userID, routingInstanceID string) error

Delete 根据 routingInstanceID 删除 addon

func (*Addon) DeleteAddonProvider

func (a *Addon) DeleteAddonProvider(req *apistructs.AddonProviderRequest, uuid, addonName, providerDomain string) (*apistructs.AddonProviderDeleteResponse, error)

DeleteAddonProvider 删除addon provideraddon实例

func (*Addon) DeleteTenant

func (a *Addon) DeleteTenant(userID, addonTenantID string) error

func (*Addon) EsDeployStatus

func (a *Addon) EsDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

EsDeployStatus es状态拉取

func (*Addon) ExportLogInfo

func (a *Addon) ExportLogInfo(level apistructs.ErrorLogLevel, tp apistructs.ErrorResourceType, id, dedupid string, format string, params ...interface{})

func (*Addon) ExportLogInfoDetail

func (a *Addon) ExportLogInfoDetail(level apistructs.ErrorLogLevel, tp apistructs.ErrorResourceType, id string, humanlog, detaillog string)

func (*Addon) FailAndDelete

func (a *Addon) FailAndDelete(addonIns *dbclient.AddonInstance) error

FailAndDelete addon发布失败后,更新表状态

func (*Addon) FindNeedCreateAddon

func (a *Addon) FindNeedCreateAddon(params *apistructs.AddonHandlerCreateItem) (*dbclient.AddonInstanceRouting, error)

FindNeedCreateAddon 判断是否需要真实创建addon

func (*Addon) Get

func (a *Addon) Get(userID, orgID, routingInstanceID string, internalcall bool) (*apistructs.AddonFetchResponseData, error)

Get 根据 routingInstanceID 获取 addon 实例详情

func (*Addon) GetAddonConfig

func (a *Addon) GetAddonConfig(ins *dbclient.AddonInstance) (*apistructs.AddonConfigRes, error)

func (*Addon) GetAddonExtention

GetAddonExtention 获取addon的spec,dice.yml信息

func (*Addon) GetAddonResourceStatus

func (a *Addon) GetAddonResourceStatus(addonIns *dbclient.AddonInstance,
	addonInsRouting *dbclient.AddonInstanceRouting,
	addonDice *diceyml.Object, addonSpec *apistructs.AddonExtension) error

GetAddonResourceStatus 从scheduler获取addon发布状态

func (*Addon) GetAddonTenantConfig

func (a *Addon) GetAddonTenantConfig(ins *dbclient.AddonInstanceTenant) (map[string]interface{}, error)

func (*Addon) GetDeployAndRemoveAddons

func (a *Addon) GetDeployAndRemoveAddons(runtimeID uint64) ([]dbclient.AddonPrebuild, []dbclient.AddonInstanceRouting, error)

GetDeployAndRemoveAddons 获取待部署 addons & 待删除 addons

func (*Addon) GetMiddleware

func (a *Addon) GetMiddleware(orgID uint64, userID, instanceID string) (*apistructs.MiddlewareFetchResponseData, error)

GetMiddleware 获取 middleware 详情

func (*Addon) GetMiddlewareAddonClassification

func (a *Addon) GetMiddlewareAddonClassification(orgID uint64, params *apistructs.MiddlewareListRequest) (*map[string]apistructs.MiddlewareResourceItem, error)

GetMiddlewareAddonClassification 获取 middleware addon分类使用情况

func (*Addon) GetMiddlewareAddonDaily

func (a *Addon) GetMiddlewareAddonDaily(orgID uint64, params *apistructs.MiddlewareListRequest) (*map[string]interface{}, error)

GetMiddlewareAddonDaily 获取 middleware 每日资源使用情况

func (*Addon) GetMiddlewareResource

func (a *Addon) GetMiddlewareResource(instanceID string) ([]apistructs.MiddlewareResourceFetchResponseData, error)

GetMiddlewareResource 获取 middleware 资源详情

func (*Addon) GetRuntimeAddonConfig

func (a *Addon) GetRuntimeAddonConfig(runtimeID uint64) (*[]apistructs.AddonConfigRes, error)

GetRuntimeAddonConfig 根据runtimeID获取addon环境变量

func (*Addon) GetTenant

func (a *Addon) GetTenant(userID, orgID, id string, internalcall bool) (*apistructs.AddonFetchResponseData, error)

func (*Addon) GetTotalResourceWithTime

func (a *Addon) GetTotalResourceWithTime(orgID uint64, params *apistructs.MiddlewareListRequest) (*apistructs.MiddlewareResourceItem, error)

GetTotalResourceWithTime 根据截止时间来查询addon资源占用情况

func (*Addon) InnerGetMiddleware

func (a *Addon) InnerGetMiddleware(instanceID string) (*apistructs.MiddlewareFetchResponseData, error)

InnerGetMiddleware 内部获取middleware详情

func (*Addon) KafkaDeployStatus

func (a *Addon) KafkaDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup, clusterInfo *apistructs.ClusterInfoData) (map[string]string, error)

KafkaDeployStatus kafka状态拉取

func (*Addon) ListAddonInstanceByOrg

func (a *Addon) ListAddonInstanceByOrg(orgid uint64) ([]dbclient.AddonInstance, error)

func (*Addon) ListAvailable

func (a *Addon) ListAvailable(orgID, projectID, workspace string) (*[]apistructs.AddonFetchResponseData, error)

ListAvailableByProject 根据 orgID & projectID 获取可用的 addon 实例列表

func (*Addon) ListByAddonName

func (a *Addon) ListByAddonName(orgID uint64, addonName string) (*[]apistructs.AddonFetchResponseData, error)

ListByAddonName 根据 addonName 获取 指定企业下 addon 列表

func (*Addon) ListByAddonNameAndProject

func (a *Addon) ListByAddonNameAndProject(projectID, workspace, addonName string) ([]apistructs.AddonNameResultItem, error)

ListByAddonNameAndProject 根据addonName查询数据

func (*Addon) ListByCategory

func (a *Addon) ListByCategory(orgID uint64, category string) (*[]apistructs.AddonFetchResponseData, error)

ListByCategory 根据 category 获取 指定企业下 addon 列表

func (*Addon) ListByDiceymlEnvs

func (a *Addon) ListByDiceymlEnvs(diceyml_s string, projectid uint64, workspace string, clustername string) ([]apistructs.AddonFetchResponseData, error)

func (*Addon) ListByOrg

func (a *Addon) ListByOrg(orgID uint64) (*[]apistructs.AddonFetchResponseData, error)

ListByOrg 根据 orgID 获取 addon 列表

func (*Addon) ListByProject

func (a *Addon) ListByProject(orgID, projectID uint64, category string) (*[]apistructs.AddonFetchResponseData, error)

ListByProject 根据 projectID 获取 addon 列表

func (*Addon) ListByRuntime

func (a *Addon) ListByRuntime(runtimeID uint64, projectID, workspace string) (*[]apistructs.AddonFetchResponseData, error)

ListByRuntime 根据 runtimeID 获取 addon 列表

func (*Addon) ListByWorkbench

func (a *Addon) ListByWorkbench(orgID uint64, userID, category string) (*[]apistructs.AddonFetchResponseData, error)

ListByWorkbench 获取给定企业下用户有权限的 addon 列表

func (*Addon) ListCustomAddon

func (a *Addon) ListCustomAddon() (*[]map[string]interface{}, error)

ListCustomAddon 包装api/extensions接口,返回第三方addon

func (*Addon) ListExtension

func (a *Addon) ListExtension(extensionType string) (*[]map[string]interface{}, error)

ListExtension 包装api/extensions接口

func (*Addon) ListInstanceByRuntime

func (a *Addon) ListInstanceByRuntime(runtimeID uint64) ([]dbclient.AddonInstance, error)

func (*Addon) ListInstanceRoutingByRuntime

func (a *Addon) ListInstanceRoutingByRuntime(runtimeID uint64) (*[]dbclient.AddonInstanceRouting, error)

ListInstanceRoutingByRuntime 根据 runtimeID 获取已创建 addon 实例列表

func (*Addon) ListMicroServiceMenu

func (a *Addon) ListMicroServiceMenu(projectID, env string) ([]*apistructs.MicroServiceMenuResponseData, error)

ListMicroServiceMenu 获取项目下的微服务菜单

func (*Addon) ListMicroServiceProject

func (a *Addon) ListMicroServiceProject(projectIDs []string) ([]*apistructs.MicroServiceProjectResponseData, error)

ListMicroServiceProject 获取使用微服务的项目列表

func (*Addon) ListMiddleware

ListMiddleware 获取 middleware 列表

func (*Addon) ListReferencesByInstanceID

func (a *Addon) ListReferencesByInstanceID(orgID uint64, userID, instanceID string) (*[]apistructs.AddonReferenceInfo, error)

ListReferencesByInstanceID 根据 instanceID 获取引用列表

func (*Addon) ListReferencesByRoutingInstanceID

func (a *Addon) ListReferencesByRoutingInstanceID(orgID uint64, userID, routingInstanceID string, internal ...bool) (*[]apistructs.AddonReferenceInfo, error)

ListReferencesByRoutingInstanceID 根据 routingInstanceID 获取引用列表

func (*Addon) MiddlewareListItem

func (a *Addon) MiddlewareListItem(total int, orgID uint64,
	params *apistructs.MiddlewareListRequest, addons *[]dbclient.AddonInstance,
	limited_addonids []string) (*apistructs.MiddlewareListResponseData, error)

MiddlewareListItem item抽取代码,通用

func (*Addon) MySQLDeployStatus

func (a *Addon) MySQLDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup,
	clusterInfo *apistructs.ClusterInfoData) (map[string]string, error)

MySQLDeployStatus myql状态拉取,以及后续环境变量处理

func (*Addon) ParsePreBuild

func (a *Addon) ParsePreBuild(appID, runtimeID uint64, runtimeName, workspace string, addon apistructs.AddonCreateItem) *dbclient.AddonPrebuild

ParsePreBuild 根据 addon 信息生成 AddonPreBuild 对象

func (*Addon) PrepareCheckProjectLastResource

func (a *Addon) PrepareCheckProjectLastResource(projectID uint64, req *[]apistructs.AddonHandlerCreateItem) error

PrepareCheckProjectLastResource 计算项目预留资源,是否满足发布徐局

func (*Addon) RabbitmqDeployStatus

func (a *Addon) RabbitmqDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

RabbitmqDeployStatus rabbitmq状态拉取

func (*Addon) RedisDeployStatus

func (a *Addon) RedisDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

RedisDeployStatus redis状态拉取

func (*Addon) RocketDeployStatus

func (a *Addon) RocketDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

RocketDeployStatus rocket状态拉取

func (*Addon) RuntimeAddonRemove

func (a *Addon) RuntimeAddonRemove(runtimeID, env, operatorId string, projectId uint64) error

RuntimeAddonRemove runtime addon删除

func (*Addon) RuntimeAddonStatus

func (a *Addon) RuntimeAddonStatus(runtimeID string) (uint8, error)

RuntimeAddonStatus runtime addo status, ensure that an error will only be returned when the status is 0

func (*Addon) StructToMap

func (a *Addon) StructToMap(data interface{}, depth int, tag ...string) map[string]interface{}

StructToMap

func (*Addon) SyncAddonResources

func (a *Addon) SyncAddonResources()

func (*Addon) UpdateAddonStatus

func (a *Addon) UpdateAddonStatus(addonIns *dbclient.AddonInstance, addonStatus apistructs.AddonStatus) error

updateAddonStatus addon发布失败后,更新表状态 TODO 状态更新不应混杂删除逻辑

func (*Addon) UpdateCustom

func (a *Addon) UpdateCustom(userID, addonID string, orgID uint64, configReq *map[string]interface{}) error

UpdateCustom 更新自定义 addon

func (*Addon) ZookeeperDeployStatus

func (a *Addon) ZookeeperDeployStatus(addonIns *dbclient.AddonInstance, serviceGroup *apistructs.ServiceGroup) (map[string]string, error)

ZookeeperDeployStatus zk状态拉取

type MicroServiceProjectData

type MicroServiceProjectData []*apistructs.MicroServiceProjectResponseData

func (MicroServiceProjectData) Len

func (d MicroServiceProjectData) Len() int

func (MicroServiceProjectData) Less

func (d MicroServiceProjectData) Less(i, j int) bool

func (MicroServiceProjectData) Swap

func (d MicroServiceProjectData) Swap(i, j int)

type Option

type Option func(*Addon)

Option addon 实例对象配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dbclient.DBClient) Option

WithDBClient 配置 db client

func WithEnvEncrypt

func WithEnvEncrypt(encrypt *encryption.EnvEncrypt) Option

WithEnvEncrypt 设置 encrypt service

func WithHTTPClient

func WithHTTPClient(hc *httpclient.HTTPClient) Option

WithHTTPClient 配置 http 客户端对象.

func WithKMSWrapper added in v1.4.0

func WithKMSWrapper(kms mysql.KMSWrapper) Option

WithKMSWrapper .

func WithResource

func WithResource(resource *resource.Resource) Option

WithResource 配置 Runtime service

type SourcecovAddonManagement added in v1.4.0

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

func (*SourcecovAddonManagement) BuildSourceCovServiceItem added in v1.4.0

func (sam *SourcecovAddonManagement) BuildSourceCovServiceItem(
	params *apistructs.AddonHandlerCreateItem,
	addonIns *dbclient.AddonInstance,
	addonSpec *apistructs.AddonExtension,
	addonDice *diceyml.Object,
	_ *apistructs.ClusterInfoData) (err error)

func (*SourcecovAddonManagement) DeployStatus added in v1.4.0

type SourcecovAddonManagementDeps added in v1.4.0

type SourcecovAddonManagementDeps interface {
	GetProjectNamespaceInfo(projectID uint64) (*apistructs.ProjectNameSpaceInfo, error)
	GetOrg(idOrName interface{}) (*apistructs.OrgDTO, error)
	GetOpenapiOAuth2Token(req apistructs.OpenapiOAuth2TokenGetRequest) (*apistructs.OpenapiOAuth2Token, error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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