dao

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrVolumeNotFound volume not found error, happens when haven't find any matched data
	ErrVolumeNotFound = errors.New("volume not found")
)

Functions

This section is empty.

Types

type AppBackupDao

type AppBackupDao interface {
	Dao
	CheckHistory(groupID, version string) bool
	GetAppBackups(groupID string) ([]*model.AppBackup, error)
	DeleteAppBackup(backupID string) error
	GetAppBackup(backupID string) (*model.AppBackup, error)
	GetDeleteAppBackup(backupID string) (*model.AppBackup, error)
	GetDeleteAppBackups() ([]*model.AppBackup, error)
}

AppBackupDao group app backup history

type AppConfigGroupDao

type AppConfigGroupDao interface {
	Dao
	GetConfigGroupByID(appID, configGroupName string) (*model.ApplicationConfigGroup, error)
	ListByServiceID(sid string) ([]*model.ApplicationConfigGroup, error)
	GetConfigGroupsByAppID(appID string, page, pageSize int) ([]*model.ApplicationConfigGroup, int64, error)
	DeleteConfigGroup(appID, configGroupName string) error
	DeleteByAppID(appID string) error
	CreateOrUpdateConfigGroupsInBatch(cgroups []*model.ApplicationConfigGroup) error
}

AppConfigGroupDao Application config group Dao

type AppConfigGroupItemDao

type AppConfigGroupItemDao interface {
	Dao
	GetConfigGroupItemsByID(appID, configGroupName string) ([]*model.ConfigGroupItem, error)
	ListByServiceID(sid string) ([]*model.ConfigGroupItem, error)
	DeleteConfigGroupItem(appID, configGroupName string) error
	DeleteByAppID(appID string) error
	CreateOrUpdateConfigGroupItemsInBatch(cgitems []*model.ConfigGroupItem) error
}

AppConfigGroupItemDao Application config item group Dao

type AppConfigGroupServiceDao

type AppConfigGroupServiceDao interface {
	Dao
	GetConfigGroupServicesByID(appID, configGroupName string) ([]*model.ConfigGroupService, error)
	DeleteConfigGroupService(appID, configGroupName string) error
	DeleteEffectiveServiceByServiceID(serviceID string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateConfigGroupServicesInBatch(cgservices []*model.ConfigGroupService) error
	DeleteByAppID(appID string) error
}

AppConfigGroupServiceDao service config group Dao

type AppDao

type AppDao interface {
	Dao
	GetByEventId(eventID string) (*model.AppStatus, error)
	DeleteModelByEventId(eventID string) error
}

AppDao tenant env dao

type ApplicationDao

type ApplicationDao interface {
	Dao
	ListApps(tenantEnvID, appName string, page, pageSize int) ([]*model.Application, int64, error)
	GetAppByID(appID string) (*model.Application, error)
	DeleteApp(appID string) error
	GetByServiceID(sid string) (*model.Application, error)
	ListByAppIDs(appIDs []string) ([]*model.Application, error)
	IsK8sAppDuplicate(tenantEnvID, AppID, k8sApp string) bool
}

ApplicationDao tenant env Application Dao

type CertificateDao

type CertificateDao interface {
	Dao
	AddOrUpdate(mo model.Interface) error
	GetCertificateByID(certificateID string) (*model.Certificate, error)
}

CertificateDao -

type CodeCheckResultDao

type CodeCheckResultDao interface {
	Dao
	GetCodeCheckResult(serviceID string) (*model.CodeCheckResult, error)
	DeleteByServiceID(serviceID string) error
}

CodeCheckResultDao CodeCheckResultDao

type Dao

type Dao interface {
	AddModel(model.Interface) error
	UpdateModel(model.Interface) error
}

Dao 数据持久化层接口

type DelDao

type DelDao interface {
	DeleteModel(serviceID string, arg ...interface{}) error
}

DelDao 删除接口

type EndpointsDao

type EndpointsDao interface {
	Dao
	GetByUUID(uuid string) (*model.Endpoint, error)
	DelByUUID(uuid string) error
	List(sid string) ([]*model.Endpoint, error)
	DeleteByServiceID(sid string) error
}

EndpointsDao is an interface for defining method for operating table 3rd_party_svc_endpoints.

type EventDao

type EventDao interface {
	Dao
	CreateEventsInBatch(events []*model.ServiceEvent) error
	GetEventByEventID(eventID string) (*model.ServiceEvent, error)
	GetEventByEventIDs(eventIDs []string) ([]*model.ServiceEvent, error)
	GetEventByServiceID(serviceID string) ([]*model.ServiceEvent, error)
	DelEventByServiceID(serviceID string) error
	ListByTargetID(targetID string) ([]*model.ServiceEvent, error)
	GetEventsByTarget(target, targetID string, offset, liimt int) ([]*model.ServiceEvent, int, error)
	GetEventsByTenantEnvID(tenantEnvID string, offset, limit int) ([]*model.ServiceEvent, int, error)
	GetLastASyncEvent(target, targetID string) (*model.ServiceEvent, error)
	UnfinishedEvents(target, targetID string, optTypes ...string) ([]*model.ServiceEvent, error)
	LatestFailurePodEvent(podName string) (*model.ServiceEvent, error)
	UpdateReason(eventID string, reason string) error
	SetEventStatus(ctx context.Context, status model.EventStatus) error
	DeleteEvents(eventIDs []string) error
	UpdateInBatch(events []*model.ServiceEvent) error
}

EventDao EventDao

type GwRuleConfigDao

type GwRuleConfigDao interface {
	Dao
	DeleteByRuleID(rid string) error
	ListByRuleID(rid string) ([]*model.GwRuleConfig, error)
	DeleteByRuleIDs(ruleIDs []string) error
	CreateOrUpdateGwRuleConfigsInBatch(ruleConfigs []*model.GwRuleConfig) error
}

GwRuleConfigDao is the interface that wraps the required methods to execute curd for table gateway_rule_config.

type HTTPRuleDao

type HTTPRuleDao interface {
	Dao
	GetHTTPRuleByID(id string) (*model.HTTPRule, error)
	GetHTTPRuleByServiceIDAndContainerPort(serviceID string, containerPort int) ([]*model.HTTPRule, error)
	GetHTTPRulesByCertificateID(certificateID string) ([]*model.HTTPRule, error)
	GetHTTPRuleByDomainAndHost(domain, path string) ([]*model.HTTPRule, error)
	DeleteHTTPRuleByID(id string) error
	DeleteHTTPRuleByServiceID(serviceID string) error
	ListByServiceID(serviceID string) ([]*model.HTTPRule, error)
	ListByComponentPort(componentID string, port int) ([]*model.HTTPRule, error)
	ListByCertID(certID string) ([]*model.HTTPRule, error)
	DeleteByComponentPort(componentID string, port int) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateHTTPRuleInBatch(httpRules []*model.HTTPRule) error
	ListByComponentIDs(componentIDs []string) ([]*model.HTTPRule, error)
}

HTTPRuleDao -

type HTTPRuleRewriteDao

type HTTPRuleRewriteDao interface {
	Dao
	CreateOrUpdateHTTPRuleRewriteInBatch(httpRuleRewrites []*model.HTTPRuleRewrite) error
	ListByHTTPRuleID(httpRuleID string) ([]*model.HTTPRuleRewrite, error)
	DeleteByHTTPRuleID(httpRuleID string) error
	DeleteByHTTPRuleIDs(httpRuleIDs []string) error
}

HTTPRuleRewriteDao -

type LicenseDao

type LicenseDao interface {
	Dao
	//DeleteLicense(token string) error
	ListLicenses() ([]*model.LicenseInfo, error)
}

LicenseDao LicenseDao

type LocalSchedulerDao

type LocalSchedulerDao interface {
	Dao
	GetLocalScheduler(serviceID string) ([]*model.LocalScheduler, error)
}

LocalSchedulerDao 本地调度信息

type NotificationEventDao

type NotificationEventDao interface {
	Dao
	GetNotificationEventByHash(hash string) (*model.NotificationEvent, error)
	GetNotificationEventByKind(kind, kindID string) ([]*model.NotificationEvent, error)
	GetNotificationEventByTime(start, end time.Time) ([]*model.NotificationEvent, error)
	GetNotificationEventNotHandle() ([]*model.NotificationEvent, error)
}

NotificationEventDao NotificationEventDao

type RegionAPIClassDao

type RegionAPIClassDao interface {
	Dao
	GetPrefixesByClass(apiClass string) ([]*model.RegionAPIClass, error)
	DeletePrefixInClass(apiClass, prefix string) error
}

RegionAPIClassDao RegionAPIClassDao

type RuleExtensionDao

type RuleExtensionDao interface {
	Dao
	GetRuleExtensionByRuleID(ruleID string) ([]*model.RuleExtension, error)
	DeleteRuleExtensionByRuleID(ruleID string) error
	DeleteByRuleIDs(ruleIDs []string) error
	CreateOrUpdateRuleExtensionsInBatch(exts []*model.RuleExtension) error
}

RuleExtensionDao -

type ServiceProbeDao

type ServiceProbeDao interface {
	Dao
	DelDao
	GetServiceProbes(serviceID string) ([]*model.TenantEnvServiceProbe, error)
	GetServiceUsedProbe(serviceID, mode string) (*model.TenantEnvServiceProbe, error)
	DELServiceProbesByServiceID(serviceID string) error
	DelByServiceID(sid string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateProbesInBatch(probes []*model.TenantEnvServiceProbe) error
}

ServiceProbeDao ServiceProbeDao

type ServiceSourceDao

type ServiceSourceDao interface {
	Dao
	GetServiceSource(serviceID string) ([]*model.ServiceSourceConfig, error)
}

ServiceSourceDao service source dao

type TCPRuleDao

type TCPRuleDao interface {
	Dao
	GetTCPRuleByServiceIDAndContainerPort(serviceID string, containerPort int) ([]*model.TCPRule, error)
	GetTCPRuleByID(id string) (*model.TCPRule, error)
	GetTCPRuleByServiceID(sid string) ([]*model.TCPRule, error)
	DeleteByID(uuid string) error
	DeleteTCPRuleByServiceID(serviceID string) error
	ListByServiceID(serviceID string) ([]*model.TCPRule, error)
	GetUsedPortsByIP(ip string) ([]*model.TCPRule, error)
	DeleteByComponentPort(componentID string, port int) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateTCPRuleInBatch(tcpRules []*model.TCPRule) error
}

TCPRuleDao -

type TenantEnvDao added in v1.1.0

type TenantEnvDao interface {
	Dao
	GetAllTenantEnvs(query string) ([]*model.TenantEnvs, error)
	GetTenantEnvByUUID(uuid string) (*model.TenantEnvs, error)
	GetTenantEnvIDByName(tenantName, tenantEnvName string) (*model.TenantEnvs, error)
	GetTenantEnvs(tenantName, query string) ([]*model.TenantEnvs, error)
	GetPagedTenantEnvs(offset, len int) ([]*model.TenantEnvs, error)
	GetTenantEnvIDsByNames(tenantName string, tenantEnvNames []string) ([]string, error)
	GetTenantEnvLimitsByNames(tenantName string, tenantEnvNames []string) (map[string]int, error)
	GetTenantEnvByUUIDIsExist(uuid string) bool
	DelByTenantEnvID(tenantEnvID string) error
}

TenantEnvDao tenant env dao

type TenantEnvPluginBuildVersionDao added in v1.1.0

type TenantEnvPluginBuildVersionDao interface {
	Dao
	DeleteBuildVersionByVersionID(versionID string) error
	DeleteBuildVersionByPluginID(pluginID string) error
	GetBuildVersionByPluginID(pluginID string) ([]*model.TenantEnvPluginBuildVersion, error)
	GetBuildVersionByVersionID(pluginID, versionID string) (*model.TenantEnvPluginBuildVersion, error)
	GetLastBuildVersionByVersionID(pluginID, versionID string) (*model.TenantEnvPluginBuildVersion, error)
	GetBuildVersionByDeployVersion(pluginID, versionID, deployVersion string) (*model.TenantEnvPluginBuildVersion, error)
	ListSuccessfulOnesByPluginIDs(pluginIDs []string) ([]*model.TenantEnvPluginBuildVersion, error)
	CreateOrUpdatePluginBuildVersionsInBatch(buildVersions []*model.TenantEnvPluginBuildVersion) error
}

TenantEnvPluginBuildVersionDao TenantEnvPluginBuildVersionDao

type TenantEnvPluginDao added in v1.1.0

type TenantEnvPluginDao interface {
	Dao
	GetPluginByID(pluginID, tenantEnvID string) (*model.TenantEnvPlugin, error)
	DeletePluginByID(pluginID, tenantEnvID string) error
	GetPluginsByTenantEnvID(tenantEnvID string) ([]*model.TenantEnvPlugin, error)
	ListByIDs(ids []string) ([]*model.TenantEnvPlugin, error)
	ListByTenantEnvID(tenantEnvID string) ([]*model.TenantEnvPlugin, error)
	CreateOrUpdatePluginsInBatch(plugins []*model.TenantEnvPlugin) error
}

TenantEnvPluginDao TenantEnvPluginDao

type TenantEnvPluginDefaultENVDao added in v1.1.0

type TenantEnvPluginDefaultENVDao interface {
	Dao
	GetDefaultENVByName(pluginID, name, versionID string) (*model.TenantEnvPluginDefaultENV, error)
	GetDefaultENVSByPluginID(pluginID, versionID string) ([]*model.TenantEnvPluginDefaultENV, error)
	//GetDefaultENVSByPluginIDCantBeSet(pluginID string) ([]*model.TenantEnvPluginDefaultENV, error)
	DeleteDefaultENVByName(pluginID, name, versionID string) error
	DeleteAllDefaultENVByPluginID(PluginID string) error
	DeleteDefaultENVByPluginIDAndVersionID(pluginID, versionID string) error
	GetALLMasterDefultENVs(pluginID string) ([]*model.TenantEnvPluginDefaultENV, error)
	GetDefaultEnvWhichCanBeSetByPluginID(pluginID, versionID string) ([]*model.TenantEnvPluginDefaultENV, error)
}

TenantEnvPluginDefaultENVDao TenantEnvPluginDefaultENVDao

type TenantEnvPluginVersionConfigDao added in v1.1.0

type TenantEnvPluginVersionConfigDao interface {
	Dao
	GetPluginConfig(serviceID, pluginID string) (*model.TenantEnvPluginVersionDiscoverConfig, error)
	GetPluginConfigs(serviceID string) ([]*model.TenantEnvPluginVersionDiscoverConfig, error)
	DeletePluginConfig(serviceID, pluginID string) error
	DeletePluginConfigByServiceID(serviceID string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdatePluginVersionConfigsInBatch(versionConfigs []*model.TenantEnvPluginVersionDiscoverConfig) error
}

TenantEnvPluginVersionConfigDao service plugin config that can be dynamic discovery dao interface

type TenantEnvPluginVersionEnvDao added in v1.1.0

type TenantEnvPluginVersionEnvDao interface {
	Dao
	DeleteEnvByEnvName(envName, pluginID, serviceID string) error
	DeleteEnvByPluginID(serviceID, pluginID string) error
	DeleteEnvByServiceID(serviceID string) error
	GetVersionEnvByServiceID(serviceID string, pluginID string) ([]*model.TenantEnvPluginVersionEnv, error)
	ListByServiceID(serviceID string) ([]*model.TenantEnvPluginVersionEnv, error)
	GetVersionEnvByEnvName(serviceID, pluginID, envName string) (*model.TenantEnvPluginVersionEnv, error)
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdatePluginVersionEnvsInBatch(versionEnvs []*model.TenantEnvPluginVersionEnv) error
}

TenantEnvPluginVersionEnvDao TenantEnvPluginVersionEnvDao

type TenantEnvServceAutoscalerRuleMetricsDao added in v1.1.0

type TenantEnvServceAutoscalerRuleMetricsDao interface {
	Dao
	UpdateOrCreate(metric *model.TenantEnvServiceAutoscalerRuleMetrics) error
	ListByRuleID(ruleID string) ([]*model.TenantEnvServiceAutoscalerRuleMetrics, error)
	DeleteByRuleID(ruldID string) error
	DeleteByRuleIDs(ruleIDs []string) error
	CreateOrUpdateScaleRuleMetricsInBatch(metrics []*model.TenantEnvServiceAutoscalerRuleMetrics) error
}

TenantEnvServceAutoscalerRuleMetricsDao -

type TenantEnvServceAutoscalerRulesDao added in v1.1.0

type TenantEnvServceAutoscalerRulesDao interface {
	Dao
	GetByRuleID(ruleID string) (*model.TenantEnvServiceAutoscalerRules, error)
	ListByServiceID(serviceID string) ([]*model.TenantEnvServiceAutoscalerRules, error)
	ListEnableOnesByServiceID(serviceID string) ([]*model.TenantEnvServiceAutoscalerRules, error)
	ListByComponentIDs(componentIDs []string) ([]*model.TenantEnvServiceAutoscalerRules, error)
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateScaleRulesInBatch(rules []*model.TenantEnvServiceAutoscalerRules) error
}

TenantEnvServceAutoscalerRulesDao -

type TenantEnvServiceConfigFileDao added in v1.1.0

type TenantEnvServiceConfigFileDao interface {
	Dao
	GetConfigFileByServiceID(serviceID string) ([]*model.TenantEnvServiceConfigFile, error)
	GetByVolumeName(sid, volumeName string) (*model.TenantEnvServiceConfigFile, error)
	DelByVolumeID(sid string, volumeName string) error
	DelByServiceID(sid string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateConfigFilesInBatch(configFiles []*model.TenantEnvServiceConfigFile) error
}

TenantEnvServiceConfigFileDao tenant env service config file dao interface

type TenantEnvServiceDao added in v1.1.0

type TenantEnvServiceDao interface {
	Dao
	GetServiceByID(serviceID string) (*model.TenantEnvServices, error)
	GetServiceByServiceAlias(serviceAlias string) (*model.TenantEnvServices, error)
	GetServiceByIDs(serviceIDs []string) ([]*model.TenantEnvServices, error)
	GetServiceAliasByIDs(uids []string) ([]*model.TenantEnvServices, error)
	GetServiceByTenantEnvIDAndServiceAlias(tenantEnvID, serviceName string) (*model.TenantEnvServices, error)
	SetTenantEnvServiceStatus(serviceID, status string) error
	GetServicesByTenantEnvID(tenantEnvID string) ([]*model.TenantEnvServices, error)
	GetServicesByTenantEnvIDs(tenantEnvIDs []string) ([]*model.TenantEnvServices, error)
	GetServicesAllInfoByTenantEnvID(tenantEnvID string) ([]*model.TenantEnvServices, error)
	GetServicesInfoByAppID(appID string, page, pageSize int) ([]*model.TenantEnvServices, int64, error)
	CountServiceByAppID(appID string) (int64, error)
	GetServiceIDsByAppID(appID string) (re []model.ServiceID)
	GetServicesByServiceIDs(serviceIDs []string) ([]*model.TenantEnvServices, error)
	DeleteServiceByServiceID(serviceID string) error
	GetServiceMemoryByTenantEnvIDs(tenantEnvIDs, serviceIDs []string) (map[string]map[string]interface{}, error)
	GetServiceMemoryByServiceIDs(serviceIDs []string) (map[string]map[string]interface{}, error)
	GetPagedTenantEnvService(offset, len int, serviceIDs []string) ([]map[string]interface{}, int, error)
	GetAllServicesID() ([]*model.TenantEnvServices, error)
	UpdateDeployVersion(serviceID, deployversion string) error
	ListThirdPartyServices() ([]*model.TenantEnvServices, error)
	ListServicesByTenantEnvID(tenantEnvID string) ([]*model.TenantEnvServices, error)
	GetServiceTypeByID(serviceID string) (*model.TenantEnvServices, error)
	ListByAppID(appID string) ([]*model.TenantEnvServices, error)
	BindAppByServiceIDs(appID string, serviceIDs []string) error
	CreateOrUpdateComponentsInBatch(components []*model.TenantEnvServices) error
	DeleteByComponentIDs(tenantEnvID, appID string, componentIDs []string) error
	IsK8sComponentNameDuplicate(appID, serviceID, k8sComponentName string) bool
}

TenantEnvServiceDao TenantEnvServiceDao

type TenantEnvServiceDeleteDao added in v1.1.0

type TenantEnvServiceDeleteDao interface {
	Dao
	GetTenantEnvServicesDeleteByCreateTime(createTime time.Time) ([]*model.TenantEnvServicesDelete, error)
	DeleteTenantEnvServicesDelete(record *model.TenantEnvServicesDelete) error
	List() ([]*model.TenantEnvServicesDelete, error)
}

TenantEnvServiceDeleteDao TenantEnvServiceDeleteDao

type TenantEnvServiceEnvVarDao added in v1.1.0

type TenantEnvServiceEnvVarDao interface {
	Dao
	DelDao
	//service_id__in=sids, scope__in=("outer", "both")
	GetDependServiceEnvs(serviceIDs []string, scopes []string) ([]*model.TenantEnvServiceEnvVar, error)
	GetServiceEnvs(serviceID string, scopes []string) ([]*model.TenantEnvServiceEnvVar, error)
	GetEnv(serviceID, envName string) (*model.TenantEnvServiceEnvVar, error)
	DELServiceEnvsByServiceID(serviceID string) error
	DelByServiceIDAndScope(sid, scope string) error
	CreateOrUpdateEnvsInBatch(envs []*model.TenantEnvServiceEnvVar) error
	DeleteByComponentIDs(componentIDs []string) error
}

TenantEnvServiceEnvVarDao TenantEnvServiceEnvVarDao

type TenantEnvServiceLBMappingPortDao added in v1.1.0

type TenantEnvServiceLBMappingPortDao interface {
	Dao
	GetTenantEnvServiceLBMappingPort(serviceID string, containerPort int) (*model.TenantEnvServiceLBMappingPort, error)
	GetLBMappingPortByServiceIDAndPort(serviceID string, port int) (*model.TenantEnvServiceLBMappingPort, error)
	GetTenantEnvServiceLBMappingPortByService(serviceID string) ([]*model.TenantEnvServiceLBMappingPort, error)
	GetLBPortsASC() ([]*model.TenantEnvServiceLBMappingPort, error)
	CreateTenantEnvServiceLBMappingPort(serviceID string, containerPort int) (*model.TenantEnvServiceLBMappingPort, error)
	DELServiceLBMappingPortByServiceID(serviceID string) error
	DELServiceLBMappingPortByServiceIDAndPort(serviceID string, lbPort int) error
	GetLBPortByTenantEnvAndPort(tenantEnvID string, lbport int) (*model.TenantEnvServiceLBMappingPort, error)
	PortExists(port int) bool
}

TenantEnvServiceLBMappingPortDao vs lb mapping port dao

type TenantEnvServiceLabelDao added in v1.1.0

type TenantEnvServiceLabelDao interface {
	Dao
	DelDao
	GetTenantEnvServiceLabel(serviceID string) ([]*model.TenantEnvServiceLable, error)
	DeleteLabelByServiceID(serviceID string) error
	GetTenantEnvServiceNodeSelectorLabel(serviceID string) ([]*model.TenantEnvServiceLable, error)
	GetTenantEnvNodeAffinityLabel(serviceID string) (*model.TenantEnvServiceLable, error)
	GetTenantEnvServiceAffinityLabel(serviceID string) ([]*model.TenantEnvServiceLable, error)
	GetTenantEnvServiceTypeLabel(serviceID string) (*model.TenantEnvServiceLable, error)
	DelTenantEnvServiceLabelsByLabelValuesAndServiceID(serviceID string) error
	DelTenantEnvServiceLabelsByServiceIDKey(serviceID string, labelKey string) error
	DelTenantEnvServiceLabelsByServiceIDKeyValue(serviceID string, labelKey string, labelValue string) error
	GetLabelByNodeSelectorKey(serviceID string, labelValue string) (*model.TenantEnvServiceLable, error)
	GetPrivilegedLabel(serviceID string) (*model.TenantEnvServiceLable, error)
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateLabelsInBatch(labels []*model.TenantEnvServiceLable) error
}

TenantEnvServiceLabelDao TenantEnvServiceLabelDao

type TenantEnvServiceMonitorDao added in v1.1.0

type TenantEnvServiceMonitorDao interface {
	Dao
	GetByName(serviceID, name string) (*model.TenantEnvServiceMonitor, error)
	GetByServiceID(serviceID string) ([]*model.TenantEnvServiceMonitor, error)
	DeleteServiceMonitor(mo *model.TenantEnvServiceMonitor) error
	DeleteServiceMonitorByServiceID(serviceID string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateMonitorInBatch(monitors []*model.TenantEnvServiceMonitor) error
}

TenantEnvServiceMonitorDao -

type TenantEnvServiceMountRelationDao added in v1.1.0

type TenantEnvServiceMountRelationDao interface {
	Dao
	GetTenantEnvServiceMountRelationsByService(serviceID string) ([]*model.TenantEnvServiceMountRelation, error)
	DElTenantEnvServiceMountRelationByServiceAndName(serviceID, mntDir string) error
	DELTenantEnvServiceMountRelationByServiceID(serviceID string) error
	DElTenantEnvServiceMountRelationByDepService(serviceID, depServiceID string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateVolumeRelsInBatch(volRels []*model.TenantEnvServiceMountRelation) error
}

TenantEnvServiceMountRelationDao TenantEnvServiceMountRelationDao

type TenantEnvServicePluginRelationDao added in v1.1.0

type TenantEnvServicePluginRelationDao interface {
	Dao
	DeleteRelationByServiceIDAndPluginID(serviceID, pluginID string) error
	DeleteALLRelationByServiceID(serviceID string) error
	DeleteALLRelationByPluginID(pluginID string) error
	GetALLRelationByServiceID(serviceID string) ([]*model.TenantEnvServicePluginRelation, error)
	GetRelateionByServiceIDAndPluginID(serviceID, pluginID string) (*model.TenantEnvServicePluginRelation, error)
	CheckSomeModelPluginByServiceID(serviceID, pluginModel string) (bool, error)
	// CheckSomeModelLikePluginByServiceID(serviceID, pluginModel string) (bool, error)
	CheckPluginBeforeInstall(serviceID, pluginModel string) (bool, error)
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdatePluginRelsInBatch(relations []*model.TenantEnvServicePluginRelation) error
}

TenantEnvServicePluginRelationDao TenantEnvServicePluginRelationDao

type TenantEnvServiceRelationDao added in v1.1.0

type TenantEnvServiceRelationDao interface {
	Dao
	DelDao
	GetTenantEnvServiceRelations(serviceID string) ([]*model.TenantEnvServiceRelation, error)
	ListByServiceIDs(serviceIDs []string) ([]*model.TenantEnvServiceRelation, error)
	GetTenantEnvServiceRelationsByDependServiceID(dependServiceID string) ([]*model.TenantEnvServiceRelation, error)
	HaveRelations(serviceID string) bool
	DELRelationsByServiceID(serviceID string) error
	DeleteRelationByDepID(serviceID, depID string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateRelationsInBatch(relations []*model.TenantEnvServiceRelation) error
}

TenantEnvServiceRelationDao TenantEnvServiceRelationDao

type TenantEnvServiceScalingRecordsDao added in v1.1.0

type TenantEnvServiceScalingRecordsDao interface {
	Dao
	UpdateOrCreate(new *model.TenantEnvServiceScalingRecords) error
	ListByServiceID(serviceID string, offset, limit int) ([]*model.TenantEnvServiceScalingRecords, error)
	CountByServiceID(serviceID string) (int, error)
}

TenantEnvServiceScalingRecordsDao -

type TenantEnvServiceVolumeDao added in v1.1.0

type TenantEnvServiceVolumeDao interface {
	Dao
	DelDao
	GetTenantEnvServiceVolumesByServiceID(serviceID string) ([]*model.TenantEnvServiceVolume, error)
	DeleteTenantEnvServiceVolumesByServiceID(serviceID string) error
	DeleteByServiceIDAndVolumePath(serviceID string, volumePath string) error
	GetVolumeByServiceIDAndName(serviceID, name string) (*model.TenantEnvServiceVolume, error)
	GetAllVolumes() ([]*model.TenantEnvServiceVolume, error)
	GetVolumeByID(id int) (*model.TenantEnvServiceVolume, error)
	DelShareableBySID(sid string) error
	ListVolumesByComponentIDs(componentIDs []string) ([]*model.TenantEnvServiceVolume, error)
	DeleteByVolumeIDs(volumeIDs []uint) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateVolumesInBatch(volumes []*model.TenantEnvServiceVolume) error
}

TenantEnvServiceVolumeDao TenantEnvServiceVolumeDao

type TenantEnvServicesPortDao added in v1.1.0

type TenantEnvServicesPortDao interface {
	Dao
	DelDao
	GetByTenantEnvAndName(tenantEnvID, name string) (*model.TenantEnvServicesPort, error)
	GetPortsByServiceID(serviceID string) ([]*model.TenantEnvServicesPort, error)
	GetOuterPorts(serviceID string) ([]*model.TenantEnvServicesPort, error)
	GetInnerPorts(serviceID string) ([]*model.TenantEnvServicesPort, error)
	GetPort(serviceID string, port int) (*model.TenantEnvServicesPort, error)
	GetOpenedPorts(serviceID string) ([]*model.TenantEnvServicesPort, error)
	//GetDepUDPPort get all depend service udp port info
	GetDepUDPPort(serviceID string) ([]*model.TenantEnvServicesPort, error)
	DELPortsByServiceID(serviceID string) error
	HasOpenPort(sid string) bool
	DelByServiceID(sid string) error
	ListInnerPortsByServiceIDs(serviceIDs []string) ([]*model.TenantEnvServicesPort, error)
	ListByK8sServiceNames(serviceIDs []string) ([]*model.TenantEnvServicesPort, error)
	CreateOrUpdatePortsInBatch(ports []*model.TenantEnvServicesPort) error
	DeleteByComponentIDs(componentIDs []string) error
}

TenantEnvServicesPortDao TenantEnvServicesPortDao

type TenantEnvServicesStreamPluginPortDao added in v1.1.0

type TenantEnvServicesStreamPluginPortDao interface {
	Dao
	GetPluginMappingPorts(serviceID string) ([]*model.TenantEnvServicesStreamPluginPort, error)
	SetPluginMappingPort(
		tenantEnvID string,
		serviceID string,
		pluginModel string,
		containerPort int,
	) (int, error)
	DeletePluginMappingPortByContainerPort(
		serviceID string,
		pluginModel string,
		containerPort int,
	) error
	DeleteAllPluginMappingPortByServiceID(serviceID string) error
	GetPluginMappingPortByServiceIDAndContainerPort(
		serviceID string,
		pluginModel string,
		containerPort int,
	) (*model.TenantEnvServicesStreamPluginPort, error)
	ListByServiceID(sid string) ([]*model.TenantEnvServicesStreamPluginPort, error)
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdateStreamPluginPortsInBatch(spPorts []*model.TenantEnvServicesStreamPluginPort) error
}

TenantEnvServicesStreamPluginPortDao TenantEnvServicesStreamPluginPortDao

type ThirdPartySvcDiscoveryCfgDao

type ThirdPartySvcDiscoveryCfgDao interface {
	Dao
	GetByServiceID(sid string) (*model.ThirdPartySvcDiscoveryCfg, error)
	DeleteByServiceID(sid string) error
	DeleteByComponentIDs(componentIDs []string) error
	CreateOrUpdate3rdSvcDiscoveryCfgInBatch(cfgs []*model.ThirdPartySvcDiscoveryCfg) error
}

ThirdPartySvcDiscoveryCfgDao is an interface for defining method for operating table 3rd_party_svc_discovery_cfg.

type VersionInfoDao

type VersionInfoDao interface {
	Dao
	ListSuccessfulOnes() ([]*model.VersionInfo, error)
	GetVersionByEventID(eventID string) (*model.VersionInfo, error)
	GetVersionByDeployVersion(version, serviceID string) (*model.VersionInfo, error)
	GetVersionByServiceID(serviceID string) ([]*model.VersionInfo, error)
	GetLatestScsVersion(sid string) (*model.VersionInfo, error)
	GetAllVersionByServiceID(serviceID string) ([]*model.VersionInfo, error)
	DeleteVersionByEventID(eventID string) error
	DeleteVersionByServiceID(serviceID string) error
	GetVersionInfo(timePoint time.Time, serviceIDList []string) ([]*model.VersionInfo, error)
	DeleteVersionInfo(obj *model.VersionInfo) error
	DeleteFailureVersionInfo(timePoint time.Time, status string, serviceIDList []string) error
	SearchVersionInfo() ([]*model.VersionInfo, error)
	ListByServiceIDStatus(serviceID string, finalStatus *bool) ([]*model.VersionInfo, error)
	ListVersionsByComponentIDs(componentIDs []string) ([]*model.VersionInfo, error)
}

VersionInfoDao VersionInfoDao

type VolumeTypeDao

type VolumeTypeDao interface {
	Dao
	DeleteModelByVolumeTypes(volumeType string) error
	GetAllVolumeTypes() ([]*model.TenantEnvServiceVolumeType, error)
	GetAllVolumeTypesByPage(page int, pageSize int) ([]*model.TenantEnvServiceVolumeType, error)
	GetVolumeTypeByType(vt string) (*model.TenantEnvServiceVolumeType, error)
	CreateOrUpdateVolumeType(vt *model.TenantEnvServiceVolumeType) (*model.TenantEnvServiceVolumeType, error)
}

VolumeTypeDao volume type dao

Jump to

Keyboard shortcuts

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