Documentation ¶
Index ¶
- type BasicImageColl
- func (c *BasicImageColl) Create(args *models.BasicImage) error
- func (c *BasicImageColl) Delete(id string) error
- func (c *BasicImageColl) EnsureIndex(ctx context.Context) error
- func (c *BasicImageColl) Find(id string) (*models.BasicImage, error)
- func (c *BasicImageColl) GetCollectionName() string
- func (c *BasicImageColl) InitBasicImageData(basicImageInfos []*models.BasicImage)
- func (c *BasicImageColl) List(opt *BasicImageOpt) ([]*models.BasicImage, error)
- func (c *BasicImageColl) Update(id string, args *models.BasicImage) error
- type BasicImageOpt
- type BuildColl
- func (c *BuildColl) Create(build *models.Build) error
- func (c *BuildColl) Delete(name, version, productName string) error
- func (c *BuildColl) DistinctTargets(excludeModule []string, productName string) (map[string]bool, error)
- func (c *BuildColl) EnsureIndex(ctx context.Context) error
- func (c *BuildColl) Find(opt *BuildFindOption) (*models.Build, error)
- func (c *BuildColl) GetCollectionName() string
- func (c *BuildColl) List(opt *BuildListOption) ([]*models.Build, error)
- func (c *BuildColl) Update(build *models.Build) error
- func (c *BuildColl) UpdateBuildParam(name, version, productName string, params []*models.Parameter) error
- func (c *BuildColl) UpdateTargets(name, productName string, targets []*models.ServiceModuleTarget) error
- type BuildFindOption
- type BuildItem
- type BuildListOption
- type BuildPipeResp
- type BuildStatColl
- func (c *BuildStatColl) Create(args *models.BuildStat) error
- func (c *BuildStatColl) EnsureIndex(ctx context.Context) error
- func (c *BuildStatColl) FindCount() (int, error)
- func (c *BuildStatColl) GetBuildTotalAndSuccess() ([]*BuildItem, error)
- func (c *BuildStatColl) GetCollectionName() string
- func (c *BuildStatColl) ListBuildStat(option *BuildStatOption) ([]*models.BuildStat, error)
- func (c *BuildStatColl) Update(args *models.BuildStat) error
- type BuildStatOption
- type ConfigColl
- func (c *ConfigColl) EnsureIndex(ctx context.Context) error
- func (c *ConfigColl) Find(opt *ConfigFindOption) (*models.Config, error)
- func (c *ConfigColl) GetCollectionName() string
- func (c *ConfigColl) ListAllRevisions() ([]*models.Config, error)
- func (c *ConfigColl) ListMaxRevisions(productName string) ([]*models.Config, error)
- type ConfigFindOption
- type CountTaskOption
- type CounterColl
- func (c *CounterColl) Delete(counterName string) error
- func (c *CounterColl) EnsureIndex(_ context.Context) error
- func (c *CounterColl) Find(name string) (*models.Counter, error)
- func (c *CounterColl) GetCollectionName() string
- func (c *CounterColl) GetNextSeq(counterName string) (int64, error)
- func (c *CounterColl) Rename(oldName, newName string) error
- func (c *CounterColl) SetToNumber(counterName string, number int64) error
- type CronjobColl
- func (c *CronjobColl) Create(args *models.Cronjob) error
- func (c *CronjobColl) Delete(param *CronjobDeleteOption) error
- func (c *CronjobColl) EnsureIndex(ctx context.Context) error
- func (c *CronjobColl) GetCollectionName() string
- func (c *CronjobColl) List(param *ListCronjobParam) ([]*models.Cronjob, error)
- func (c *CronjobColl) ListActiveJob() ([]*models.Cronjob, error)
- func (c *CronjobColl) Update(job *models.Cronjob) error
- type CronjobDeleteOption
- type DeliveryActivityArgs
- type DeliveryActivityColl
- func (c *DeliveryActivityColl) EnsureIndex(ctx context.Context) error
- func (c *DeliveryActivityColl) GetCollectionName() string
- func (c *DeliveryActivityColl) Insert(args *models.DeliveryActivity) error
- func (c *DeliveryActivityColl) InsertWithID(id string, args *models.DeliveryActivity) error
- func (c *DeliveryActivityColl) List(args *DeliveryActivityArgs) ([]*models.DeliveryActivity, int, error)
- type DeliveryArtifactArgs
- type DeliveryArtifactColl
- func (c *DeliveryArtifactColl) EnsureIndex(ctx context.Context) error
- func (c *DeliveryArtifactColl) Get(args *DeliveryArtifactArgs) (*models.DeliveryArtifact, error)
- func (c *DeliveryArtifactColl) GetCollectionName() string
- func (c *DeliveryArtifactColl) Insert(args *models.DeliveryArtifact) error
- func (c *DeliveryArtifactColl) List(args *DeliveryArtifactArgs) ([]*models.DeliveryArtifact, int, error)
- func (c *DeliveryArtifactColl) Update(args *DeliveryArtifactArgs) error
- type DeliveryBuildArgs
- type DeliveryBuildColl
- func (c *DeliveryBuildColl) Delete(releaseID string) error
- func (c *DeliveryBuildColl) EnsureIndex(ctx context.Context) error
- func (c *DeliveryBuildColl) Find(args *DeliveryBuildArgs) ([]*models.DeliveryBuild, error)
- func (c *DeliveryBuildColl) GetCollectionName() string
- func (c *DeliveryBuildColl) Insert(args *models.DeliveryBuild) error
- type DeliveryDeployArgs
- type DeliveryDeployColl
- func (c *DeliveryDeployColl) Delete(releaseID string) error
- func (c *DeliveryDeployColl) EnsureIndex(ctx context.Context) error
- func (c *DeliveryDeployColl) Find(args *DeliveryDeployArgs) ([]*models.DeliveryDeploy, error)
- func (c *DeliveryDeployColl) GetCollectionName() string
- func (c *DeliveryDeployColl) Insert(args *models.DeliveryDeploy) error
- type DeliveryDistributeArgs
- type DeliveryDistributeColl
- func (c *DeliveryDistributeColl) Delete(releaseID string) error
- func (c *DeliveryDistributeColl) EnsureIndex(ctx context.Context) error
- func (c *DeliveryDistributeColl) Find(args *DeliveryDistributeArgs) ([]*models.DeliveryDistribute, error)
- func (c *DeliveryDistributeColl) GetCollectionName() string
- func (c *DeliveryDistributeColl) Insert(args *models.DeliveryDistribute) error
- type DeliverySecurityArgs
- type DeliverySecurityColl
- func (c *DeliverySecurityColl) EnsureIndex(ctx context.Context) error
- func (c *DeliverySecurityColl) Find(args *DeliverySecurityArgs) ([]*models.DeliverySecurity, error)
- func (c *DeliverySecurityColl) FindStatistics(imageID string) (map[string]int, error)
- func (c *DeliverySecurityColl) GetCollectionName() string
- func (c *DeliverySecurityColl) Insert(args *models.DeliverySecurity) error
- type DeliveryTestArgs
- type DeliveryTestColl
- func (c *DeliveryTestColl) Delete(releaseID string) error
- func (c *DeliveryTestColl) EnsureIndex(ctx context.Context) error
- func (c *DeliveryTestColl) Find(args *DeliveryTestArgs) ([]*models.DeliveryTest, error)
- func (c *DeliveryTestColl) GetCollectionName() string
- func (c *DeliveryTestColl) Insert(args *models.DeliveryTest) error
- type DeliveryVersionArgs
- type DeliveryVersionColl
- func (c *DeliveryVersionColl) Delete(id string) error
- func (c *DeliveryVersionColl) EnsureIndex(ctx context.Context) error
- func (c *DeliveryVersionColl) Find(args *DeliveryVersionArgs) ([]*models.DeliveryVersion, error)
- func (c *DeliveryVersionColl) FindProducts(orgID int) ([]string, error)
- func (c *DeliveryVersionColl) Get(args *DeliveryVersionArgs) (*models.DeliveryVersion, error)
- func (c *DeliveryVersionColl) GetCollectionName() string
- func (c *DeliveryVersionColl) Insert(args *models.DeliveryVersion) error
- func (c *DeliveryVersionColl) ListDeliveryVersions(productName string, orgID int) ([]*models.DeliveryVersion, error)
- func (c *DeliveryVersionColl) Update(args *models.DeliveryVersion) error
- type DeployDailyItem
- type DeployDailyPipeResp
- type DeployFailurePipeInfo
- type DeployFailurePipeResp
- type DeployPipeInfo
- type DeployPipeResp
- type DeployStatColl
- func (c *DeployStatColl) Create(args *models.DeployStat) error
- func (c *DeployStatColl) EnsureIndex(ctx context.Context) error
- func (c *DeployStatColl) FindCount() (int, error)
- func (c *DeployStatColl) Get(args *DeployStatGetOption) (*models.DeployStat, error)
- func (c *DeployStatColl) GetCollectionName() string
- func (c *DeployStatColl) GetDeployDailyTotal(args *DeployStatOption) ([]*DeployDailyItem, error)
- func (c *DeployStatColl) GetDeployTotalAndSuccess() ([]*DeployTotalItem, error)
- func (c *DeployStatColl) ListDeployStat(option *DeployStatOption) ([]*models.DeployStat, error)
- func (c *DeployStatColl) Update(args *models.DeployStat) error
- type DeployStatGetOption
- type DeployStatOption
- type DeployTotalItem
- type DeployTotalPipeResp
- type DiffNoteColl
- func (c *DiffNoteColl) Create(args *models.DiffNote) error
- func (c *DiffNoteColl) EnsureIndex(ctx context.Context) error
- func (c *DiffNoteColl) Find(opt *DiffNoteFindOpt) (*models.DiffNote, error)
- func (c *DiffNoteColl) GetCollectionName() string
- func (c *DiffNoteColl) Update(id, commitID, body string, resolved bool) error
- type DiffNoteFindOpt
- type DindCleanColl
- type FavoriteArgs
- type FavoriteColl
- func (c *FavoriteColl) Create(args *models.Favorite) error
- func (c *FavoriteColl) Delete(args *FavoriteArgs) error
- func (c *FavoriteColl) EnsureIndex(ctx context.Context) error
- func (c *FavoriteColl) Find(userID int, name, Type string) (*models.Favorite, error)
- func (c *FavoriteColl) GetCollectionName() string
- func (c *FavoriteColl) List(args *FavoriteArgs) ([]*models.Favorite, error)
- type FindRegOps
- type GithubAppColl
- func (c *GithubAppColl) Create(args *models.GithubApp) error
- func (c *GithubAppColl) Delete(id string) error
- func (c *GithubAppColl) EnsureIndex(ctx context.Context) error
- func (c *GithubAppColl) Find() ([]*models.GithubApp, error)
- func (c *GithubAppColl) GetCollectionName() string
- func (c *GithubAppColl) Upsert(args *models.GithubApp) error
- type HelmRepoColl
- func (c *HelmRepoColl) Create(args *models.HelmRepo) error
- func (c *HelmRepoColl) Delete(id string) error
- func (c *HelmRepoColl) EnsureIndex(ctx context.Context) error
- func (c *HelmRepoColl) GetCollectionName() string
- func (c *HelmRepoColl) List() ([]*models.HelmRepo, error)
- func (c *HelmRepoColl) Update(id string, args *models.HelmRepo) error
- type InstallColl
- func (c *InstallColl) Create(args *models.Install) error
- func (c *InstallColl) Delete(name, version string) error
- func (c *InstallColl) EnsureIndex(ctx context.Context) error
- func (c *InstallColl) Find(name, version string) (*models.Install, error)
- func (c *InstallColl) GetCollectionName() string
- func (c *InstallColl) InitInstallData(installInfoPreset map[string]*models.Install) error
- func (c *InstallColl) List() ([]*models.Install, error)
- func (c *InstallColl) Update(name, version string, args *models.Install) error
- func (c *InstallColl) UpdateSystemDefault(name, version string, installInfoPreset map[string]*models.Install) error
- type ItReportColl
- type JenkinsIntegrationColl
- func (c *JenkinsIntegrationColl) Create(args *models.JenkinsIntegration) error
- func (c *JenkinsIntegrationColl) Delete(ID string) error
- func (c *JenkinsIntegrationColl) EnsureIndex(ctx context.Context) error
- func (c *JenkinsIntegrationColl) GetCollectionName() string
- func (c *JenkinsIntegrationColl) List() ([]*models.JenkinsIntegration, error)
- func (c *JenkinsIntegrationColl) Update(ID string, args *models.JenkinsIntegration) error
- type K8SClusterColl
- func (c *K8SClusterColl) Create(cluster *models.K8SCluster) error
- func (c *K8SClusterColl) Delete(id string) error
- func (c *K8SClusterColl) EnsureIndex(_ context.Context) error
- func (c *K8SClusterColl) Find(clusterType string) ([]*models.K8SCluster, error)
- func (c *K8SClusterColl) FindByName(name string) (*models.K8SCluster, error)
- func (c *K8SClusterColl) FindConnectedClusters() ([]*models.K8SCluster, error)
- func (c *K8SClusterColl) Get(id string) (*models.K8SCluster, error)
- func (c *K8SClusterColl) GetByToken(token string) (*models.K8SCluster, error)
- func (c *K8SClusterColl) GetCollectionName() string
- func (c *K8SClusterColl) HasDuplicateName(id, name string) (bool, error)
- func (c *K8SClusterColl) Update(cluster *models.K8SCluster) error
- func (c *K8SClusterColl) UpdateConnectState(id string, disconnected bool) error
- func (c *K8SClusterColl) UpdateMutableFields(cluster *models.K8SCluster) error
- func (c *K8SClusterColl) UpdateStatus(cluster *models.K8SCluster) error
- type ListAllTaskOption
- type ListCronjobParam
- type ListQueueOption
- type ListStatsOption
- type ListTaskOption
- type ListTestOption
- type ListWorkflowOption
- type NotificationColl
- func (c *NotificationColl) Create(args *models.Notification) error
- func (c *NotificationColl) EnsureIndex(_ context.Context) error
- func (c *NotificationColl) Find(id string) (*models.Notification, error)
- func (c *NotificationColl) GetCollectionName() string
- func (c *NotificationColl) Upsert(args *models.Notification) error
- type NotifyColl
- func (c *NotifyColl) Create(args *models.Notify) error
- func (c *NotifyColl) DeleteByID(id string) error
- func (c *NotifyColl) DeleteByTime(expireTime int64) error
- func (c *NotifyColl) EnsureIndex(_ context.Context) error
- func (c *NotifyColl) GetCollectionName() string
- func (c *NotifyColl) List(receiver string) ([]*models.Notify, error)
- func (c *NotifyColl) Read(id string) error
- func (c *NotifyColl) Update(id string, args *models.Notify) error
- type OperationLogArgs
- type OperationLogColl
- func (c *OperationLogColl) EnsureIndex(_ context.Context) error
- func (c *OperationLogColl) Find(args *OperationLogArgs) ([]*models.OperationLog, int, error)
- func (c *OperationLogColl) GetCollectionName() string
- func (c *OperationLogColl) Insert(args *models.OperationLog) error
- func (c *OperationLogColl) Update(id string, status int) error
- type PipelineColl
- func (c *PipelineColl) Delete(name string) error
- func (c *PipelineColl) EnsureIndex(ctx context.Context) error
- func (c *PipelineColl) Find(opt *PipelineFindOption) (*models.Pipeline, error)
- func (c *PipelineColl) GetCollectionName() string
- func (c *PipelineColl) List(opt *PipelineListOption) ([]*models.Pipeline, error)
- func (c *PipelineColl) Rename(oldName, newName string) error
- func (c *PipelineColl) Upsert(args *models.Pipeline) error
- type PipelineFindOption
- type PipelineListOption
- type ProductColl
- func (c *ProductColl) Create(args *models.Product) error
- func (c *ProductColl) Delete(owner, productName string) error
- func (c *ProductColl) EnsureIndex(ctx context.Context) error
- func (c *ProductColl) Find(opt *ProductFindOptions) (*models.Product, error)
- func (c *ProductColl) FindEnv(opt *ProductEnvFindOptions) (*models.Product, error)
- func (c *ProductColl) GetCollectionName() string
- func (c *ProductColl) List(opt *ProductListOptions) ([]*models.Product, error)
- func (c *ProductColl) Update(args *models.Product) error
- func (c *ProductColl) UpdateErrors(owner, productName, errorMsg string) error
- func (c *ProductColl) UpdateGroup(envName, productName string, groupIndex int, group []*models.ProductService) error
- func (c *ProductColl) UpdateIsPublic(envName, productName string, isPublic bool) error
- func (c *ProductColl) UpdateStatus(owner, productName, status string) error
- type ProductEnvFindOptions
- type ProductFindOptions
- type ProductListOptions
- type ProxyArgs
- type ProxyColl
- func (c *ProxyColl) Create(args *models.Proxy) error
- func (c *ProxyColl) Delete(id string) error
- func (c *ProxyColl) EnsureIndex(ctx context.Context) error
- func (c *ProxyColl) Find(id string) (*models.Proxy, error)
- func (c *ProxyColl) GetCollectionName() string
- func (c *ProxyColl) List(args *ProxyArgs) ([]*models.Proxy, error)
- func (c *ProxyColl) Update(id string, args *models.Proxy) error
- type QueueColl
- func (c *QueueColl) Create(args *models.Queue) error
- func (c *QueueColl) Delete(args *models.Queue) error
- func (c *QueueColl) EnsureIndex(ctx context.Context) error
- func (c *QueueColl) GetCollectionName() string
- func (c *QueueColl) List(opt *ListQueueOption) ([]*models.Queue, error)
- func (c *QueueColl) Update(args *models.Queue) error
- func (c *QueueColl) UpdateAgent(taskID int64, pipelineName string, createTime int64, agentID string) error
- type RegistryNamespaceColl
- func (r *RegistryNamespaceColl) Create(args *models.RegistryNamespace) error
- func (r *RegistryNamespaceColl) Delete(id string) error
- func (r *RegistryNamespaceColl) EnsureIndex(ctx context.Context) error
- func (r *RegistryNamespaceColl) Find(opt *FindRegOps) (*models.RegistryNamespace, error)
- func (r *RegistryNamespaceColl) FindAll(opt *FindRegOps) ([]*models.RegistryNamespace, error)
- func (r *RegistryNamespaceColl) GetCollectionName() string
- func (r *RegistryNamespaceColl) List(orgID int, regType string) ([]*models.RegistryNamespace, error)
- func (r *RegistryNamespaceColl) Update(id string, args *models.RegistryNamespace) error
- type RenderSetColl
- func (c *RenderSetColl) Create(args *models.RenderSet) error
- func (c *RenderSetColl) Delete(productName string) error
- func (c *RenderSetColl) EnsureIndex(ctx context.Context) error
- func (c *RenderSetColl) Find(opt *RenderSetFindOption) (*models.RenderSet, error)
- func (c *RenderSetColl) FindRenderSet(opt *RenderSetFindOption) (*models.RenderSet, bool, error)
- func (c *RenderSetColl) GetCollectionName() string
- func (c *RenderSetColl) List(opt *RenderSetListOption) ([]*models.RenderSet, error)
- func (c *RenderSetColl) ListAllRenders() ([]*models.RenderSet, error)
- func (c *RenderSetColl) SetDefault(renderTmplName, productTmplName string) error
- func (c *RenderSetColl) Update(args *models.RenderSet) error
- type RenderSetFindOption
- type RenderSetListOption
- type RenderSetPipeResp
- type S3StorageColl
- func (c *S3StorageColl) Create(args *models.S3Storage) error
- func (c *S3StorageColl) Delete(id string) error
- func (c *S3StorageColl) EnsureIndex(ctx context.Context) error
- func (c *S3StorageColl) Find(id string) (*models.S3Storage, error)
- func (c *S3StorageColl) FindAll() ([]*models.S3Storage, error)
- func (c *S3StorageColl) FindDefault() (*models.S3Storage, error)
- func (c *S3StorageColl) GetCollectionName() string
- func (c *S3StorageColl) GetS3Storage() (*models.S3Storage, error)
- func (c *S3StorageColl) Update(id string, args *models.S3Storage) error
- type ServiceColl
- func (c *ServiceColl) Create(args *models.Service) error
- func (c *ServiceColl) Delete(serviceName, serviceType, productName, status string, revision int64) error
- func (c *ServiceColl) DistinctServices(opt *ServiceListOption) ([]models.ServiceTmplRevision, error)
- func (c *ServiceColl) EnsureIndex(ctx context.Context) error
- func (c *ServiceColl) Find(opt *ServiceFindOption) (*models.Service, error)
- func (c *ServiceColl) GetCollectionName() string
- func (c *ServiceColl) List(opt *ServiceFindOption) ([]*models.Service, error)
- func (c *ServiceColl) ListAllRevisions() ([]*models.Service, error)
- func (c *ServiceColl) ListMaxRevisions() ([]*models.Service, error)
- func (c *ServiceColl) ListMaxRevisionsForServices(serviceNames []string, serviceType string) ([]*models.Service, error)
- func (c *ServiceColl) Update(args *models.Service) error
- func (c *ServiceColl) UpdateStatus(serviceName, serviceType, productName, status string) error
- type ServiceFindOption
- type ServiceListOption
- type StatsColl
- type SubscriptionColl
- func (c *SubscriptionColl) Delete(subscriber string, notifyType int) error
- func (c *SubscriptionColl) EnsureIndex(ctx context.Context) error
- func (c *SubscriptionColl) GetCollectionName() string
- func (c *SubscriptionColl) List(subscriber string) ([]*models.Subscription, error)
- func (c *SubscriptionColl) Update(subscriber string, notifyType int, args *models.Subscription) error
- func (c *SubscriptionColl) Upsert(args *models.Subscription) error
- type TaskColl
- func (c *TaskColl) ArchiveHistoryPipelineTask(pipelineName string, taskType config.PipelineType, remain int) error
- func (c *TaskColl) Count(option *CountTaskOption) (ret int, err error)
- func (c *TaskColl) Create(args *task.Task) error
- func (c *TaskColl) DeleteByPipelineNameAndType(pipelineName string, typeString config.PipelineType) error
- func (c *TaskColl) EnsureIndex(ctx context.Context) error
- func (c *TaskColl) Find(id int64, pipelineName string, typeString config.PipelineType) (*task.Task, error)
- func (c *TaskColl) FindTask(pipelineName string, typeString config.PipelineType) (*task.Task, error)
- func (c *TaskColl) FindTodoTasks() ([]*task.Task, error)
- func (c *TaskColl) GetCollectionName() string
- func (c *TaskColl) InCompletedTasks() ([]*task.Task, error)
- func (c *TaskColl) List(option *ListTaskOption) (ret []*TaskPreview, err error)
- func (c *TaskColl) ListAllTasks(option *ListAllTaskOption) ([]*task.Task, error)
- func (c *TaskColl) ListTasks(option *ListAllTaskOption) ([]*task.Task, error)
- func (c *TaskColl) Rename(oldName, newName string, taskType config.PipelineType) error
- func (c *TaskColl) Update(args *task.Task) error
- func (c *TaskColl) UpdateStatus(taskID int64, pipelineName, userName string, status config.Status) error
- func (c *TaskColl) UpdateUnfinishedTask(args *task.Task) error
- type TaskPreview
- type TestTaskStatColl
- func (c *TestTaskStatColl) Create(args *models.TestTaskStat) error
- func (c *TestTaskStatColl) Delete(name string) error
- func (c *TestTaskStatColl) EnsureIndex(ctx context.Context) error
- func (c *TestTaskStatColl) FindTestTaskStat(option *TestTaskStatOption) (*models.TestTaskStat, error)
- func (c *TestTaskStatColl) GetCollectionName() string
- func (c *TestTaskStatColl) ListTestTask() ([]*models.TestTaskStat, error)
- func (c *TestTaskStatColl) Update(args *models.TestTaskStat) error
- type TestTaskStatOption
- type TestingColl
- func (c *TestingColl) Create(testing *models.Testing) error
- func (c *TestingColl) Delete(name, productName string) error
- func (c *TestingColl) EnsureIndex(ctx context.Context) error
- func (c *TestingColl) Find(name, productName string) (*models.Testing, error)
- func (c *TestingColl) GetCollectionName() string
- func (c *TestingColl) List(opt *ListTestOption) ([]*models.Testing, error)
- func (c *TestingColl) ListWithScheduleEnabled() ([]*models.Testing, error)
- func (c *TestingColl) Update(testing *models.Testing) error
- type WebHookUserColl
- func (c *WebHookUserColl) Create(args *models.WebHookUser) error
- func (c *WebHookUserColl) EnsureIndex(ctx context.Context) error
- func (c *WebHookUserColl) FindWebHookUserCount() (int, error)
- func (c *WebHookUserColl) GetCollectionName() string
- func (c *WebHookUserColl) List() ([]*models.WebHookUser, error)
- func (c *WebHookUserColl) Upsert(args *models.WebHookUser) error
- func (c *WebHookUserColl) UserExists(args *WebHookUserOption) (int, error)
- type WebHookUserOption
- type WorkflowColl
- func (c *WorkflowColl) Create(args *models.Workflow) error
- func (c *WorkflowColl) Delete(name string) error
- func (c *WorkflowColl) EnsureIndex(ctx context.Context) error
- func (c *WorkflowColl) Find(name string) (*models.Workflow, error)
- func (c *WorkflowColl) GetCollectionName() string
- func (c *WorkflowColl) List(opt *ListWorkflowOption) ([]*models.Workflow, error)
- func (c *WorkflowColl) ListByTestName(testName string) ([]*models.Workflow, error)
- func (c *WorkflowColl) ListWithScheduleEnabled() ([]*models.Workflow, error)
- func (c *WorkflowColl) Replace(args *models.Workflow) error
- type WorkflowStatArgs
- type WorkflowStatColl
- func (c *WorkflowStatColl) Create(args *models.WorkflowStat) error
- func (c *WorkflowStatColl) Delete(name, workflowType string) error
- func (c *WorkflowStatColl) EnsureIndex(ctx context.Context) error
- func (c *WorkflowStatColl) FindWorkflowStat(args *WorkflowStatArgs) ([]*models.WorkflowStat, error)
- func (c *WorkflowStatColl) GetCollectionName() string
- func (c *WorkflowStatColl) Upsert(args *models.WorkflowStat) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicImageColl ¶
type BasicImageColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewBasicImageColl ¶
func NewBasicImageColl() *BasicImageColl
func (*BasicImageColl) Create ¶
func (c *BasicImageColl) Create(args *models.BasicImage) error
func (*BasicImageColl) Delete ¶
func (c *BasicImageColl) Delete(id string) error
func (*BasicImageColl) EnsureIndex ¶
func (c *BasicImageColl) EnsureIndex(ctx context.Context) error
func (*BasicImageColl) Find ¶
func (c *BasicImageColl) Find(id string) (*models.BasicImage, error)
func (*BasicImageColl) GetCollectionName ¶
func (c *BasicImageColl) GetCollectionName() string
func (*BasicImageColl) InitBasicImageData ¶
func (c *BasicImageColl) InitBasicImageData(basicImageInfos []*models.BasicImage)
func (*BasicImageColl) List ¶
func (c *BasicImageColl) List(opt *BasicImageOpt) ([]*models.BasicImage, error)
func (*BasicImageColl) Update ¶
func (c *BasicImageColl) Update(id string, args *models.BasicImage) error
type BasicImageOpt ¶
type BuildColl ¶
type BuildColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewBuildColl ¶
func NewBuildColl() *BuildColl
func (*BuildColl) DistinctTargets ¶
func (c *BuildColl) DistinctTargets(excludeModule []string, productName string) (map[string]bool, error)
DistinctTargets finds modules distinct service templates
func (*BuildColl) GetCollectionName ¶
func (*BuildColl) UpdateBuildParam ¶
func (*BuildColl) UpdateTargets ¶
func (c *BuildColl) UpdateTargets(name, productName string, targets []*models.ServiceModuleTarget) error
type BuildFindOption ¶
type BuildFindOption struct { Name string Version string Targets []string ServiceName string ProductName string }
FindOption ...
type BuildItem ¶
type BuildItem struct { ProductName string `bson:"product_name" json:"product_name"` TotalSuccess int `bson:"total_success" json:"total_success"` TotalFailure int `bson:"total_failure" json:"total_failure"` }
BuildItem ...
type BuildListOption ¶
type BuildPipeResp ¶
type BuildPipeResp struct { ID BuildItem `bson:"_id" json:"_id"` TotalSuccess int `bson:"total_success" json:"total_success"` TotalFailure int `bson:"total_failure" json:"total_failure"` }
BuildPipeResp ...
type BuildStatColl ¶
type BuildStatColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewBuildStatColl ¶
func NewBuildStatColl() *BuildStatColl
func (*BuildStatColl) EnsureIndex ¶
func (c *BuildStatColl) EnsureIndex(ctx context.Context) error
func (*BuildStatColl) FindCount ¶
func (c *BuildStatColl) FindCount() (int, error)
func (*BuildStatColl) GetBuildTotalAndSuccess ¶
func (c *BuildStatColl) GetBuildTotalAndSuccess() ([]*BuildItem, error)
func (*BuildStatColl) GetCollectionName ¶
func (c *BuildStatColl) GetCollectionName() string
func (*BuildStatColl) ListBuildStat ¶
func (c *BuildStatColl) ListBuildStat(option *BuildStatOption) ([]*models.BuildStat, error)
type BuildStatOption ¶
type ConfigColl ¶
type ConfigColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewConfigColl ¶
func NewConfigColl() *ConfigColl
func (*ConfigColl) EnsureIndex ¶
func (c *ConfigColl) EnsureIndex(ctx context.Context) error
func (*ConfigColl) Find ¶
func (c *ConfigColl) Find(opt *ConfigFindOption) (*models.Config, error)
Find 查询特定版本的配置模板 如果 Revision == 0 查询最大版本的配置模板
func (*ConfigColl) GetCollectionName ¶
func (c *ConfigColl) GetCollectionName() string
func (*ConfigColl) ListAllRevisions ¶
func (c *ConfigColl) ListAllRevisions() ([]*models.Config, error)
ListAllRevisions 列出历史所有的service
func (*ConfigColl) ListMaxRevisions ¶
func (c *ConfigColl) ListMaxRevisions(productName string) ([]*models.Config, error)
ListMaxRevisions 查询最新版本的配置模板
type ConfigFindOption ¶
type CountTaskOption ¶
type CountTaskOption struct { PipelineNames []string Status config.TaskStatus Type config.PipelineType }
type CounterColl ¶
type CounterColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewCounterColl ¶
func NewCounterColl() *CounterColl
func (*CounterColl) Delete ¶
func (c *CounterColl) Delete(counterName string) error
func (*CounterColl) EnsureIndex ¶
func (c *CounterColl) EnsureIndex(_ context.Context) error
func (*CounterColl) GetCollectionName ¶
func (c *CounterColl) GetCollectionName() string
func (*CounterColl) GetNextSeq ¶
func (c *CounterColl) GetNextSeq(counterName string) (int64, error)
func (*CounterColl) Rename ¶
func (c *CounterColl) Rename(oldName, newName string) error
func (*CounterColl) SetToNumber ¶
func (c *CounterColl) SetToNumber(counterName string, number int64) error
type CronjobColl ¶
type CronjobColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewCronjobColl ¶
func NewCronjobColl() *CronjobColl
func (*CronjobColl) Delete ¶
func (c *CronjobColl) Delete(param *CronjobDeleteOption) error
func (*CronjobColl) EnsureIndex ¶
func (c *CronjobColl) EnsureIndex(ctx context.Context) error
func (*CronjobColl) GetCollectionName ¶
func (c *CronjobColl) GetCollectionName() string
func (*CronjobColl) List ¶
func (c *CronjobColl) List(param *ListCronjobParam) ([]*models.Cronjob, error)
func (*CronjobColl) ListActiveJob ¶
func (c *CronjobColl) ListActiveJob() ([]*models.Cronjob, error)
type CronjobDeleteOption ¶
type DeliveryActivityArgs ¶
type DeliveryActivityColl ¶
type DeliveryActivityColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliveryActivityColl ¶
func NewDeliveryActivityColl() *DeliveryActivityColl
func (*DeliveryActivityColl) EnsureIndex ¶
func (c *DeliveryActivityColl) EnsureIndex(ctx context.Context) error
func (*DeliveryActivityColl) GetCollectionName ¶
func (c *DeliveryActivityColl) GetCollectionName() string
func (*DeliveryActivityColl) Insert ¶
func (c *DeliveryActivityColl) Insert(args *models.DeliveryActivity) error
func (*DeliveryActivityColl) InsertWithID ¶
func (c *DeliveryActivityColl) InsertWithID(id string, args *models.DeliveryActivity) error
func (*DeliveryActivityColl) List ¶
func (c *DeliveryActivityColl) List(args *DeliveryActivityArgs) ([]*models.DeliveryActivity, int, error)
type DeliveryArtifactArgs ¶
type DeliveryArtifactArgs struct { ID string `json:"id"` Image string `json:"image"` Name string `json:"name"` Type string `json:"type"` RepoName string `json:"repo_name"` Branch string `json:"branch"` Source string `json:"source"` ImageHash string `json:"image_hash"` ImageTag string `json:"image_tag"` ImageDigest string `json:"image_digest"` PerPage int `json:"per_page"` Page int `json:"page"` IsFuzzyQuery bool `json:"is_fuzzy_query"` }
type DeliveryArtifactColl ¶
type DeliveryArtifactColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliveryArtifactColl ¶
func NewDeliveryArtifactColl() *DeliveryArtifactColl
func (*DeliveryArtifactColl) EnsureIndex ¶
func (c *DeliveryArtifactColl) EnsureIndex(ctx context.Context) error
func (*DeliveryArtifactColl) Get ¶
func (c *DeliveryArtifactColl) Get(args *DeliveryArtifactArgs) (*models.DeliveryArtifact, error)
func (*DeliveryArtifactColl) GetCollectionName ¶
func (c *DeliveryArtifactColl) GetCollectionName() string
func (*DeliveryArtifactColl) Insert ¶
func (c *DeliveryArtifactColl) Insert(args *models.DeliveryArtifact) error
func (*DeliveryArtifactColl) List ¶
func (c *DeliveryArtifactColl) List(args *DeliveryArtifactArgs) ([]*models.DeliveryArtifact, int, error)
func (*DeliveryArtifactColl) Update ¶
func (c *DeliveryArtifactColl) Update(args *DeliveryArtifactArgs) error
type DeliveryBuildArgs ¶
type DeliveryBuildColl ¶
type DeliveryBuildColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliveryBuildColl ¶
func NewDeliveryBuildColl() *DeliveryBuildColl
func (*DeliveryBuildColl) Delete ¶
func (c *DeliveryBuildColl) Delete(releaseID string) error
func (*DeliveryBuildColl) EnsureIndex ¶
func (c *DeliveryBuildColl) EnsureIndex(ctx context.Context) error
func (*DeliveryBuildColl) Find ¶
func (c *DeliveryBuildColl) Find(args *DeliveryBuildArgs) ([]*models.DeliveryBuild, error)
func (*DeliveryBuildColl) GetCollectionName ¶
func (c *DeliveryBuildColl) GetCollectionName() string
func (*DeliveryBuildColl) Insert ¶
func (c *DeliveryBuildColl) Insert(args *models.DeliveryBuild) error
type DeliveryDeployArgs ¶
type DeliveryDeployColl ¶
type DeliveryDeployColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliveryDeployColl ¶
func NewDeliveryDeployColl() *DeliveryDeployColl
func (*DeliveryDeployColl) Delete ¶
func (c *DeliveryDeployColl) Delete(releaseID string) error
func (*DeliveryDeployColl) EnsureIndex ¶
func (c *DeliveryDeployColl) EnsureIndex(ctx context.Context) error
func (*DeliveryDeployColl) Find ¶
func (c *DeliveryDeployColl) Find(args *DeliveryDeployArgs) ([]*models.DeliveryDeploy, error)
func (*DeliveryDeployColl) GetCollectionName ¶
func (c *DeliveryDeployColl) GetCollectionName() string
func (*DeliveryDeployColl) Insert ¶
func (c *DeliveryDeployColl) Insert(args *models.DeliveryDeploy) error
type DeliveryDistributeArgs ¶
type DeliveryDistributeArgs struct { ID string `json:"id"` ReleaseID string `json:"releaseId"` ServiceName string `json:"serviceName"` DistributeType config.DistributeType `json:"distributeType"` }
type DeliveryDistributeColl ¶
type DeliveryDistributeColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliveryDistributeColl ¶
func NewDeliveryDistributeColl() *DeliveryDistributeColl
func (*DeliveryDistributeColl) Delete ¶
func (c *DeliveryDistributeColl) Delete(releaseID string) error
func (*DeliveryDistributeColl) EnsureIndex ¶
func (c *DeliveryDistributeColl) EnsureIndex(ctx context.Context) error
func (*DeliveryDistributeColl) Find ¶
func (c *DeliveryDistributeColl) Find(args *DeliveryDistributeArgs) ([]*models.DeliveryDistribute, error)
func (*DeliveryDistributeColl) GetCollectionName ¶
func (c *DeliveryDistributeColl) GetCollectionName() string
func (*DeliveryDistributeColl) Insert ¶
func (c *DeliveryDistributeColl) Insert(args *models.DeliveryDistribute) error
type DeliverySecurityArgs ¶
type DeliverySecurityColl ¶
type DeliverySecurityColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliverySecurityColl ¶
func NewDeliverySecurityColl() *DeliverySecurityColl
func (*DeliverySecurityColl) EnsureIndex ¶
func (c *DeliverySecurityColl) EnsureIndex(ctx context.Context) error
func (*DeliverySecurityColl) Find ¶
func (c *DeliverySecurityColl) Find(args *DeliverySecurityArgs) ([]*models.DeliverySecurity, error)
func (*DeliverySecurityColl) FindStatistics ¶
func (c *DeliverySecurityColl) FindStatistics(imageID string) (map[string]int, error)
func (*DeliverySecurityColl) GetCollectionName ¶
func (c *DeliverySecurityColl) GetCollectionName() string
func (*DeliverySecurityColl) Insert ¶
func (c *DeliverySecurityColl) Insert(args *models.DeliverySecurity) error
type DeliveryTestArgs ¶
type DeliveryTestColl ¶
type DeliveryTestColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliveryTestColl ¶
func NewDeliveryTestColl() *DeliveryTestColl
func (*DeliveryTestColl) Delete ¶
func (c *DeliveryTestColl) Delete(releaseID string) error
func (*DeliveryTestColl) EnsureIndex ¶
func (c *DeliveryTestColl) EnsureIndex(ctx context.Context) error
func (*DeliveryTestColl) Find ¶
func (c *DeliveryTestColl) Find(args *DeliveryTestArgs) ([]*models.DeliveryTest, error)
func (*DeliveryTestColl) GetCollectionName ¶
func (c *DeliveryTestColl) GetCollectionName() string
func (*DeliveryTestColl) Insert ¶
func (c *DeliveryTestColl) Insert(args *models.DeliveryTest) error
type DeliveryVersionArgs ¶
type DeliveryVersionColl ¶
type DeliveryVersionColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeliveryVersionColl ¶
func NewDeliveryVersionColl() *DeliveryVersionColl
func (*DeliveryVersionColl) Delete ¶
func (c *DeliveryVersionColl) Delete(id string) error
func (*DeliveryVersionColl) EnsureIndex ¶
func (c *DeliveryVersionColl) EnsureIndex(ctx context.Context) error
func (*DeliveryVersionColl) Find ¶
func (c *DeliveryVersionColl) Find(args *DeliveryVersionArgs) ([]*models.DeliveryVersion, error)
func (*DeliveryVersionColl) FindProducts ¶
func (c *DeliveryVersionColl) FindProducts(orgID int) ([]string, error)
func (*DeliveryVersionColl) Get ¶
func (c *DeliveryVersionColl) Get(args *DeliveryVersionArgs) (*models.DeliveryVersion, error)
func (*DeliveryVersionColl) GetCollectionName ¶
func (c *DeliveryVersionColl) GetCollectionName() string
func (*DeliveryVersionColl) Insert ¶
func (c *DeliveryVersionColl) Insert(args *models.DeliveryVersion) error
func (*DeliveryVersionColl) ListDeliveryVersions ¶
func (c *DeliveryVersionColl) ListDeliveryVersions(productName string, orgID int) ([]*models.DeliveryVersion, error)
func (*DeliveryVersionColl) Update ¶
func (c *DeliveryVersionColl) Update(args *models.DeliveryVersion) error
type DeployDailyItem ¶
type DeployDailyPipeResp ¶
type DeployDailyPipeResp struct { ID DeployDailyItem `bson:"_id" json:"_id"` TotalSuccess int `bson:"total_deploy_success" json:"total_deploy_success"` TotalFailure int `bson:"total_deploy_failure" json:"total_deploy_failure"` }
type DeployFailurePipeInfo ¶
type DeployFailurePipeResp ¶
type DeployFailurePipeResp struct { ID DeployFailurePipeInfo `bson:"_id" json:"_id"` MaxDeployFailureServiceNum int `bson:"max_deploy_failure_service_num" json:"maxDeployFailureServiceNum"` }
type DeployPipeInfo ¶
type DeployPipeInfo struct {
MaxDeployServiceName string `bson:"max_deploy_service_name" json:"maxDeployServiceName"`
}
type DeployPipeResp ¶
type DeployPipeResp struct { ID DeployPipeInfo `bson:"_id" json:"_id"` MaxDeployServiceNum int `bson:"max_deploy_service_num" json:"maxDeployServiceNum"` }
type DeployStatColl ¶
type DeployStatColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDeployStatColl ¶
func NewDeployStatColl() *DeployStatColl
func (*DeployStatColl) Create ¶
func (c *DeployStatColl) Create(args *models.DeployStat) error
func (*DeployStatColl) EnsureIndex ¶
func (c *DeployStatColl) EnsureIndex(ctx context.Context) error
func (*DeployStatColl) FindCount ¶
func (c *DeployStatColl) FindCount() (int, error)
func (*DeployStatColl) Get ¶
func (c *DeployStatColl) Get(args *DeployStatGetOption) (*models.DeployStat, error)
func (*DeployStatColl) GetCollectionName ¶
func (c *DeployStatColl) GetCollectionName() string
func (*DeployStatColl) GetDeployDailyTotal ¶
func (c *DeployStatColl) GetDeployDailyTotal(args *DeployStatOption) ([]*DeployDailyItem, error)
func (*DeployStatColl) GetDeployTotalAndSuccess ¶
func (c *DeployStatColl) GetDeployTotalAndSuccess() ([]*DeployTotalItem, error)
func (*DeployStatColl) ListDeployStat ¶
func (c *DeployStatColl) ListDeployStat(option *DeployStatOption) ([]*models.DeployStat, error)
func (*DeployStatColl) Update ¶
func (c *DeployStatColl) Update(args *models.DeployStat) error
type DeployStatGetOption ¶
type DeployStatOption ¶
type DeployTotalItem ¶
type DeployTotalPipeResp ¶
type DeployTotalPipeResp struct { ID DeployTotalItem `bson:"_id" json:"_id"` TotalSuccess int `bson:"total_deploy_success" json:"total_deploy_success"` TotalFailure int `bson:"total_deploy_failure" json:"total_deploy_failure"` }
type DiffNoteColl ¶
type DiffNoteColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDiffNoteColl ¶
func NewDiffNoteColl() *DiffNoteColl
func (*DiffNoteColl) EnsureIndex ¶
func (c *DiffNoteColl) EnsureIndex(ctx context.Context) error
func (*DiffNoteColl) Find ¶
func (c *DiffNoteColl) Find(opt *DiffNoteFindOpt) (*models.DiffNote, error)
func (*DiffNoteColl) GetCollectionName ¶
func (c *DiffNoteColl) GetCollectionName() string
type DiffNoteFindOpt ¶
type DindCleanColl ¶
type DindCleanColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewDindCleanColl ¶
func NewDindCleanColl() *DindCleanColl
func (*DindCleanColl) EnsureIndex ¶
func (c *DindCleanColl) EnsureIndex(ctx context.Context) error
func (*DindCleanColl) GetCollectionName ¶
func (c *DindCleanColl) GetCollectionName() string
type FavoriteArgs ¶
type FavoriteColl ¶
type FavoriteColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewFavoriteColl ¶
func NewFavoriteColl() *FavoriteColl
func (*FavoriteColl) Delete ¶
func (c *FavoriteColl) Delete(args *FavoriteArgs) error
func (*FavoriteColl) EnsureIndex ¶
func (c *FavoriteColl) EnsureIndex(ctx context.Context) error
func (*FavoriteColl) GetCollectionName ¶
func (c *FavoriteColl) GetCollectionName() string
func (*FavoriteColl) List ¶
func (c *FavoriteColl) List(args *FavoriteArgs) ([]*models.Favorite, error)
type FindRegOps ¶
type GithubAppColl ¶
type GithubAppColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewGithubAppColl ¶
func NewGithubAppColl() *GithubAppColl
func (*GithubAppColl) Delete ¶
func (c *GithubAppColl) Delete(id string) error
func (*GithubAppColl) EnsureIndex ¶
func (c *GithubAppColl) EnsureIndex(ctx context.Context) error
func (*GithubAppColl) GetCollectionName ¶
func (c *GithubAppColl) GetCollectionName() string
type HelmRepoColl ¶
type HelmRepoColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewHelmRepoColl ¶
func NewHelmRepoColl() *HelmRepoColl
func (*HelmRepoColl) Delete ¶
func (c *HelmRepoColl) Delete(id string) error
func (*HelmRepoColl) EnsureIndex ¶
func (c *HelmRepoColl) EnsureIndex(ctx context.Context) error
func (*HelmRepoColl) GetCollectionName ¶
func (c *HelmRepoColl) GetCollectionName() string
type InstallColl ¶
type InstallColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewInstallColl ¶
func NewInstallColl() *InstallColl
func (*InstallColl) Delete ¶
func (c *InstallColl) Delete(name, version string) error
func (*InstallColl) EnsureIndex ¶
func (c *InstallColl) EnsureIndex(ctx context.Context) error
func (*InstallColl) Find ¶
func (c *InstallColl) Find(name, version string) (*models.Install, error)
func (*InstallColl) GetCollectionName ¶
func (c *InstallColl) GetCollectionName() string
func (*InstallColl) InitInstallData ¶
func (c *InstallColl) InitInstallData(installInfoPreset map[string]*models.Install) error
func (*InstallColl) Update ¶
func (c *InstallColl) Update(name, version string, args *models.Install) error
func (*InstallColl) UpdateSystemDefault ¶
type ItReportColl ¶
type ItReportColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewItReportColl ¶
func NewItReportColl() *ItReportColl
func (*ItReportColl) EnsureIndex ¶
func (c *ItReportColl) EnsureIndex(ctx context.Context) error
func (*ItReportColl) GetCollectionName ¶
func (c *ItReportColl) GetCollectionName() string
type JenkinsIntegrationColl ¶
type JenkinsIntegrationColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewJenkinsIntegrationColl ¶
func NewJenkinsIntegrationColl() *JenkinsIntegrationColl
func (*JenkinsIntegrationColl) Create ¶
func (c *JenkinsIntegrationColl) Create(args *models.JenkinsIntegration) error
func (*JenkinsIntegrationColl) Delete ¶
func (c *JenkinsIntegrationColl) Delete(ID string) error
func (*JenkinsIntegrationColl) EnsureIndex ¶
func (c *JenkinsIntegrationColl) EnsureIndex(ctx context.Context) error
func (*JenkinsIntegrationColl) GetCollectionName ¶
func (c *JenkinsIntegrationColl) GetCollectionName() string
func (*JenkinsIntegrationColl) List ¶
func (c *JenkinsIntegrationColl) List() ([]*models.JenkinsIntegration, error)
func (*JenkinsIntegrationColl) Update ¶
func (c *JenkinsIntegrationColl) Update(ID string, args *models.JenkinsIntegration) error
type K8SClusterColl ¶
type K8SClusterColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewK8SClusterColl ¶
func NewK8SClusterColl() *K8SClusterColl
func (*K8SClusterColl) Create ¶
func (c *K8SClusterColl) Create(cluster *models.K8SCluster) error
func (*K8SClusterColl) Delete ¶
func (c *K8SClusterColl) Delete(id string) error
func (*K8SClusterColl) EnsureIndex ¶
func (c *K8SClusterColl) EnsureIndex(_ context.Context) error
func (*K8SClusterColl) Find ¶
func (c *K8SClusterColl) Find(clusterType string) ([]*models.K8SCluster, error)
func (*K8SClusterColl) FindByName ¶
func (c *K8SClusterColl) FindByName(name string) (*models.K8SCluster, error)
func (*K8SClusterColl) FindConnectedClusters ¶
func (c *K8SClusterColl) FindConnectedClusters() ([]*models.K8SCluster, error)
func (*K8SClusterColl) Get ¶
func (c *K8SClusterColl) Get(id string) (*models.K8SCluster, error)
Get ...
func (*K8SClusterColl) GetByToken ¶
func (c *K8SClusterColl) GetByToken(token string) (*models.K8SCluster, error)
func (*K8SClusterColl) GetCollectionName ¶
func (c *K8SClusterColl) GetCollectionName() string
func (*K8SClusterColl) HasDuplicateName ¶
func (c *K8SClusterColl) HasDuplicateName(id, name string) (bool, error)
func (*K8SClusterColl) Update ¶
func (c *K8SClusterColl) Update(cluster *models.K8SCluster) error
Update ...
func (*K8SClusterColl) UpdateConnectState ¶
func (c *K8SClusterColl) UpdateConnectState(id string, disconnected bool) error
func (*K8SClusterColl) UpdateMutableFields ¶
func (c *K8SClusterColl) UpdateMutableFields(cluster *models.K8SCluster) error
func (*K8SClusterColl) UpdateStatus ¶
func (c *K8SClusterColl) UpdateStatus(cluster *models.K8SCluster) error
type ListAllTaskOption ¶
type ListCronjobParam ¶
type ListQueueOption ¶
type ListStatsOption ¶
type ListTaskOption ¶
type ListTestOption ¶
type ListWorkflowOption ¶
type NotificationColl ¶
type NotificationColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewNotificationColl ¶
func NewNotificationColl() *NotificationColl
func (*NotificationColl) Create ¶
func (c *NotificationColl) Create(args *models.Notification) error
func (*NotificationColl) EnsureIndex ¶
func (c *NotificationColl) EnsureIndex(_ context.Context) error
func (*NotificationColl) Find ¶
func (c *NotificationColl) Find(id string) (*models.Notification, error)
func (*NotificationColl) GetCollectionName ¶
func (c *NotificationColl) GetCollectionName() string
func (*NotificationColl) Upsert ¶
func (c *NotificationColl) Upsert(args *models.Notification) error
type NotifyColl ¶
type NotifyColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewNotifyColl ¶
func NewNotifyColl() *NotifyColl
func (*NotifyColl) DeleteByID ¶
func (c *NotifyColl) DeleteByID(id string) error
func (*NotifyColl) DeleteByTime ¶
func (c *NotifyColl) DeleteByTime(expireTime int64) error
func (*NotifyColl) EnsureIndex ¶
func (c *NotifyColl) EnsureIndex(_ context.Context) error
func (*NotifyColl) GetCollectionName ¶
func (c *NotifyColl) GetCollectionName() string
func (*NotifyColl) Read ¶
func (c *NotifyColl) Read(id string) error
type OperationLogArgs ¶
type OperationLogColl ¶
type OperationLogColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewOperationLogColl ¶
func NewOperationLogColl() *OperationLogColl
func (*OperationLogColl) EnsureIndex ¶
func (c *OperationLogColl) EnsureIndex(_ context.Context) error
func (*OperationLogColl) Find ¶
func (c *OperationLogColl) Find(args *OperationLogArgs) ([]*models.OperationLog, int, error)
func (*OperationLogColl) GetCollectionName ¶
func (c *OperationLogColl) GetCollectionName() string
func (*OperationLogColl) Insert ¶
func (c *OperationLogColl) Insert(args *models.OperationLog) error
type PipelineColl ¶
type PipelineColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewPipelineColl ¶
func NewPipelineColl() *PipelineColl
func (*PipelineColl) Delete ¶
func (c *PipelineColl) Delete(name string) error
func (*PipelineColl) EnsureIndex ¶
func (c *PipelineColl) EnsureIndex(ctx context.Context) error
func (*PipelineColl) Find ¶
func (c *PipelineColl) Find(opt *PipelineFindOption) (*models.Pipeline, error)
func (*PipelineColl) GetCollectionName ¶
func (c *PipelineColl) GetCollectionName() string
func (*PipelineColl) List ¶
func (c *PipelineColl) List(opt *PipelineListOption) ([]*models.Pipeline, error)
func (*PipelineColl) Rename ¶
func (c *PipelineColl) Rename(oldName, newName string) error
type PipelineFindOption ¶
type PipelineListOption ¶
type ProductColl ¶
type ProductColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewProductColl ¶
func NewProductColl() *ProductColl
func (*ProductColl) Delete ¶
func (c *ProductColl) Delete(owner, productName string) error
func (*ProductColl) EnsureIndex ¶
func (c *ProductColl) EnsureIndex(ctx context.Context) error
func (*ProductColl) Find ¶
func (c *ProductColl) Find(opt *ProductFindOptions) (*models.Product, error)
func (*ProductColl) FindEnv ¶
func (c *ProductColl) FindEnv(opt *ProductEnvFindOptions) (*models.Product, error)
func (*ProductColl) GetCollectionName ¶
func (c *ProductColl) GetCollectionName() string
func (*ProductColl) List ¶
func (c *ProductColl) List(opt *ProductListOptions) ([]*models.Product, error)
func (*ProductColl) Update ¶
func (c *ProductColl) Update(args *models.Product) error
Update Cannot update owner & product name
func (*ProductColl) UpdateErrors ¶
func (c *ProductColl) UpdateErrors(owner, productName, errorMsg string) error
func (*ProductColl) UpdateGroup ¶
func (c *ProductColl) UpdateGroup(envName, productName string, groupIndex int, group []*models.ProductService) error
func (*ProductColl) UpdateIsPublic ¶
func (c *ProductColl) UpdateIsPublic(envName, productName string, isPublic bool) error
func (*ProductColl) UpdateStatus ¶
func (c *ProductColl) UpdateStatus(owner, productName, status string) error
type ProductEnvFindOptions ¶
type ProductFindOptions ¶
type ProductListOptions ¶
type ProductListOptions struct { EnvName string Name string IsPublic bool ClusterID string IsSort bool ExcludeStatus string ExcludeSource string Source string }
ClusterId is a primitive.ObjectID{}.Hex()
type ProxyColl ¶
type ProxyColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewProxyColl ¶
func NewProxyColl() *ProxyColl
func (*ProxyColl) GetCollectionName ¶
type QueueColl ¶
type QueueColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewQueueColl ¶
func NewQueueColl() *QueueColl
func (*QueueColl) GetCollectionName ¶
type RegistryNamespaceColl ¶
type RegistryNamespaceColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewRegistryNamespaceColl ¶
func NewRegistryNamespaceColl() *RegistryNamespaceColl
func (*RegistryNamespaceColl) Create ¶
func (r *RegistryNamespaceColl) Create(args *models.RegistryNamespace) error
func (*RegistryNamespaceColl) Delete ¶
func (r *RegistryNamespaceColl) Delete(id string) error
func (*RegistryNamespaceColl) EnsureIndex ¶
func (r *RegistryNamespaceColl) EnsureIndex(ctx context.Context) error
func (*RegistryNamespaceColl) Find ¶
func (r *RegistryNamespaceColl) Find(opt *FindRegOps) (*models.RegistryNamespace, error)
func (*RegistryNamespaceColl) FindAll ¶
func (r *RegistryNamespaceColl) FindAll(opt *FindRegOps) ([]*models.RegistryNamespace, error)
func (*RegistryNamespaceColl) GetCollectionName ¶
func (r *RegistryNamespaceColl) GetCollectionName() string
func (*RegistryNamespaceColl) List ¶
func (r *RegistryNamespaceColl) List(orgID int, regType string) ([]*models.RegistryNamespace, error)
func (*RegistryNamespaceColl) Update ¶
func (r *RegistryNamespaceColl) Update(id string, args *models.RegistryNamespace) error
type RenderSetColl ¶
type RenderSetColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewRenderSetColl ¶
func NewRenderSetColl() *RenderSetColl
func (*RenderSetColl) Delete ¶
func (c *RenderSetColl) Delete(productName string) error
Delete 根据项目名称删除renderset
func (*RenderSetColl) EnsureIndex ¶
func (c *RenderSetColl) EnsureIndex(ctx context.Context) error
func (*RenderSetColl) Find ¶
func (c *RenderSetColl) Find(opt *RenderSetFindOption) (*models.RenderSet, error)
func (*RenderSetColl) FindRenderSet ¶
func (c *RenderSetColl) FindRenderSet(opt *RenderSetFindOption) (*models.RenderSet, bool, error)
func (*RenderSetColl) GetCollectionName ¶
func (c *RenderSetColl) GetCollectionName() string
func (*RenderSetColl) List ¶
func (c *RenderSetColl) List(opt *RenderSetListOption) ([]*models.RenderSet, error)
func (*RenderSetColl) ListAllRenders ¶
func (c *RenderSetColl) ListAllRenders() ([]*models.RenderSet, error)
func (*RenderSetColl) SetDefault ¶
func (c *RenderSetColl) SetDefault(renderTmplName, productTmplName string) error
type RenderSetFindOption ¶
type RenderSetFindOption struct { // if Revision == 0 then search max revision of RenderSet Revision int64 Name string }
RenderSetFindOption ...
type RenderSetListOption ¶
type RenderSetPipeResp ¶
type S3StorageColl ¶
type S3StorageColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewS3StorageColl ¶
func NewS3StorageColl() *S3StorageColl
func (*S3StorageColl) Create ¶
func (c *S3StorageColl) Create(args *models.S3Storage) error
Create if the crated storage is default, all other default storage will be set as not default
func (*S3StorageColl) Delete ¶
func (c *S3StorageColl) Delete(id string) error
func (*S3StorageColl) EnsureIndex ¶
func (c *S3StorageColl) EnsureIndex(ctx context.Context) error
func (*S3StorageColl) FindDefault ¶
func (c *S3StorageColl) FindDefault() (*models.S3Storage, error)
func (*S3StorageColl) GetCollectionName ¶
func (c *S3StorageColl) GetCollectionName() string
func (*S3StorageColl) GetS3Storage ¶
func (c *S3StorageColl) GetS3Storage() (*models.S3Storage, error)
type ServiceColl ¶
type ServiceColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewServiceColl ¶
func NewServiceColl() *ServiceColl
func (*ServiceColl) Delete ¶
func (c *ServiceColl) Delete(serviceName, serviceType, productName, status string, revision int64) error
func (*ServiceColl) DistinctServices ¶
func (c *ServiceColl) DistinctServices(opt *ServiceListOption) ([]models.ServiceTmplRevision, error)
DistinctServices returns distinct service templates with service_name + type Could be filtered with team, "all" means all teams
func (*ServiceColl) EnsureIndex ¶
func (c *ServiceColl) EnsureIndex(ctx context.Context) error
func (*ServiceColl) Find ¶
func (c *ServiceColl) Find(opt *ServiceFindOption) (*models.Service, error)
Find 根据service_name和type查询特定版本的配置模板 如果 Revision == 0 查询最大版本的配置模板
func (*ServiceColl) GetCollectionName ¶
func (c *ServiceColl) GetCollectionName() string
func (*ServiceColl) List ¶
func (c *ServiceColl) List(opt *ServiceFindOption) ([]*models.Service, error)
func (*ServiceColl) ListAllRevisions ¶
func (c *ServiceColl) ListAllRevisions() ([]*models.Service, error)
ListAllRevisions 列出历史所有的service TODO 返回k8s所有service
func (*ServiceColl) ListMaxRevisions ¶
func (c *ServiceColl) ListMaxRevisions() ([]*models.Service, error)
func (*ServiceColl) ListMaxRevisionsForServices ¶
func (*ServiceColl) UpdateStatus ¶
func (c *ServiceColl) UpdateStatus(serviceName, serviceType, productName, status string) error
type ServiceFindOption ¶
type ServiceFindOption struct { ServiceName string Revision int64 Type string Source string ProductName string ExcludeStatus string CodehostID int RepoName string BranchName string }
ServiceFindOption ...
type ServiceListOption ¶
type StatsColl ¶
type StatsColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewStatsColl ¶
func NewStatsColl() *StatsColl
func (*StatsColl) GetCollectionName ¶
type SubscriptionColl ¶
type SubscriptionColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewSubscriptionColl ¶
func NewSubscriptionColl() *SubscriptionColl
func (*SubscriptionColl) Delete ¶
func (c *SubscriptionColl) Delete(subscriber string, notifyType int) error
func (*SubscriptionColl) EnsureIndex ¶
func (c *SubscriptionColl) EnsureIndex(ctx context.Context) error
func (*SubscriptionColl) GetCollectionName ¶
func (c *SubscriptionColl) GetCollectionName() string
func (*SubscriptionColl) List ¶
func (c *SubscriptionColl) List(subscriber string) ([]*models.Subscription, error)
func (*SubscriptionColl) Update ¶
func (c *SubscriptionColl) Update(subscriber string, notifyType int, args *models.Subscription) error
func (*SubscriptionColl) Upsert ¶
func (c *SubscriptionColl) Upsert(args *models.Subscription) error
type TaskColl ¶
type TaskColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewTaskColl ¶
func NewTaskColl() *TaskColl
func (*TaskColl) ArchiveHistoryPipelineTask ¶
func (*TaskColl) DeleteByPipelineNameAndType ¶
func (c *TaskColl) DeleteByPipelineNameAndType(pipelineName string, typeString config.PipelineType) error
func (*TaskColl) GetCollectionName ¶
func (*TaskColl) List ¶
func (c *TaskColl) List(option *ListTaskOption) (ret []*TaskPreview, err error)
func (*TaskColl) ListAllTasks ¶
func (c *TaskColl) ListAllTasks(option *ListAllTaskOption) ([]*task.Task, error)
func (*TaskColl) ListTasks ¶
func (c *TaskColl) ListTasks(option *ListAllTaskOption) ([]*task.Task, error)
func (*TaskColl) Rename ¶
func (c *TaskColl) Rename(oldName, newName string, taskType config.PipelineType) error
func (*TaskColl) UpdateStatus ¶
type TaskPreview ¶
type TaskPreview struct { TaskID int64 `bson:"task_id" json:"task_id"` TaskCreator string `bson:"task_creator" json:"task_creator"` ProductName string `bson:"product_name" json:"product_name"` PipelineName string `bson:"pipeline_name" json:"pipeline_name"` Namespace string `bson:"namespace" json:"namespace"` ServiceName string `bson:"service_name" json:"service_name"` Status config.Status `bson:"status" json:"status"` CreateTime int64 `bson:"create_time" json:"create_time,omitempty"` StartTime int64 `bson:"start_time" json:"start_time,omitempty"` EndTime int64 `bson:"end_time" json:"end_time,omitempty"` SubTasks []*map[string]interface{} `bson:"sub_tasks,omitempty" json:"sub_tasks,omitempty"` TaskArgs *models.TaskArgs `bson:"task_args" json:"task_args"` WorkflowArgs *models.WorkflowTaskArgs `bson:"workflow_args" json:"workflow_args"` TestReports map[string]interface{} `bson:"test_reports,omitempty" json:"test_reports,omitempty"` Type config.PipelineType `bson:"type" json:"type"` Stages []*models.Stage `bson:"stages" json:"stages,omitempty"` // 服务名称,用于任务列表的展示 BuildServices []string `bson:"-" json:"build_services"` TriggerBy *models.TriggerBy `bson:"trigger_by,omitempty" json:"trigger_by,omitempty"` }
type TestTaskStatColl ¶
type TestTaskStatColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewTestTaskStatColl ¶
func NewTestTaskStatColl() *TestTaskStatColl
func (*TestTaskStatColl) Create ¶
func (c *TestTaskStatColl) Create(args *models.TestTaskStat) error
func (*TestTaskStatColl) Delete ¶
func (c *TestTaskStatColl) Delete(name string) error
func (*TestTaskStatColl) EnsureIndex ¶
func (c *TestTaskStatColl) EnsureIndex(ctx context.Context) error
func (*TestTaskStatColl) FindTestTaskStat ¶
func (c *TestTaskStatColl) FindTestTaskStat(option *TestTaskStatOption) (*models.TestTaskStat, error)
func (*TestTaskStatColl) GetCollectionName ¶
func (c *TestTaskStatColl) GetCollectionName() string
func (*TestTaskStatColl) ListTestTask ¶
func (c *TestTaskStatColl) ListTestTask() ([]*models.TestTaskStat, error)
func (*TestTaskStatColl) Update ¶
func (c *TestTaskStatColl) Update(args *models.TestTaskStat) error
type TestTaskStatOption ¶
type TestTaskStatOption struct {
Name string
}
type TestingColl ¶
type TestingColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewTestingColl ¶
func NewTestingColl() *TestingColl
func (*TestingColl) Delete ¶
func (c *TestingColl) Delete(name, productName string) error
func (*TestingColl) EnsureIndex ¶
func (c *TestingColl) EnsureIndex(ctx context.Context) error
func (*TestingColl) Find ¶
func (c *TestingColl) Find(name, productName string) (*models.Testing, error)
func (*TestingColl) GetCollectionName ¶
func (c *TestingColl) GetCollectionName() string
func (*TestingColl) List ¶
func (c *TestingColl) List(opt *ListTestOption) ([]*models.Testing, error)
func (*TestingColl) ListWithScheduleEnabled ¶
func (c *TestingColl) ListWithScheduleEnabled() ([]*models.Testing, error)
type WebHookUserColl ¶
type WebHookUserColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewWebHookUserColl ¶
func NewWebHookUserColl() *WebHookUserColl
func (*WebHookUserColl) Create ¶
func (c *WebHookUserColl) Create(args *models.WebHookUser) error
func (*WebHookUserColl) EnsureIndex ¶
func (c *WebHookUserColl) EnsureIndex(ctx context.Context) error
func (*WebHookUserColl) FindWebHookUserCount ¶
func (c *WebHookUserColl) FindWebHookUserCount() (int, error)
func (*WebHookUserColl) GetCollectionName ¶
func (c *WebHookUserColl) GetCollectionName() string
func (*WebHookUserColl) List ¶
func (c *WebHookUserColl) List() ([]*models.WebHookUser, error)
func (*WebHookUserColl) Upsert ¶
func (c *WebHookUserColl) Upsert(args *models.WebHookUser) error
func (*WebHookUserColl) UserExists ¶
func (c *WebHookUserColl) UserExists(args *WebHookUserOption) (int, error)
type WebHookUserOption ¶
type WorkflowColl ¶
type WorkflowColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewWorkflowColl ¶
func NewWorkflowColl() *WorkflowColl
func (*WorkflowColl) Delete ¶
func (c *WorkflowColl) Delete(name string) error
func (*WorkflowColl) EnsureIndex ¶
func (c *WorkflowColl) EnsureIndex(ctx context.Context) error
func (*WorkflowColl) GetCollectionName ¶
func (c *WorkflowColl) GetCollectionName() string
func (*WorkflowColl) List ¶
func (c *WorkflowColl) List(opt *ListWorkflowOption) ([]*models.Workflow, error)
func (*WorkflowColl) ListByTestName ¶
func (c *WorkflowColl) ListByTestName(testName string) ([]*models.Workflow, error)
func (*WorkflowColl) ListWithScheduleEnabled ¶
func (c *WorkflowColl) ListWithScheduleEnabled() ([]*models.Workflow, error)
type WorkflowStatArgs ¶
type WorkflowStatColl ¶
type WorkflowStatColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewWorkflowStatColl ¶
func NewWorkflowStatColl() *WorkflowStatColl
func (*WorkflowStatColl) Create ¶
func (c *WorkflowStatColl) Create(args *models.WorkflowStat) error
func (*WorkflowStatColl) Delete ¶
func (c *WorkflowStatColl) Delete(name, workflowType string) error
func (*WorkflowStatColl) EnsureIndex ¶
func (c *WorkflowStatColl) EnsureIndex(ctx context.Context) error
func (*WorkflowStatColl) FindWorkflowStat ¶
func (c *WorkflowStatColl) FindWorkflowStat(args *WorkflowStatArgs) ([]*models.WorkflowStat, error)
func (*WorkflowStatColl) GetCollectionName ¶
func (c *WorkflowStatColl) GetCollectionName() string
func (*WorkflowStatColl) Upsert ¶
func (c *WorkflowStatColl) Upsert(args *models.WorkflowStat) error
Source Files ¶
- basic_images.go
- build.go
- build_stat.go
- config.go
- counter.go
- cronjob.go
- delivery_activity.go
- delivery_artifact.go
- delivery_build.go
- delivery_deploy.go
- delivery_distribute.go
- delivery_security.go
- delivery_testing.go
- delivery_version.go
- deploy_stat.go
- diff_note.go
- dind_clean.go
- favorite_pipeline.go
- github_app.go
- helm_repo.go
- install.go
- it_report.go
- jenkins.go
- k8s_cluster.go
- notification.go
- notify.go
- operation_log.go
- pipeline.go
- product.go
- proxy.go
- queue.go
- registry_namespace.go
- render_set.go
- s3.go
- service.go
- stats.go
- subscription.go
- task.go
- test_task_stat.go
- testing.go
- user_stat.go
- workflow.go
- workflow_stat.go