mongodb

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrNoDocuments added in v1.8.0

func IsErrNoDocuments(err error) bool

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) FindByImageName added in v1.9.9

func (c *BasicImageColl) FindByImageName(name 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 BasicImageOpt struct {
	Value     string `bson:"value"`
	Label     string `bson:"label"`
	ImageFrom string `bson:"image_from"`
	ImageType string `bson:"image_type"`
}

type BuildColl

type BuildColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewBuildColl

func NewBuildColl() *BuildColl

func (*BuildColl) Create

func (c *BuildColl) Create(build *models.Build) error

func (*BuildColl) Delete

func (c *BuildColl) Delete(name, productName string) error

func (*BuildColl) DistinctTargets

func (c *BuildColl) DistinctTargets(excludeModule []string, productName string) (map[string]bool, error)

DistinctTargets finds modules distinct service templates

func (*BuildColl) EnsureIndex

func (c *BuildColl) EnsureIndex(ctx context.Context) error

func (*BuildColl) Find

func (c *BuildColl) Find(opt *BuildFindOption) (*models.Build, error)

func (*BuildColl) GetBuildTemplateReference added in v1.9.9

func (c *BuildColl) GetBuildTemplateReference(templateID string) ([]*models.Build, error)

func (*BuildColl) GetCollectionName

func (c *BuildColl) GetCollectionName() string

func (*BuildColl) GetDockerfileTemplateReference added in v1.6.0

func (c *BuildColl) GetDockerfileTemplateReference(templateID string) ([]*models.Build, error)

func (*BuildColl) List

func (c *BuildColl) List(opt *BuildListOption) ([]*models.Build, error)

func (*BuildColl) ListByCursor added in v1.9.9

func (c *BuildColl) ListByCursor(opt *BuildListOption) (*mongo.Cursor, error)

func (*BuildColl) ListByOptions added in v1.9.9

func (c *BuildColl) ListByOptions(opt *BuildListOption) ([]*models.Build, int64, error)

func (*BuildColl) Update

func (c *BuildColl) Update(build *models.Build) error

func (*BuildColl) UpdateBuildParam

func (c *BuildColl) UpdateBuildParam(name, productName string, params []*models.Parameter) error

func (*BuildColl) UpdateTargets

func (c *BuildColl) UpdateTargets(name, productName string, targets []*models.ServiceModuleTarget) error

type BuildFindOption

type BuildFindOption struct {
	Name        string
	Targets     []string
	ServiceName string
	ProductName string
}

FindOption ...

type BuildListOption

type BuildListOption struct {
	Name         string
	Targets      []string
	ProductName  string
	ServiceName  string
	IsSort       bool
	BuildOS      string
	BasicImageID string
	PrivateKeyID string
	TemplateID   string
	PageNum      int64
	PageSize     int64
}

type BuildStage added in v1.9.9

type BuildStage struct {
	SubTasks map[string]task.Build `bson:"sub_tasks"                    json:"-"`
}

type BuildTemplateColl added in v1.9.9

type BuildTemplateColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewBuildTemplateColl added in v1.9.9

func NewBuildTemplateColl() *BuildTemplateColl

func (*BuildTemplateColl) Create added in v1.9.9

func (c *BuildTemplateColl) Create(obj *models.BuildTemplate) error

func (*BuildTemplateColl) DeleteByID added in v1.9.9

func (c *BuildTemplateColl) DeleteByID(idStr string) error

func (*BuildTemplateColl) DeleteByName added in v1.9.9

func (c *BuildTemplateColl) DeleteByName(name string) error

func (*BuildTemplateColl) EnsureIndex added in v1.9.9

func (c *BuildTemplateColl) EnsureIndex(ctx context.Context) error

func (*BuildTemplateColl) Find added in v1.9.9

func (*BuildTemplateColl) GetCollectionName added in v1.9.9

func (c *BuildTemplateColl) GetCollectionName() string

func (*BuildTemplateColl) List added in v1.9.9

func (c *BuildTemplateColl) List(pageNum, pageSize int) ([]*models.BuildTemplate, int, error)

func (*BuildTemplateColl) ListByCursor added in v1.9.9

func (c *BuildTemplateColl) ListByCursor(opts *ListBuildTemplateOption) (*mongo.Cursor, error)

func (*BuildTemplateColl) Update added in v1.9.9

func (c *BuildTemplateColl) Update(idStr string, obj *models.BuildTemplate) error

type BuildTemplateQueryOption added in v1.9.9

type BuildTemplateQueryOption struct {
	ID   string
	Name string
}

type CallbackFindOption added in v1.8.0

type CallbackFindOption struct {
	TaskID       int64
	PipelineName string
	ProjectName  string
}

type CallbackRequestColl added in v1.8.0

type CallbackRequestColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewCallbackRequestColl added in v1.8.0

func NewCallbackRequestColl() *CallbackRequestColl

func (*CallbackRequestColl) Create added in v1.8.0

func (*CallbackRequestColl) EnsureIndex added in v1.8.0

func (c *CallbackRequestColl) EnsureIndex(ctx context.Context) error

func (*CallbackRequestColl) Find added in v1.8.0

func (*CallbackRequestColl) GetCollectionName added in v1.8.0

func (c *CallbackRequestColl) GetCollectionName() string

type ChartColl added in v1.8.0

type ChartColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewChartColl added in v1.8.0

func NewChartColl() *ChartColl

func (*ChartColl) Create added in v1.8.0

func (c *ChartColl) Create(obj *models.Chart) error

func (*ChartColl) Delete added in v1.8.0

func (c *ChartColl) Delete(name string) error

func (*ChartColl) EnsureIndex added in v1.8.0

func (c *ChartColl) EnsureIndex(ctx context.Context) error

func (*ChartColl) Exist added in v1.8.0

func (c *ChartColl) Exist(name string) bool

func (*ChartColl) Get added in v1.8.0

func (c *ChartColl) Get(name string) (*models.Chart, error)

func (*ChartColl) GetCollectionName added in v1.8.0

func (c *ChartColl) GetCollectionName() string

func (*ChartColl) List added in v1.8.0

func (c *ChartColl) List() ([]*models.Chart, error)

func (*ChartColl) Update added in v1.8.0

func (c *ChartColl) Update(obj *models.Chart) error

type ClusterListOpts added in v1.7.1

type ClusterListOpts struct {
	IDs []string
}

type CodeInfo added in v1.9.9

type CodeInfo struct {
	AuthorName    string `json:"author_name"`
	CommitId      string `json:"commit_id"`
	CommitMessage string `json:"commit_message"`
}

type ConfigOption added in v1.9.9

type ConfigOption struct {
	Type    string `bson:"type"`
	ItemKey string `bson:"item_key"`
}

type ConfigurationManagementColl added in v1.9.9

type ConfigurationManagementColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewConfigurationManagementColl added in v1.9.9

func NewConfigurationManagementColl() *ConfigurationManagementColl

func (*ConfigurationManagementColl) Create added in v1.9.9

func (*ConfigurationManagementColl) DeleteByID added in v1.9.9

func (c *ConfigurationManagementColl) DeleteByID(ctx context.Context, idString string) error

func (*ConfigurationManagementColl) EnsureIndex added in v1.9.9

func (c *ConfigurationManagementColl) EnsureIndex(ctx context.Context) error

func (*ConfigurationManagementColl) GetApolloByID added in v1.9.9

func (c *ConfigurationManagementColl) GetApolloByID(ctx context.Context, idString string) (*models.ApolloConfig, error)

func (*ConfigurationManagementColl) GetByID added in v1.9.9

func (*ConfigurationManagementColl) GetBySystemIdentity added in v1.9.9

func (c *ConfigurationManagementColl) GetBySystemIdentity(systemIdentity string) (*models.ConfigurationManagement, error)

func (*ConfigurationManagementColl) GetCollectionName added in v1.9.9

func (c *ConfigurationManagementColl) GetCollectionName() string

func (*ConfigurationManagementColl) GetNacosByID added in v1.9.9

func (c *ConfigurationManagementColl) GetNacosByID(ctx context.Context, idString string) (*models.NacosConfig, error)

func (*ConfigurationManagementColl) List added in v1.9.9

func (*ConfigurationManagementColl) Update added in v1.9.9

type CountTaskOption

type CountTaskOption struct {
	PipelineNames []string
	Statuses      []string
	Status        config.TaskStatus
	TaskCreators  []string
	Committers    []string
	ServiceModule []string
	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) Find

func (c *CounterColl) Find(name string) (*models.Counter, 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) UpsertCounter added in v1.9.9

func (c *CounterColl) UpsertCounter(counterName string, number int64) error

type CronjobColl

type CronjobColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewCronjobColl

func NewCronjobColl() *CronjobColl

func (*CronjobColl) Create

func (c *CronjobColl) Create(args *models.Cronjob) error

func (*CronjobColl) Delete

func (c *CronjobColl) Delete(param *CronjobDeleteOption) error

func (*CronjobColl) EnsureIndex

func (c *CronjobColl) EnsureIndex(ctx context.Context) error

func (*CronjobColl) GetByID added in v1.9.9

func (c *CronjobColl) GetByID(id primitive.ObjectID) (*models.Cronjob, error)

func (*CronjobColl) GetByName added in v1.9.9

func (c *CronjobColl) GetByName(name, cronType string) (*models.Cronjob, 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)

func (*CronjobColl) Update

func (c *CronjobColl) Update(job *models.Cronjob) error

func (*CronjobColl) Upsert added in v1.9.9

func (c *CronjobColl) Upsert(args *models.Cronjob) error

type CronjobDeleteOption

type CronjobDeleteOption struct {
	IDList     []string
	ParentName string
	ParentType string
}

type DBInstanceColl added in v1.9.9

type DBInstanceColl struct {
	*mongo.Collection
}

func NewDBInstanceColl added in v1.9.9

func NewDBInstanceColl() *DBInstanceColl

func (*DBInstanceColl) Create added in v1.9.9

func (c *DBInstanceColl) Create(args *models.DBInstance) error

func (*DBInstanceColl) Delete added in v1.9.9

func (c *DBInstanceColl) Delete(id string) error

func (*DBInstanceColl) EnsureIndex added in v1.9.9

func (c *DBInstanceColl) EnsureIndex(ctx context.Context) error

func (*DBInstanceColl) Find added in v1.9.9

func (*DBInstanceColl) GetCollectionName added in v1.9.9

func (c *DBInstanceColl) GetCollectionName() string

func (*DBInstanceColl) List added in v1.9.9

func (c *DBInstanceColl) List() ([]*models.DBInstance, error)

func (*DBInstanceColl) ListByProject added in v1.9.9

func (c *DBInstanceColl) ListByProject(projectName string) ([]*models.DBInstance, error)

func (*DBInstanceColl) Update added in v1.9.9

func (c *DBInstanceColl) Update(id string, args *models.DBInstance) error

type DBInstanceCollFindOption added in v1.9.9

type DBInstanceCollFindOption struct {
	Id   string
	Name string
}

type DashboardConfigColl added in v1.9.9

type DashboardConfigColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewDashboardConfigColl added in v1.9.9

func NewDashboardConfigColl() *DashboardConfigColl

func (*DashboardConfigColl) CreateOrUpdate added in v1.9.9

func (c *DashboardConfigColl) CreateOrUpdate(args *models.DashboardConfig) error

func (*DashboardConfigColl) EnsureIndex added in v1.9.9

func (c *DashboardConfigColl) EnsureIndex(ctx context.Context) error

func (*DashboardConfigColl) GetByUser added in v1.9.9

func (c *DashboardConfigColl) GetByUser(userName, userID string) (*models.DashboardConfig, error)

func (*DashboardConfigColl) GetCollectionName added in v1.9.9

func (c *DashboardConfigColl) GetCollectionName() string

type DeleteEnvSvcDependOption added in v1.9.9

type DeleteEnvSvcDependOption struct {
	Id            string
	CreateTime    string
	ProductName   string
	Namespace     string
	EnvName       string
	ServiceName   string
	ServiceModule string
}

type DeliveryActivityArgs

type DeliveryActivityArgs struct {
	ArtifactID string `json:"artifact_id"`
	RepoName   string `json:"repo_name"`
	Branch     string `json:"branch"`
	PerPage    int    `json:"per_page"`
	Page       int    `json:"page"`
}

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 (*DeliveryActivityColl) InsertWithID

func (c *DeliveryActivityColl) InsertWithID(id string, args *models.DeliveryActivity) error

func (*DeliveryActivityColl) List

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"`
	OnlyCount         bool   `json:"only_count"`
	PackageStorageURI string `json:"package_storage_uri"`
}

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 (*DeliveryArtifactColl) GetCollectionName

func (c *DeliveryArtifactColl) GetCollectionName() string

func (*DeliveryArtifactColl) Insert

func (*DeliveryArtifactColl) List

func (*DeliveryArtifactColl) ListTars added in v1.6.0

func (*DeliveryArtifactColl) Update

type DeliveryBuildArgs

type DeliveryBuildArgs struct {
	ID          string `json:"id"`
	ReleaseID   string `json:"releaseId"`
	ServiceName string `json:"serviceName"`
}

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 (*DeliveryBuildColl) GetCollectionName

func (c *DeliveryBuildColl) GetCollectionName() string

func (*DeliveryBuildColl) Insert

func (c *DeliveryBuildColl) Insert(args *models.DeliveryBuild) error

type DeliveryDeployArgs

type DeliveryDeployArgs struct {
	ID          string `json:"id"`
	ReleaseID   string `json:"releaseId"`
	ServiceName string `json:"serviceName"`
}

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 (*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"`
	ChartName      string                `json:"chartName"`
	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 (*DeliveryDistributeColl) GetCollectionName

func (c *DeliveryDistributeColl) GetCollectionName() string

func (*DeliveryDistributeColl) Insert

type DeliverySecurityArgs

type DeliverySecurityArgs struct {
	ID        string `json:"id"`
	ImageID   string `json:"imageId"`
	ImageName string `json:"imageName"`
	Severity  string `json:"severity"`
}

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 (*DeliverySecurityColl) FindStatistics

func (c *DeliverySecurityColl) FindStatistics(imageID string) (map[string]int, error)

func (*DeliverySecurityColl) GetCollectionName

func (c *DeliverySecurityColl) GetCollectionName() string

func (*DeliverySecurityColl) Insert

type DeliveryTestArgs

type DeliveryTestArgs struct {
	ID        string `json:"id"`
	ReleaseID string `json:"releaseId"`
}

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 (*DeliveryTestColl) GetCollectionName

func (c *DeliveryTestColl) GetCollectionName() string

func (*DeliveryTestColl) Insert

func (c *DeliveryTestColl) Insert(args *models.DeliveryTest) error

type DeliveryVersionArgs

type DeliveryVersionArgs struct {
	ID           string `json:"id"`
	ProductName  string `json:"productName"`
	Version      string `json:"version"`
	WorkflowName string `json:"workflowName"`
	TaskID       int    `json:"taskId"`
	PerPage      int    `json:"perPage"`
	Page         int    `json:"page"`
}

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 (*DeliveryVersionColl) FindProducts

func (c *DeliveryVersionColl) FindProducts() ([]string, error)

func (*DeliveryVersionColl) Get

func (*DeliveryVersionColl) GetCollectionName

func (c *DeliveryVersionColl) GetCollectionName() string

func (*DeliveryVersionColl) Insert

func (*DeliveryVersionColl) ListDeliveryVersions

func (c *DeliveryVersionColl) ListDeliveryVersions(productName string) ([]*models.DeliveryVersion, error)

func (*DeliveryVersionColl) Update

func (*DeliveryVersionColl) UpdateStatusByName added in v1.8.0

func (c *DeliveryVersionColl) UpdateStatusByName(versionName, projectName, status, errorStr string) error

func (*DeliveryVersionColl) UpdateTaskID added in v1.8.0

func (c *DeliveryVersionColl) UpdateTaskID(versionName, projectName string, taskID int32) error

type DiffNoteColl

type DiffNoteColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewDiffNoteColl

func NewDiffNoteColl() *DiffNoteColl

func (*DiffNoteColl) Create

func (c *DiffNoteColl) Create(args *models.DiffNote) error

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

func (*DiffNoteColl) Update

func (c *DiffNoteColl) Update(id, commitID, body string, resolved bool) error

type DiffNoteFindOpt

type DiffNoteFindOpt struct {
	CodehostID     int
	ProjectID      string
	MergeRequestID int
}

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

func (*DindCleanColl) List

func (c *DindCleanColl) List() ([]*models.DindClean, error)

func (*DindCleanColl) UpdateStatusInfo added in v1.9.9

func (c *DindCleanColl) UpdateStatusInfo(args *models.DindClean) error

func (*DindCleanColl) Upsert

func (c *DindCleanColl) Upsert(args *models.DindClean) error

type DockerfileTemplateColl added in v1.8.0

type DockerfileTemplateColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewDockerfileTemplateColl added in v1.8.0

func NewDockerfileTemplateColl() *DockerfileTemplateColl

func (*DockerfileTemplateColl) Create added in v1.8.0

func (*DockerfileTemplateColl) DeleteByID added in v1.8.0

func (c *DockerfileTemplateColl) DeleteByID(idstring string) error

func (*DockerfileTemplateColl) EnsureIndex added in v1.8.0

func (c *DockerfileTemplateColl) EnsureIndex(ctx context.Context) error

func (*DockerfileTemplateColl) GetById added in v1.8.0

func (c *DockerfileTemplateColl) GetById(idstring string) (*models.DockerfileTemplate, error)

func (*DockerfileTemplateColl) GetByName added in v1.9.9

func (*DockerfileTemplateColl) GetCollectionName added in v1.8.0

func (c *DockerfileTemplateColl) GetCollectionName() string

func (*DockerfileTemplateColl) List added in v1.8.0

func (c *DockerfileTemplateColl) List(pageNum, pageSize int) ([]*models.DockerfileTemplate, int, error)

func (*DockerfileTemplateColl) Update added in v1.8.0

func (c *DockerfileTemplateColl) Update(idString string, obj *models.DockerfileTemplate) error

type EnvResourceAggregateData added in v1.9.9

type EnvResourceAggregateData struct {
	ID         EnvResourceBaseData `bson:"_id"`
	CreateTime int64               `bson:"create_time"`
}

type EnvResourceBaseData added in v1.9.9

type EnvResourceBaseData struct {
	ProductName string `bson:"product_name"`
	EnvName     string `bson:"env_name"`
	Name        string `bson:"name"`
	Type        string `bson:"type"`
}

type EnvResourceColl added in v1.9.9

type EnvResourceColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewEnvResourceColl added in v1.9.9

func NewEnvResourceColl() *EnvResourceColl

func (*EnvResourceColl) Create added in v1.9.9

func (c *EnvResourceColl) Create(args *models.EnvResource) error

func (*EnvResourceColl) Delete added in v1.9.9

func (c *EnvResourceColl) Delete(oid primitive.ObjectID) error

func (*EnvResourceColl) EnsureIndex added in v1.9.9

func (c *EnvResourceColl) EnsureIndex(ctx context.Context) error

func (*EnvResourceColl) Find added in v1.9.9

func (*EnvResourceColl) GetCollectionName added in v1.9.9

func (c *EnvResourceColl) GetCollectionName() string

func (*EnvResourceColl) List added in v1.9.9

func (*EnvResourceColl) ListLatestResource added in v1.9.9

func (c *EnvResourceColl) ListLatestResource(opt *QueryEnvResourceOption) ([]*EnvResourceAggregateData, error)

type EnvSvcDependColl added in v1.9.9

type EnvSvcDependColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewEnvSvcDependColl added in v1.9.9

func NewEnvSvcDependColl() *EnvSvcDependColl

func (*EnvSvcDependColl) Create added in v1.9.9

func (c *EnvSvcDependColl) Create(args *models.EnvSvcDepend) error

func (*EnvSvcDependColl) CreateOrUpdate added in v1.9.9

func (c *EnvSvcDependColl) CreateOrUpdate(envSvcDepend *models.EnvSvcDepend) error

func (*EnvSvcDependColl) Delete added in v1.9.9

func (*EnvSvcDependColl) EnsureIndex added in v1.9.9

func (c *EnvSvcDependColl) EnsureIndex(ctx context.Context) error

func (*EnvSvcDependColl) Find added in v1.9.9

func (*EnvSvcDependColl) GetCollectionName added in v1.9.9

func (c *EnvSvcDependColl) GetCollectionName() string

func (*EnvSvcDependColl) List added in v1.9.9

func (*EnvSvcDependColl) Update added in v1.9.9

func (c *EnvSvcDependColl) Update(id string, envSvcDepend *models.EnvSvcDepend) error

type EnvVersionColl added in v1.9.9

type EnvVersionColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewEnvServiceVersionColl added in v1.9.9

func NewEnvServiceVersionColl() *EnvVersionColl

func (*EnvVersionColl) Create added in v1.9.9

func (c *EnvVersionColl) Create(args *models.EnvServiceVersion) error

func (*EnvVersionColl) DeleteRevisions added in v1.9.9

func (c *EnvVersionColl) DeleteRevisions(productName, envName, serviceName string, isHelmChart, production bool, revision int64) error

func (*EnvVersionColl) EnsureIndex added in v1.9.9

func (c *EnvVersionColl) EnsureIndex(ctx context.Context) error

func (*EnvVersionColl) Find added in v1.9.9

func (c *EnvVersionColl) Find(productName, envName, serviceName string, isHelmChart, production bool, revision int64) (*models.EnvServiceVersion, error)

func (*EnvVersionColl) GetCollectionName added in v1.9.9

func (c *EnvVersionColl) GetCollectionName() string

func (*EnvVersionColl) GetCountAndMaxRevision added in v1.9.9

func (c *EnvVersionColl) GetCountAndMaxRevision(productName, envName, serviceName string, isHelmChart, production bool) (int64, int64, error)

func (*EnvVersionColl) ListServiceVersions added in v1.9.9

func (c *EnvVersionColl) ListServiceVersions(productName, envName, serviceName string, isHelmChart, production bool) ([]*models.EnvServiceVersion, error)

type ExternalLinkColl added in v1.7.0

type ExternalLinkColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewExternalLinkColl added in v1.7.0

func NewExternalLinkColl() *ExternalLinkColl

func (*ExternalLinkColl) Create added in v1.7.0

func (c *ExternalLinkColl) Create(args *models.ExternalLink) error

func (*ExternalLinkColl) Delete added in v1.7.0

func (c *ExternalLinkColl) Delete(id string) error

func (*ExternalLinkColl) EnsureIndex added in v1.7.0

func (c *ExternalLinkColl) EnsureIndex(ctx context.Context) error

func (*ExternalLinkColl) GetCollectionName added in v1.7.0

func (c *ExternalLinkColl) GetCollectionName() string

func (*ExternalLinkColl) List added in v1.7.0

func (c *ExternalLinkColl) List() ([]*models.ExternalLink, error)

func (*ExternalLinkColl) Update added in v1.7.0

func (c *ExternalLinkColl) Update(id string, args *models.ExternalLink) error

type ExternalSystemColl added in v1.8.0

type ExternalSystemColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewExternalSystemColl added in v1.8.0

func NewExternalSystemColl() *ExternalSystemColl

func (*ExternalSystemColl) Create added in v1.8.0

func (c *ExternalSystemColl) Create(args *models.ExternalSystem) error

func (*ExternalSystemColl) DeleteByID added in v1.8.0

func (c *ExternalSystemColl) DeleteByID(idstring string) error

func (*ExternalSystemColl) EnsureIndex added in v1.8.0

func (c *ExternalSystemColl) EnsureIndex(ctx context.Context) error

func (*ExternalSystemColl) GetByID added in v1.8.0

func (c *ExternalSystemColl) GetByID(idstring string) (*models.ExternalSystem, error)

func (*ExternalSystemColl) GetCollectionName added in v1.8.0

func (c *ExternalSystemColl) GetCollectionName() string

func (*ExternalSystemColl) List added in v1.8.0

func (c *ExternalSystemColl) List(pageNum, pageSize int64) ([]*models.ExternalSystem, int64, error)

func (*ExternalSystemColl) Update added in v1.8.0

func (c *ExternalSystemColl) Update(idString string, obj *models.ExternalSystem) error

type FavoriteArgs

type FavoriteArgs struct {
	UserID      string
	ProductName string
	Name        string
	Type        string
}

type FavoriteColl

type FavoriteColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewFavoriteColl

func NewFavoriteColl() *FavoriteColl

func (*FavoriteColl) Create

func (c *FavoriteColl) Create(args *models.Favorite) error

func (*FavoriteColl) Delete

func (c *FavoriteColl) Delete(args *FavoriteArgs) error

func (*FavoriteColl) DeleteManyByArgs added in v1.9.9

func (c *FavoriteColl) DeleteManyByArgs(args *FavoriteArgs) error

func (*FavoriteColl) EnsureIndex

func (c *FavoriteColl) EnsureIndex(ctx context.Context) error

func (*FavoriteColl) Find

func (c *FavoriteColl) Find(userID, name, Type string) (*models.Favorite, error)

func (*FavoriteColl) GetCollectionName

func (c *FavoriteColl) GetCollectionName() string

func (*FavoriteColl) List

func (c *FavoriteColl) List(args *FavoriteArgs) ([]*models.Favorite, error)

type FindEnvSvcDependOption added in v1.9.9

type FindEnvSvcDependOption struct {
	Id            string
	CreateTime    string
	ProductName   string
	Namespace     string
	EnvName       string
	ServiceName   string
	ServiceModule string
}

type FindPrivateKeyOption added in v1.4.0

type FindPrivateKeyOption struct {
	ID      string
	Address string
	Token   string
	Labels  []string
	Status  string
}

type FindRegOps

type FindRegOps struct {
	ID          string `json:"id"`
	RegAddr     string `json:"reg_addr"`
	RegType     string `json:"reg_type"`
	RegProvider string `json:"reg_provider"`
	IsDefault   bool   `json:"is_default"`
	Namespace   string `json:"namespace"`
}

type FindTaskOption

type FindTaskOption struct {
	PipelineName string
	Status       config.Status
	Type         config.PipelineType
}

type GithubAppColl

type GithubAppColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewGithubAppColl

func NewGithubAppColl() *GithubAppColl

func (*GithubAppColl) Create

func (c *GithubAppColl) Create(args *models.GithubApp) error

func (*GithubAppColl) Delete

func (c *GithubAppColl) Delete(id string) error

func (*GithubAppColl) EnsureIndex

func (c *GithubAppColl) EnsureIndex(ctx context.Context) error

func (*GithubAppColl) Find

func (c *GithubAppColl) Find() ([]*models.GithubApp, error)

func (*GithubAppColl) GetCollectionName

func (c *GithubAppColl) GetCollectionName() string

func (*GithubAppColl) Upsert

func (c *GithubAppColl) Upsert(args *models.GithubApp) error

type HelmRepoColl

type HelmRepoColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewHelmRepoColl

func NewHelmRepoColl() *HelmRepoColl

func (*HelmRepoColl) Create

func (c *HelmRepoColl) Create(args *models.HelmRepo) error

func (*HelmRepoColl) Delete

func (c *HelmRepoColl) Delete(id string) error

func (*HelmRepoColl) EnsureIndex

func (c *HelmRepoColl) EnsureIndex(ctx context.Context) error

func (*HelmRepoColl) Find added in v1.8.0

func (*HelmRepoColl) GetCollectionName

func (c *HelmRepoColl) GetCollectionName() string

func (*HelmRepoColl) List

func (c *HelmRepoColl) List() ([]*models.HelmRepo, error)

func (*HelmRepoColl) ListByProject added in v1.9.9

func (c *HelmRepoColl) ListByProject(projectName string) ([]*models.HelmRepo, error)

func (*HelmRepoColl) Update

func (c *HelmRepoColl) Update(id string, args *models.HelmRepo) error

type HelmRepoFindOption added in v1.8.0

type HelmRepoFindOption struct {
	Id       string
	RepoName string
}

type IMAppColl added in v1.9.9

type IMAppColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewIMAppColl added in v1.9.9

func NewIMAppColl() *IMAppColl

func (*IMAppColl) Create added in v1.9.9

func (c *IMAppColl) Create(ctx context.Context, args *models.IMApp) (string, error)

func (*IMAppColl) DeleteByID added in v1.9.9

func (c *IMAppColl) DeleteByID(ctx context.Context, idString string) error

func (*IMAppColl) EnsureIndex added in v1.9.9

func (c *IMAppColl) EnsureIndex(ctx context.Context) error

func (*IMAppColl) GetByID added in v1.9.9

func (c *IMAppColl) GetByID(ctx context.Context, idString string) (*models.IMApp, error)

func (*IMAppColl) GetCollectionName added in v1.9.9

func (c *IMAppColl) GetCollectionName() string

func (*IMAppColl) GetDingTalkByAppKey added in v1.9.9

func (c *IMAppColl) GetDingTalkByAppKey(ctx context.Context, appKey string) (*models.IMApp, error)

func (*IMAppColl) GetLarkByAppID added in v1.9.9

func (c *IMAppColl) GetLarkByAppID(ctx context.Context, appID string) (*models.IMApp, error)

func (*IMAppColl) List added in v1.9.9

func (c *IMAppColl) List(ctx context.Context, _type string) ([]*models.IMApp, error)

func (*IMAppColl) Update added in v1.9.9

func (c *IMAppColl) Update(ctx context.Context, idString string, arg *models.IMApp) error

type ImageTagsColl added in v1.9.9

type ImageTagsColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewImageTagsCollColl added in v1.9.9

func NewImageTagsCollColl() *ImageTagsColl

func (*ImageTagsColl) EnsureIndex added in v1.9.9

func (c *ImageTagsColl) EnsureIndex(ctx context.Context) error

func (*ImageTagsColl) Find added in v1.9.9

func (*ImageTagsColl) GetCollectionName added in v1.9.9

func (c *ImageTagsColl) GetCollectionName() string

func (*ImageTagsColl) Insert added in v1.9.9

func (c *ImageTagsColl) Insert(args *models.ImageTags) error

func (*ImageTagsColl) InsertOrUpdate added in v1.9.9

func (c *ImageTagsColl) InsertOrUpdate(args *models.ImageTags) error

type ImageTagsFindOption added in v1.9.9

type ImageTagsFindOption struct {
	RegistryID  string
	RegProvider string
	ImageName   string
	Namespace   string
	TagName     string
}

type InstallColl

type InstallColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewInstallColl

func NewInstallColl() *InstallColl

func (*InstallColl) Create

func (c *InstallColl) Create(args *models.Install) error

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) List

func (c *InstallColl) List() ([]*models.Install, error)

func (*InstallColl) Update

func (c *InstallColl) Update(name, version string, args *models.Install) error

func (*InstallColl) UpdateSystemDefault

func (c *InstallColl) UpdateSystemDefault(name, version string, installInfoPreset map[string]*models.Install) error

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

func (*ItReportColl) Upsert

func (c *ItReportColl) Upsert(args *models.ItReport) error

type JenkinsIntegrationColl

type JenkinsIntegrationColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewJenkinsIntegrationColl

func NewJenkinsIntegrationColl() *JenkinsIntegrationColl

func (*JenkinsIntegrationColl) Create

func (*JenkinsIntegrationColl) Delete

func (c *JenkinsIntegrationColl) Delete(ID string) error

func (*JenkinsIntegrationColl) EnsureIndex

func (c *JenkinsIntegrationColl) EnsureIndex(ctx context.Context) error

func (*JenkinsIntegrationColl) Get added in v1.9.9

func (*JenkinsIntegrationColl) GetCollectionName

func (c *JenkinsIntegrationColl) GetCollectionName() string

func (*JenkinsIntegrationColl) List

func (*JenkinsIntegrationColl) Update

type JobBuildTrendInfos added in v1.9.9

type JobBuildTrendInfos struct {
	ProjectName string            `bson:"_id" json:"product_name"`
	Documents   []*models.JobInfo `bson:"documents" json:"documents"`
}

type JobInfoCoarseGrainedData added in v1.9.9

type JobInfoCoarseGrainedData struct {
	StartTime   int64             `json:"start_time"`
	EndTime     int64             `json:"end_time"`
	MonthlyStat []*MonthlyJobInfo `json:"monthly_stat"`
}

type JobInfoColl added in v1.9.9

type JobInfoColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewJobInfoColl added in v1.9.9

func NewJobInfoColl() *JobInfoColl

func (*JobInfoColl) Create added in v1.9.9

func (c *JobInfoColl) Create(ctx context.Context, args *models.JobInfo) error

func (*JobInfoColl) EnsureIndex added in v1.9.9

func (c *JobInfoColl) EnsureIndex(ctx context.Context) error

func (*JobInfoColl) GetAllProjectNameByTypeName added in v1.9.9

func (c *JobInfoColl) GetAllProjectNameByTypeName(startTime, endTime int64, typeName string) ([]string, error)

func (*JobInfoColl) GetBuildJobs added in v1.9.9

func (c *JobInfoColl) GetBuildJobs(startTime, endTime int64, projectName string) ([]*models.JobInfo, error)

func (*JobInfoColl) GetBuildTrend added in v1.9.9

func (c *JobInfoColl) GetBuildTrend(startTime, endTime int64, projectName []string) ([]*models.JobInfo, error)

func (*JobInfoColl) GetCollectionName added in v1.9.9

func (c *JobInfoColl) GetCollectionName() string

func (*JobInfoColl) GetDeployJobs added in v1.9.9

func (c *JobInfoColl) GetDeployJobs(startTime, endTime int64, projectName string) ([]*models.JobInfo, error)

func (*JobInfoColl) GetDeployTrend added in v1.9.9

func (c *JobInfoColl) GetDeployTrend(startTime, endTime int64, projectName []string) ([]*models.JobInfo, error)

func (*JobInfoColl) GetJobBuildTrendInfos added in v1.9.9

func (c *JobInfoColl) GetJobBuildTrendInfos(startTime, endTime int64, projectName []string) ([]*JobBuildTrendInfos, error)

func (*JobInfoColl) GetJobInfos added in v1.9.9

func (c *JobInfoColl) GetJobInfos(startTime, endTime int64, projectName []string) ([]*models.JobInfo, error)

func (*JobInfoColl) GetProductionDeployJobs added in v1.9.9

func (c *JobInfoColl) GetProductionDeployJobs(startTime, endTime int64, projectName string) ([]*models.JobInfo, error)

func (*JobInfoColl) GetTestJobs added in v1.9.9

func (c *JobInfoColl) GetTestJobs(startTime, endTime int64, projectName string) ([]*models.JobInfo, error)

func (*JobInfoColl) GetTestTrend added in v1.9.9

func (c *JobInfoColl) GetTestTrend(startTime, endTime int64, projectName []string) ([]*models.JobInfo, error)

type K8SClusterColl

type K8SClusterColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewK8SClusterColl

func NewK8SClusterColl() *K8SClusterColl

func (*K8SClusterColl) Count added in v1.9.0

func (c *K8SClusterColl) Count() (int64, error)

func (*K8SClusterColl) Create

func (c *K8SClusterColl) Create(cluster *models.K8SCluster, id string) 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) FindActiveClusters added in v1.9.9

func (c *K8SClusterColl) FindActiveClusters() ([]*models.K8SCluster, error)

func (*K8SClusterColl) FindByID added in v1.9.9

func (c *K8SClusterColl) FindByID(ID 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) List added in v1.7.1

func (c *K8SClusterColl) List(opts *ClusterListOpts) ([]*models.K8SCluster, 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, id string) error

func (*K8SClusterColl) UpdateScheduleStrategy added in v1.9.9

func (c *K8SClusterColl) UpdateScheduleStrategy(cluster *models.K8SCluster) error

func (*K8SClusterColl) UpdateStatus

func (c *K8SClusterColl) UpdateStatus(cluster *models.K8SCluster) error

func (*K8SClusterColl) UpdateUpgradeAgentInfo added in v1.9.9

func (c *K8SClusterColl) UpdateUpgradeAgentInfo(id, updateHubagentErrorMsg string) error

type LLMIntegrationColl added in v1.9.9

type LLMIntegrationColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewLLMIntegrationColl added in v1.9.9

func NewLLMIntegrationColl() *LLMIntegrationColl

func (*LLMIntegrationColl) Count added in v1.9.9

func (c *LLMIntegrationColl) Count(ctx context.Context) (int64, error)

func (*LLMIntegrationColl) Create added in v1.9.9

func (*LLMIntegrationColl) Delete added in v1.9.9

func (c *LLMIntegrationColl) Delete(ctx context.Context, id string) error

func (*LLMIntegrationColl) EnsureIndex added in v1.9.9

func (c *LLMIntegrationColl) EnsureIndex(ctx context.Context) error

func (*LLMIntegrationColl) FindAll added in v1.9.9

func (*LLMIntegrationColl) FindByID added in v1.9.9

func (*LLMIntegrationColl) FindByName added in v1.9.9

func (c *LLMIntegrationColl) FindByName(ctx context.Context, name string) (*models.LLMIntegration, error)

func (*LLMIntegrationColl) GetCollectionName added in v1.9.9

func (c *LLMIntegrationColl) GetCollectionName() string

func (*LLMIntegrationColl) Update added in v1.9.9

type ListAllTaskOption

type ListAllTaskOption struct {
	ProductNames    []string
	ProductName     string
	PipelineName    string
	Type            config.PipelineType
	CreateTime      int64
	BeforeCreatTime bool
	Limit           int
	Skip            int
}

type ListBuildTemplateOption added in v1.9.9

type ListBuildTemplateOption struct {
	Infrastructure string
}

type ListCronjobParam

type ListCronjobParam struct {
	ParentName string
	ParentType string
}

type ListEnvSvcDependOption added in v1.9.9

type ListEnvSvcDependOption struct {
	IsSort        bool
	ProductName   string
	Namespace     string
	EnvName       string
	ServiceName   string
	ServiceModule string
}

type ListHostIPArgs added in v1.6.0

type ListHostIPArgs struct {
	IDs    []string `json:"ids"`
	Labels []string `json:"labels"`
}

type ListMsgQueueCommonOption added in v1.9.9

type ListMsgQueueCommonOption struct {
	QueueType string
}

type ListMsgQueuePipelineTaskOption added in v1.9.9

type ListMsgQueuePipelineTaskOption struct {
	QueueType   string
	SortQueueID bool
}

type ListProductOpt added in v1.9.9

type ListProductOpt struct {
	Products []Product
}

type ListQueueOption

type ListQueueOption struct {
	PipelineName   string
	Status         config.Status
	MergeRequestID string
}

type ListReleasePlanLogOption added in v1.9.9

type ListReleasePlanLogOption struct {
	PlanID string
	IsSort bool
}

type ListReleasePlanOption added in v1.9.9

type ListReleasePlanOption struct {
	PageNum        int64
	PageSize       int64
	IsSort         bool
	ExcludedFields []string
	Status         config.ReleasePlanStatus
}

type ListStatsOption

type ListStatsOption struct {
	ProductName string
	Event       string
	Limit       int
}

type ListTaskOption

type ListTaskOption struct {
	PipelineName        string
	PipelineNames       []string
	Status              config.Status
	Statuses            []string
	Team                string
	TeamID              int
	Limit               int
	Skip                int
	Detail              bool
	ForWorkflowTaskList bool
	Type                config.PipelineType
	CreateTime          int64
	TaskCreator         string
	TaskCreators        []string
	Source              string
	Committers          []string
	ServiceModule       []string
	MergeRequestID      string
	NeedTriggerBy       bool
	NeedAllData         bool
}

type ListTestOption

type ListTestOption struct {
	ProductName  string
	ProductNames []string
	TestNames    []string
	TestType     string
	IsSort       bool
	BuildOS      string
	BasicImageID string
}

type ListWorfklowQueueOption added in v1.9.9

type ListWorfklowQueueOption struct {
	WorkflowName string
	Status       config.Status
}

type ListWorkflowOpt added in v1.9.9

type ListWorkflowOpt struct {
	Workflows []Workflow
}

type ListWorkflowOption

type ListWorkflowOption struct {
	IsSort      bool
	Projects    []string
	Names       []string
	Ids         []string
	DisplayName string
}

type ListWorkflowTaskV4Option added in v1.9.9

type ListWorkflowTaskV4Option struct {
	WorkflowName    string
	ProjectName     string
	ProjectNames    []string
	WorkflowNames   []string
	CreateTime      int64
	BeforeCreatTime bool
	Limit           int
	Skip            int
	IsSort          bool
}

type ListWorkflowV3Option added in v1.8.0

type ListWorkflowV3Option struct {
	ProjectName string
}

type ListWorkflowV4Opt added in v1.9.9

type ListWorkflowV4Opt struct {
	Workflows []WorkflowV4
}

type ListWorkflowV4Option added in v1.9.9

type ListWorkflowV4Option struct {
	ProjectName    string
	DisplayName    string
	Names          []string
	Category       setting.WorkflowCategory
	JobTypes       []config.JobType
	Infrastructure string
}

type ListWorkflowV4TemplateOption added in v1.9.9

type ListWorkflowV4TemplateOption struct {
	Names    []string
	Category setting.WorkflowCategory
}

type MonthlyJobInfo added in v1.9.9

type MonthlyJobInfo struct {
	Month       int `bson:"month" json:"month"`
	BuildCount  int `bson:"build_count" json:"build_count"`
	DeployCount int `bson:"deploy_count" json:"deploy_count"`
	TestCount   int `bson:"test_count" json:"test_count"`
}

type MsgQueueCommonColl added in v1.9.9

type MsgQueueCommonColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewMsgQueueCommonColl added in v1.9.9

func NewMsgQueueCommonColl() *MsgQueueCommonColl

func (*MsgQueueCommonColl) Create added in v1.9.9

func (*MsgQueueCommonColl) Delete added in v1.9.9

func (*MsgQueueCommonColl) DeleteByQueueType added in v1.9.9

func (c *MsgQueueCommonColl) DeleteByQueueType(_type string) error

func (*MsgQueueCommonColl) EnsureIndex added in v1.9.9

func (c *MsgQueueCommonColl) EnsureIndex(ctx context.Context) error

func (*MsgQueueCommonColl) GetCollectionName added in v1.9.9

func (c *MsgQueueCommonColl) GetCollectionName() string

func (*MsgQueueCommonColl) List added in v1.9.9

type MsgQueuePipelineTaskColl added in v1.9.9

type MsgQueuePipelineTaskColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewMsgQueuePipelineTaskColl added in v1.9.9

func NewMsgQueuePipelineTaskColl() *MsgQueuePipelineTaskColl

func (*MsgQueuePipelineTaskColl) Create added in v1.9.9

func (*MsgQueuePipelineTaskColl) Delete added in v1.9.9

func (*MsgQueuePipelineTaskColl) EnsureIndex added in v1.9.9

func (c *MsgQueuePipelineTaskColl) EnsureIndex(ctx context.Context) error

func (*MsgQueuePipelineTaskColl) GetCollectionName added in v1.9.9

func (c *MsgQueuePipelineTaskColl) GetCollectionName() string

func (*MsgQueuePipelineTaskColl) List added in v1.9.9

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 (*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) Create

func (c *NotifyColl) Create(args *models.Notify) error

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) List

func (c *NotifyColl) List(receiver string) ([]*models.Notify, error)

func (*NotifyColl) Read

func (c *NotifyColl) Read(id string) error

func (*NotifyColl) Update

func (c *NotifyColl) Update(id string, args *models.Notify) error

type ObservabilityColl added in v1.9.9

type ObservabilityColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewObservabilityColl added in v1.9.9

func NewObservabilityColl() *ObservabilityColl

func (*ObservabilityColl) Create added in v1.9.9

func (*ObservabilityColl) DeleteByID added in v1.9.9

func (c *ObservabilityColl) DeleteByID(ctx context.Context, idString string) error

func (*ObservabilityColl) EnsureIndex added in v1.9.9

func (c *ObservabilityColl) EnsureIndex(ctx context.Context) error

func (*ObservabilityColl) GetByID added in v1.9.9

func (c *ObservabilityColl) GetByID(ctx context.Context, idString string) (*models.Observability, error)

func (*ObservabilityColl) GetCollectionName added in v1.9.9

func (c *ObservabilityColl) GetCollectionName() string

func (*ObservabilityColl) List added in v1.9.9

func (c *ObservabilityColl) List(ctx context.Context, _type string) ([]*models.Observability, error)

func (*ObservabilityColl) Update added in v1.9.9

func (c *ObservabilityColl) Update(ctx context.Context, idString string, args *models.Observability) 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 (*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

func (*PipelineColl) Upsert

func (c *PipelineColl) Upsert(args *models.Pipeline) error

type PipelineFindOption

type PipelineFindOption struct {
	Name string
}

type PipelineListOption

type PipelineListOption struct {
	IsPreview   bool
	Targets     []string
	ProductName string
}

type PluginRepoColl added in v1.9.9

type PluginRepoColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewPluginRepoColl added in v1.9.9

func NewPluginRepoColl() *PluginRepoColl

func (*PluginRepoColl) Delete added in v1.9.9

func (c *PluginRepoColl) Delete(id string) error

func (*PluginRepoColl) EnsureIndex added in v1.9.9

func (c *PluginRepoColl) EnsureIndex(ctx context.Context) error

func (*PluginRepoColl) GetCollectionName added in v1.9.9

func (c *PluginRepoColl) GetCollectionName() string

func (*PluginRepoColl) List added in v1.9.9

func (c *PluginRepoColl) List(offical *bool) ([]*models.PluginRepo, error)

func (*PluginRepoColl) Upsert added in v1.9.9

func (c *PluginRepoColl) Upsert(pluginRepo *models.PluginRepo) error

type PrivateKeyArgs

type PrivateKeyArgs struct {
	Name        string
	ProjectName string
	SystemOnly  bool
}

type PrivateKeyColl

type PrivateKeyColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewPrivateKeyColl

func NewPrivateKeyColl() *PrivateKeyColl

func (*PrivateKeyColl) BulkDelete added in v1.9.9

func (c *PrivateKeyColl) BulkDelete(projectName string) error

func (*PrivateKeyColl) Create

func (c *PrivateKeyColl) Create(args *models.PrivateKey) error

func (*PrivateKeyColl) Delete

func (c *PrivateKeyColl) Delete(id string) error

func (*PrivateKeyColl) DeleteAll added in v1.6.0

func (c *PrivateKeyColl) DeleteAll() error

func (*PrivateKeyColl) DistinctLabels added in v1.6.0

func (c *PrivateKeyColl) DistinctLabels() ([]string, error)

DistinctLabels returns distinct label

func (*PrivateKeyColl) EnsureIndex

func (c *PrivateKeyColl) EnsureIndex(ctx context.Context) error

func (*PrivateKeyColl) Find

func (*PrivateKeyColl) GetCollectionName

func (c *PrivateKeyColl) GetCollectionName() string

func (*PrivateKeyColl) List

func (c *PrivateKeyColl) List(args *PrivateKeyArgs) ([]*models.PrivateKey, error)

func (*PrivateKeyColl) ListHostIPByArgs added in v1.6.0

func (c *PrivateKeyColl) ListHostIPByArgs(args *ListHostIPArgs) ([]*models.PrivateKey, error)

func (*PrivateKeyColl) Update

func (c *PrivateKeyColl) Update(id string, args *models.PrivateKey) error

type Product added in v1.9.9

type Product struct {
	Name        string `json:"name"`
	ProjectName string `json:"projectName"`
}

type ProductColl

type ProductColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewProductColl

func NewProductColl() *ProductColl

func (*ProductColl) Count added in v1.3.1

func (c *ProductColl) Count(productName string) (int, error)

func (*ProductColl) Create

func (c *ProductColl) Create(args *models.Product) error

func (*ProductColl) Delete

func (c *ProductColl) Delete(owner, productName string) error

func (*ProductColl) EnsureIndex

func (c *ProductColl) EnsureIndex(ctx context.Context) error

func (*ProductColl) EnvCount added in v1.9.0

func (c *ProductColl) EnvCount() (int64, error)

func (*ProductColl) Find

func (*ProductColl) GetCollectionName

func (c *ProductColl) GetCollectionName() string

func (*ProductColl) List

func (c *ProductColl) List(opt *ProductListOptions) ([]*models.Product, error)

func (*ProductColl) ListByProducts added in v1.9.9

func (c *ProductColl) ListByProducts(opt ListProductOpt) ([]*models.Product, error)

func (*ProductColl) ListExistedNamespace added in v1.9.9

func (c *ProductColl) ListExistedNamespace(clusterID string) ([]string, error)

func (*ProductColl) ListProductionNamespace added in v1.9.9

func (c *ProductColl) ListProductionNamespace(clusterID string) ([]string, error)

func (*ProductColl) ListProjectsInNames added in v1.7.0

func (c *ProductColl) ListProjectsInNames(names []string) ([]*projectEnvs, error)

func (*ProductColl) Update

func (c *ProductColl) Update(args *models.Product) error

Update Cannot update owner & product name

func (*ProductColl) UpdateAll added in v1.3.1

func (c *ProductColl) UpdateAll(envs []*models.Product) error

UpdateAll updates all envs in a bulk write. Currently only field `services` is supported. Note: A bulk operation can have at most 1000 operations, but the client will do it for us. see https://stackoverflow.com/questions/24237887/what-is-mongodb-batch-operation-max-size

func (*ProductColl) UpdateConfigs added in v1.9.9

func (c *ProductColl) UpdateConfigs(envName, productName string, analysisConfig *models.AnalysisConfig, notificationConfigs []*models.NotificationConfig) error

func (*ProductColl) UpdateDeployStrategy added in v1.9.9

func (c *ProductColl) UpdateDeployStrategy(envName, productName string, deployStrategy map[string]string) error

func (*ProductColl) UpdateDeployStrategyAndGlobalVariable added in v1.9.9

func (c *ProductColl) UpdateDeployStrategyAndGlobalVariable(envName, productName string, deployStrategy map[string]string, globalVariables []*types.GlobalVariableKV) error

func (*ProductColl) UpdateErrors

func (c *ProductColl) UpdateErrors(owner, productName, errorMsg string) error

func (*ProductColl) UpdateGlobalVariable added in v1.9.9

func (c *ProductColl) UpdateGlobalVariable(args *models.Product) error

func (*ProductColl) UpdateGroup

func (c *ProductColl) UpdateGroup(envName, productName string, groupIndex int, group []*models.ProductService) error

UpdateGroup TODO UpdateGroup needs to be optimized Service info may be override when updating multiple services in same group at the sametime

func (*ProductColl) UpdateIsPublic

func (c *ProductColl) UpdateIsPublic(envName, productName string, isPublic bool) error

func (*ProductColl) UpdateProductAlias added in v1.9.9

func (c *ProductColl) UpdateProductAlias(envName, productName, alias string) error

func (*ProductColl) UpdateProductRecycleDay

func (c *ProductColl) UpdateProductRecycleDay(envName, productName string, recycleDay int) error

func (*ProductColl) UpdateProductVariables added in v1.9.9

func (c *ProductColl) UpdateProductVariables(product *models.Product) error

func (*ProductColl) UpdateRegistry added in v1.8.0

func (c *ProductColl) UpdateRegistry(envName, productName, registryId string) error

func (*ProductColl) UpdateStatus

func (c *ProductColl) UpdateStatus(owner, productName, status string) error

func (*ProductColl) UpdateStatusAndError added in v1.9.9

func (c *ProductColl) UpdateStatusAndError(envName, projectName, status, errorMsg string) error

type ProductEnvFindOptions

type ProductEnvFindOptions struct {
	Name      string
	Namespace string
}

type ProductFindOptions

type ProductFindOptions struct {
	Name              string
	EnvName           string
	Namespace         string
	Production        *bool
	IgnoreNotFoundErr bool
}

type ProductListOptions

type ProductListOptions struct {
	EnvName             string
	Name                string
	Namespace           string
	IsPublic            bool
	ClusterID           string
	IsSortByUpdateTime  bool
	IsSortByProductName bool
	ExcludeStatus       []string
	ExcludeSource       string
	Source              string
	InProjects          []string
	InEnvs              []string
	InIDs               []string

	// New Since v1.11.0
	ShareEnvEnable  *bool
	ShareEnvIsBase  *bool
	ShareEnvBaseEnv *string

	Production *bool
}

ClusterId is a primitive.ObjectID{}.Hex()

type ProductionServiceColl added in v1.9.9

type ProductionServiceColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewProductionServiceColl added in v1.9.9

func NewProductionServiceColl() *ProductionServiceColl

func (*ProductionServiceColl) Create added in v1.9.9

func (c *ProductionServiceColl) Create(args *models.Service) error

func (*ProductionServiceColl) Delete added in v1.9.9

func (c *ProductionServiceColl) Delete(serviceName, productName, status string, revision int64) error

func (*ProductionServiceColl) DeleteByOptions added in v1.9.9

func (*ProductionServiceColl) DeleteByProject added in v1.9.9

func (c *ProductionServiceColl) DeleteByProject(productName string) error

func (*ProductionServiceColl) EnsureIndex added in v1.9.9

func (c *ProductionServiceColl) EnsureIndex(ctx context.Context) error

func (*ProductionServiceColl) Find added in v1.9.9

func (*ProductionServiceColl) GetChartTemplateReference added in v1.9.9

func (c *ProductionServiceColl) GetChartTemplateReference(templateName string) ([]*models.Service, error)

func (*ProductionServiceColl) GetCollectionName added in v1.9.9

func (c *ProductionServiceColl) GetCollectionName() string

func (*ProductionServiceColl) GetYamlTemplateLatestReference added in v1.9.9

func (c *ProductionServiceColl) GetYamlTemplateLatestReference(templateID string) ([]*models.Service, error)

func (*ProductionServiceColl) GetYamlTemplateReference added in v1.9.9

func (c *ProductionServiceColl) GetYamlTemplateReference(templateID string) ([]*models.Service, error)

func (*ProductionServiceColl) ListMaxRevisions added in v1.9.9

func (c *ProductionServiceColl) ListMaxRevisions(opt *ServiceListOption) ([]*models.Service, error)

func (*ProductionServiceColl) ListMaxRevisionsByProduct added in v1.9.9

func (c *ProductionServiceColl) ListMaxRevisionsByProduct(productName string) ([]*models.Service, error)

func (*ProductionServiceColl) ListMaxRevisionsByProject added in v1.9.9

func (c *ProductionServiceColl) ListMaxRevisionsByProject(productName, serviceType string) ([]*models.Service, error)

func (*ProductionServiceColl) ListServiceAllRevisions added in v1.9.9

func (c *ProductionServiceColl) ListServiceAllRevisions(productName, serviceName string) ([]*models.Service, error)

func (*ProductionServiceColl) ListServiceAllRevisionsAndStatus added in v1.9.9

func (c *ProductionServiceColl) ListServiceAllRevisionsAndStatus(serviceName, productName string) ([]*models.Service, error)

ListServiceAllRevisionsAndStatus will list all revision include deleting status

func (*ProductionServiceColl) ListServicesWithSRevision added in v1.9.9

func (c *ProductionServiceColl) ListServicesWithSRevision(opt *SvcRevisionListOption) ([]*models.Service, error)

func (*ProductionServiceColl) SearchMaxRevisionsByService added in v1.9.9

func (c *ProductionServiceColl) SearchMaxRevisionsByService(serviceName string) ([]*models.Service, error)

func (*ProductionServiceColl) Update added in v1.9.9

func (c *ProductionServiceColl) Update(args *models.Service) error

func (*ProductionServiceColl) UpdateServiceContainers added in v1.9.9

func (c *ProductionServiceColl) UpdateServiceContainers(args *models.Service) error

func (*ProductionServiceColl) UpdateServiceVariables added in v1.9.9

func (c *ProductionServiceColl) UpdateServiceVariables(args *models.Service) error

func (*ProductionServiceColl) UpdateStatus added in v1.9.9

func (c *ProductionServiceColl) UpdateStatus(serviceName, productName, status string) error

type ProductionServiceDeleteOption added in v1.9.9

type ProductionServiceDeleteOption struct {
	ServiceName string
	ProductName string
	Type        string
	Status      string
	Revision    int64
}

type ProductionServiceOption added in v1.9.9

type ProductionServiceOption struct {
	ProductName   string
	ExcludeStatus string
}

type ProjectClusterRelationColl added in v1.8.0

type ProjectClusterRelationColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewProjectClusterRelationColl added in v1.8.0

func NewProjectClusterRelationColl() *ProjectClusterRelationColl

func (*ProjectClusterRelationColl) Create added in v1.8.0

func (*ProjectClusterRelationColl) Delete added in v1.8.0

func (*ProjectClusterRelationColl) EnsureIndex added in v1.8.0

func (c *ProjectClusterRelationColl) EnsureIndex(ctx context.Context) error

func (*ProjectClusterRelationColl) GetCollectionName added in v1.8.0

func (c *ProjectClusterRelationColl) GetCollectionName() string

func (*ProjectClusterRelationColl) List added in v1.8.0

type ProjectClusterRelationOption added in v1.8.0

type ProjectClusterRelationOption struct {
	ProjectName string
	ClusterID   string
}

type ProjectGroupColl added in v1.9.9

type ProjectGroupColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewProjectGroupColl added in v1.9.9

func NewProjectGroupColl() *ProjectGroupColl

func (*ProjectGroupColl) Create added in v1.9.9

func (c *ProjectGroupColl) Create(args *models.ProjectGroup) error

func (*ProjectGroupColl) Delete added in v1.9.9

func (c *ProjectGroupColl) Delete(name string) error

func (*ProjectGroupColl) EnsureIndex added in v1.9.9

func (c *ProjectGroupColl) EnsureIndex(ctx context.Context) error

func (*ProjectGroupColl) Find added in v1.9.9

func (*ProjectGroupColl) GetCollectionName added in v1.9.9

func (c *ProjectGroupColl) GetCollectionName() string

func (*ProjectGroupColl) List added in v1.9.9

func (c *ProjectGroupColl) List() ([]*models.ProjectGroup, error)

func (*ProjectGroupColl) ListGroupNames added in v1.9.9

func (c *ProjectGroupColl) ListGroupNames() ([]string, error)

func (*ProjectGroupColl) Update added in v1.9.9

func (c *ProjectGroupColl) Update(args *models.ProjectGroup) error

type ProjectGroupOpts added in v1.9.9

type ProjectGroupOpts struct {
	Name string
	ID   string
}

type ProjectManagementColl added in v1.9.9

type ProjectManagementColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewProjectManagementColl added in v1.9.9

func NewProjectManagementColl() *ProjectManagementColl

func (*ProjectManagementColl) Create added in v1.9.9

func (*ProjectManagementColl) DeleteByID added in v1.9.9

func (c *ProjectManagementColl) DeleteByID(idHex string) error

func (*ProjectManagementColl) EnsureIndex added in v1.9.9

func (c *ProjectManagementColl) EnsureIndex(ctx context.Context) error

func (*ProjectManagementColl) GetByID added in v1.9.9

func (*ProjectManagementColl) GetBySystemIdentity added in v1.9.9

func (c *ProjectManagementColl) GetBySystemIdentity(systemIdentity string) (*models.ProjectManagement, error)

func (*ProjectManagementColl) GetCollectionName added in v1.9.9

func (c *ProjectManagementColl) GetCollectionName() string

func (*ProjectManagementColl) GetJira added in v1.9.9

Deprecated since 1.19.0

func (*ProjectManagementColl) GetJiraByID added in v1.9.9

func (c *ProjectManagementColl) GetJiraByID(idHex string) (*models.ProjectManagement, error)

func (*ProjectManagementColl) GetMeego added in v1.9.9

Deprecated since 1.19.0

func (*ProjectManagementColl) GetMeegoByID added in v1.9.9

func (c *ProjectManagementColl) GetMeegoByID(idHex string) (*models.ProjectManagement, error)

func (*ProjectManagementColl) List added in v1.9.9

func (*ProjectManagementColl) UpdateByID added in v1.9.9

func (c *ProjectManagementColl) UpdateByID(idHex string, pm *models.ProjectManagement) error

type ProxyArgs

type ProxyArgs struct {
	Type string
}

type ProxyColl

type ProxyColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewProxyColl

func NewProxyColl() *ProxyColl

func (*ProxyColl) Create

func (c *ProxyColl) Create(args *models.Proxy) error

func (*ProxyColl) Delete

func (c *ProxyColl) Delete(id string) error

func (*ProxyColl) EnsureIndex

func (c *ProxyColl) EnsureIndex(ctx context.Context) error

func (*ProxyColl) Find

func (c *ProxyColl) Find(id string) (*models.Proxy, error)

func (*ProxyColl) GetCollectionName

func (c *ProxyColl) GetCollectionName() string

func (*ProxyColl) List

func (c *ProxyColl) List(args *ProxyArgs) ([]*models.Proxy, error)

func (*ProxyColl) Update

func (c *ProxyColl) Update(id string, args *models.Proxy) error

type QueryEnvResourceOption added in v1.9.9

type QueryEnvResourceOption struct {
	Id             string
	CreateTime     string
	IsSort         bool
	ProductName    string
	Namespace      string
	EnvName        string
	Name           string
	Type           string
	IgnoreNotFound bool
	AutoSync       bool
	Active         bool
}

type QueueColl

type QueueColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewQueueColl

func NewQueueColl() *QueueColl

func (*QueueColl) Create

func (c *QueueColl) Create(args *models.Queue) error

func (*QueueColl) Delete

func (c *QueueColl) Delete(args *models.Queue) error

func (*QueueColl) EnsureIndex

func (c *QueueColl) EnsureIndex(ctx context.Context) error

func (*QueueColl) GetCollectionName

func (c *QueueColl) GetCollectionName() string

func (*QueueColl) List

func (c *QueueColl) List(opt *ListQueueOption) ([]*models.Queue, error)

func (*QueueColl) Update

func (c *QueueColl) Update(args *models.Queue) error

func (*QueueColl) UpdateAgent

func (c *QueueColl) UpdateAgent(taskID int64, pipelineName string, createTime int64, agentID string) error

type RegistryNamespaceColl

type RegistryNamespaceColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewRegistryNamespaceColl

func NewRegistryNamespaceColl() *RegistryNamespaceColl

func (*RegistryNamespaceColl) Create

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 (*RegistryNamespaceColl) FindAll

func (*RegistryNamespaceColl) FindByProject added in v1.9.9

func (r *RegistryNamespaceColl) FindByProject(projectName string) ([]*models.RegistryNamespace, error)

func (*RegistryNamespaceColl) GetCollectionName

func (r *RegistryNamespaceColl) GetCollectionName() string

func (*RegistryNamespaceColl) Update

type ReleasePlanColl added in v1.9.9

type ReleasePlanColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewReleasePlanColl added in v1.9.9

func NewReleasePlanColl() *ReleasePlanColl

func (*ReleasePlanColl) Create added in v1.9.9

func (c *ReleasePlanColl) Create(args *models.ReleasePlan) (string, error)

func (*ReleasePlanColl) DeleteByID added in v1.9.9

func (c *ReleasePlanColl) DeleteByID(ctx context.Context, idString string) error

func (*ReleasePlanColl) EnsureIndex added in v1.9.9

func (c *ReleasePlanColl) EnsureIndex(ctx context.Context) error

func (*ReleasePlanColl) GetByID added in v1.9.9

func (c *ReleasePlanColl) GetByID(ctx context.Context, idString string) (*models.ReleasePlan, error)

func (*ReleasePlanColl) GetCollectionName added in v1.9.9

func (c *ReleasePlanColl) GetCollectionName() string

func (*ReleasePlanColl) ListByOptions added in v1.9.9

func (c *ReleasePlanColl) ListByOptions(opt *ListReleasePlanOption) ([]*models.ReleasePlan, int64, error)

func (*ReleasePlanColl) UpdateByID added in v1.9.9

func (c *ReleasePlanColl) UpdateByID(ctx context.Context, idString string, args *models.ReleasePlan) error

type ReleasePlanLogColl added in v1.9.9

type ReleasePlanLogColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewReleasePlanLogColl added in v1.9.9

func NewReleasePlanLogColl() *ReleasePlanLogColl

func (*ReleasePlanLogColl) Create added in v1.9.9

func (c *ReleasePlanLogColl) Create(args *models.ReleasePlanLog) error

func (*ReleasePlanLogColl) EnsureIndex added in v1.9.9

func (c *ReleasePlanLogColl) EnsureIndex(ctx context.Context) error

func (*ReleasePlanLogColl) GetCollectionName added in v1.9.9

func (c *ReleasePlanLogColl) GetCollectionName() string

func (*ReleasePlanLogColl) ListByOptions added in v1.9.9

type RenderSetColl

type RenderSetColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewRenderSetColl

func NewRenderSetColl() *RenderSetColl

func (*RenderSetColl) Create

func (c *RenderSetColl) Create(args *models.RenderSet) error

func (*RenderSetColl) EnsureIndex

func (c *RenderSetColl) EnsureIndex(ctx context.Context) error

func (*RenderSetColl) Find

func (*RenderSetColl) GetCollectionName

func (c *RenderSetColl) GetCollectionName() string

type RenderSetFindOption

type RenderSetFindOption struct {
	// if Revision == 0 then search max revision of RenderSet
	ProductTmpl       string
	EnvName           string
	IsDefault         bool
	Revision          int64
	Name              string
	YamlVariableSetID string
}

RenderSetFindOption ...

type RenderSetPipeResp

type RenderSetPipeResp struct {
	RenderSet struct {
		Name        string `bson:"name"                     json:"name"`
		ProductTmpl string `bson:"product_tmpl"             json:"product_tmpl"`
	} `bson:"_id"      json:"render_set"`
	Revision int64 `bson:"revision"     json:"revision"`
}

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) Find

func (c *S3StorageColl) Find(id string) (*models.S3Storage, error)

func (*S3StorageColl) FindAll

func (c *S3StorageColl) FindAll() ([]*models.S3Storage, error)

func (*S3StorageColl) FindByProject added in v1.9.9

func (c *S3StorageColl) FindByProject(projectName string) ([]*models.S3Storage, 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)

func (*S3StorageColl) InitData added in v1.9.9

func (c *S3StorageColl) InitData() error

func (*S3StorageColl) Update

func (c *S3StorageColl) Update(id string, args *models.S3Storage) error

Upsert if the updated storage is default, all other default storage will be set as not default

type ScanningColl added in v1.9.9

type ScanningColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewScanningColl added in v1.9.9

func NewScanningColl() *ScanningColl

func (*ScanningColl) Create added in v1.9.9

func (c *ScanningColl) Create(scanning *models.Scanning) error

func (*ScanningColl) DeleteByID added in v1.9.9

func (c *ScanningColl) DeleteByID(idstring string) error

func (*ScanningColl) EnsureIndex added in v1.9.9

func (c *ScanningColl) EnsureIndex(ctx context.Context) error

func (*ScanningColl) Find added in v1.9.9

func (c *ScanningColl) Find(projectName, name string) (*models.Scanning, error)

func (*ScanningColl) GetByID added in v1.9.9

func (c *ScanningColl) GetByID(idstring string) (*models.Scanning, error)

func (*ScanningColl) GetCollectionName added in v1.9.9

func (c *ScanningColl) GetCollectionName() string

func (*ScanningColl) List added in v1.9.9

func (c *ScanningColl) List(listOption *ScanningListOption, pageNum, pageSize int64) ([]*models.Scanning, int64, error)

func (*ScanningColl) Update added in v1.9.9

func (c *ScanningColl) Update(idString string, scanning *models.Scanning) error

type ScanningListOption added in v1.9.9

type ScanningListOption struct {
	ProjectName   string
	ScanningNames []string
}

type ServiceAggregateResult added in v1.9.0

type ServiceAggregateResult struct {
	ServiceID primitive.ObjectID `bson:"service_id"`
}

type ServiceColl

type ServiceColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewServiceColl

func NewServiceColl() *ServiceColl

func (*ServiceColl) BatchUpdateExternalServicesStatus added in v1.6.0

func (c *ServiceColl) BatchUpdateExternalServicesStatus(productName, envName, status string, serviceNames []string) error

func (*ServiceColl) Count added in v1.3.1

func (c *ServiceColl) Count(productName string) (int, error)

func (*ServiceColl) Create

func (c *ServiceColl) Create(args *models.Service) error

func (*ServiceColl) Delete

func (c *ServiceColl) Delete(serviceName, serviceType, productName, status string, revision int64) error

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) GetChartTemplateReference added in v1.9.9

func (c *ServiceColl) GetChartTemplateReference(templateName string) ([]*models.Service, error)

func (*ServiceColl) GetCollectionName

func (c *ServiceColl) GetCollectionName() string

func (*ServiceColl) GetYamlTemplateLatestReference added in v1.9.9

func (c *ServiceColl) GetYamlTemplateLatestReference(templateID string) ([]*models.Service, error)

func (*ServiceColl) GetYamlTemplateReference added in v1.9.9

func (c *ServiceColl) GetYamlTemplateReference(templateID string) ([]*models.Service, error)

func (*ServiceColl) ListAllRevisions

func (c *ServiceColl) ListAllRevisions() ([]*models.Service, error)

ListAllRevisions 列出历史所有的service TODO 返回k8s所有service

func (*ServiceColl) ListExternalWorkloadsBy added in v1.5.0

func (c *ServiceColl) ListExternalWorkloadsBy(productName, envName string, serviceNames ...string) ([]*models.Service, error)

ListExternalWorkloadsBy list service only for external services , other service type not use before refactor

func (*ServiceColl) ListMaxRevisions

func (c *ServiceColl) ListMaxRevisions(opt *ServiceListOption) ([]*models.Service, error)

func (*ServiceColl) ListMaxRevisionsAllSvcByProduct added in v1.9.9

func (c *ServiceColl) ListMaxRevisionsAllSvcByProduct(productName string) ([]*models.Service, error)

func (*ServiceColl) ListMaxRevisionsByProduct added in v1.3.0

func (c *ServiceColl) ListMaxRevisionsByProduct(productName string) ([]*models.Service, error)

func (*ServiceColl) ListMaxRevisionsByProject added in v1.9.0

func (c *ServiceColl) ListMaxRevisionsByProject(serviceName, serviceType string) ([]*models.Service, error)

func (*ServiceColl) ListMaxRevisionsForServices

func (c *ServiceColl) ListMaxRevisionsForServices(services []*templatemodels.ServiceInfo, serviceType string) ([]*models.Service, error)

func (*ServiceColl) ListServiceAllRevisionsAndStatus added in v1.9.9

func (c *ServiceColl) ListServiceAllRevisionsAndStatus(serviceName, productName string) ([]*models.Service, error)

ListServiceAllRevisionsAndStatus will list all revision include deleting status

func (*ServiceColl) ListServicesWithSRevision added in v1.9.9

func (c *ServiceColl) ListServicesWithSRevision(opt *SvcRevisionListOption) ([]*models.Service, error)

func (*ServiceColl) SearchMaxRevisionsByService added in v1.9.9

func (c *ServiceColl) SearchMaxRevisionsByService(serviceName string) ([]*models.Service, error)

func (*ServiceColl) TransferServiceSource added in v1.9.9

func (c *ServiceColl) TransferServiceSource(productName, serviceName, source, newSource, username, yaml string) error

func (*ServiceColl) Update

func (c *ServiceColl) Update(args *models.Service) error

func (*ServiceColl) UpdateExternalServiceEnvName added in v1.7.0

func (c *ServiceColl) UpdateExternalServiceEnvName(serviceName, productName, envName string) error

UpdateExternalServiceEnvName only used by external services

func (*ServiceColl) UpdateExternalServicesStatus added in v1.5.0

func (c *ServiceColl) UpdateExternalServicesStatus(serviceName, productName, status, envName string) error

UpdateExternalServicesStatus only used by external services

func (*ServiceColl) UpdateServiceContainers added in v1.9.9

func (c *ServiceColl) UpdateServiceContainers(args *models.Service) error

func (*ServiceColl) UpdateServiceHealthCheckStatus added in v1.8.0

func (c *ServiceColl) UpdateServiceHealthCheckStatus(args *models.Service) error

func (*ServiceColl) UpdateServiceVariables added in v1.9.9

func (c *ServiceColl) UpdateServiceVariables(args *models.Service) error

func (*ServiceColl) UpdateStatus

func (c *ServiceColl) UpdateStatus(serviceName, 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
	IgnoreNoDocumentErr bool
}

type ServiceListOption

type ServiceListOption struct {
	ProductName    string
	ServiceName    string
	BuildName      string
	Type           string
	Source         string
	ExcludeProject string
	InServices     []*templatemodels.ServiceInfo
	NotInServices  []*templatemodels.ServiceInfo
}

type ServiceModule added in v1.9.9

type ServiceModule struct {
	ServiceModule string              `json:"service_module"`
	ServiceName   string              `json:"service_name"`
	CodeInfo      []*types.Repository `json:"code_info"`
}

type ServiceRevision added in v1.9.9

type ServiceRevision struct {
	ServiceName string
	Revision    int64
}

type ServicesInExternalEnvArgs added in v1.6.0

type ServicesInExternalEnvArgs struct {
	ProductName    string
	ServiceName    string
	EnvName        string
	Namespace      string
	ClusterID      string
	ExcludeEnvName string
}

type ServicesInExternalEnvColl added in v1.6.0

type ServicesInExternalEnvColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewServicesInExternalEnvColl added in v1.6.0

func NewServicesInExternalEnvColl() *ServicesInExternalEnvColl

func (*ServicesInExternalEnvColl) Create added in v1.6.0

Create ...

func (*ServicesInExternalEnvColl) Delete added in v1.6.0

func (*ServicesInExternalEnvColl) EnsureIndex added in v1.6.0

func (c *ServicesInExternalEnvColl) EnsureIndex(ctx context.Context) error

func (*ServicesInExternalEnvColl) GetCollectionName added in v1.6.0

func (c *ServicesInExternalEnvColl) GetCollectionName() string

func (*ServicesInExternalEnvColl) List added in v1.6.0

type SetCustomFieldsOptions added in v1.9.9

type SetCustomFieldsOptions struct {
	ProjectName  string
	WorkflowName string
}

type SonarIntegrationColl added in v1.9.9

type SonarIntegrationColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewSonarIntegrationColl added in v1.9.9

func NewSonarIntegrationColl() *SonarIntegrationColl

func (*SonarIntegrationColl) Create added in v1.9.9

func (*SonarIntegrationColl) DeleteByID added in v1.9.9

func (c *SonarIntegrationColl) DeleteByID(ctx context.Context, idstring string) error

func (*SonarIntegrationColl) EnsureIndex added in v1.9.9

func (c *SonarIntegrationColl) EnsureIndex(ctx context.Context) error

func (*SonarIntegrationColl) GetByID added in v1.9.9

func (c *SonarIntegrationColl) GetByID(ctx context.Context, idstring string) (*models.SonarIntegration, error)

func (*SonarIntegrationColl) GetBySystemIdentity added in v1.9.9

func (c *SonarIntegrationColl) GetBySystemIdentity(systemIdentity string) (*models.SonarIntegration, error)

func (*SonarIntegrationColl) GetCollectionName added in v1.9.9

func (c *SonarIntegrationColl) GetCollectionName() string

func (*SonarIntegrationColl) List added in v1.9.9

func (c *SonarIntegrationColl) List(ctx context.Context, pageNum, pageSize int64) ([]*models.SonarIntegration, int64, error)

func (*SonarIntegrationColl) Update added in v1.9.9

func (c *SonarIntegrationColl) Update(ctx context.Context, idString string, obj *models.SonarIntegration) error

type StatDashboardConfigColl added in v1.9.9

type StatDashboardConfigColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewStatDashboardConfigColl added in v1.9.9

func NewStatDashboardConfigColl() *StatDashboardConfigColl

func (*StatDashboardConfigColl) BulkCreate added in v1.9.9

func (*StatDashboardConfigColl) Create added in v1.9.9

func (*StatDashboardConfigColl) Delete added in v1.9.9

func (c *StatDashboardConfigColl) Delete(ctx context.Context, key string) error

func (*StatDashboardConfigColl) EnsureIndex added in v1.9.9

func (c *StatDashboardConfigColl) EnsureIndex(ctx context.Context) error

func (*StatDashboardConfigColl) FindByOptions added in v1.9.9

func (*StatDashboardConfigColl) GetCollectionName added in v1.9.9

func (c *StatDashboardConfigColl) GetCollectionName() string

func (*StatDashboardConfigColl) List added in v1.9.9

func (*StatDashboardConfigColl) Update added in v1.9.9

type StatsColl

type StatsColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewStatsColl

func NewStatsColl() *StatsColl

func (*StatsColl) Create

func (c *StatsColl) Create(args *models.Stats) error

Create ...

func (*StatsColl) EnsureIndex

func (c *StatsColl) EnsureIndex(ctx context.Context) error

func (*StatsColl) GetCollectionName

func (c *StatsColl) GetCollectionName() string

func (*StatsColl) List

func (c *StatsColl) List(option ListStatsOption) ([]*models.Stats, error)

List ...

type StrategyColl

type StrategyColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewStrategyColl

func NewStrategyColl() *StrategyColl

func (*StrategyColl) EnsureIndex

func (c *StrategyColl) EnsureIndex(ctx context.Context) error

func (*StrategyColl) GetByTarget

func (c *StrategyColl) GetByTarget(target models.CapacityTarget) (*models.CapacityStrategy, error)

GetByTarget returns either one selected CapacityStrategy or error

func (*StrategyColl) GetCollectionName

func (c *StrategyColl) GetCollectionName() string

func (*StrategyColl) Upsert

func (c *StrategyColl) Upsert(strategy *models.CapacityStrategy) error

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 SvcRevisionListOption added in v1.9.9

type SvcRevisionListOption struct {
	ProductName      string
	ServiceRevisions []*ServiceRevision
}

type SystemSettingColl added in v1.9.9

type SystemSettingColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewSystemSettingColl added in v1.9.9

func NewSystemSettingColl() *SystemSettingColl

func (*SystemSettingColl) CreateOrUpdate added in v1.9.9

func (c *SystemSettingColl) CreateOrUpdate(id string, args *models.SystemSetting) error

func (*SystemSettingColl) EnsureIndex added in v1.9.9

func (c *SystemSettingColl) EnsureIndex(ctx context.Context) error

func (*SystemSettingColl) Get added in v1.9.9

func (*SystemSettingColl) GetCollectionName added in v1.9.9

func (c *SystemSettingColl) GetCollectionName() string

func (*SystemSettingColl) InitSystemSettings added in v1.9.9

func (c *SystemSettingColl) InitSystemSettings() error

func (*SystemSettingColl) UpdateConcurrencySetting added in v1.9.9

func (c *SystemSettingColl) UpdateConcurrencySetting(workflowConcurrency, buildConcurrency int64) error

func (*SystemSettingColl) UpdateDefaultLoginSetting added in v1.9.9

func (c *SystemSettingColl) UpdateDefaultLoginSetting(defaultLogin string) error

func (*SystemSettingColl) UpdatePrivacySetting added in v1.9.9

func (c *SystemSettingColl) UpdatePrivacySetting(improvementPlan bool) error

func (*SystemSettingColl) UpdateSecuritySetting added in v1.9.9

func (c *SystemSettingColl) UpdateSecuritySetting(tokenExpirationTime int64) error

func (*SystemSettingColl) UpdateTheme added in v1.9.9

func (c *SystemSettingColl) UpdateTheme(theme *models.Theme) error

type TaskColl

type TaskColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewTaskColl

func NewTaskColl() *TaskColl

func (*TaskColl) ArchiveHistoryPipelineTask

func (c *TaskColl) ArchiveHistoryPipelineTask(pipelineName string, taskType config.PipelineType, remain, remainDays int) error

func (*TaskColl) Count

func (c *TaskColl) Count(option *CountTaskOption) (ret int, err error)

func (*TaskColl) Create

func (c *TaskColl) Create(args *task.Task) error

func (*TaskColl) DeleteByPipelineNameAndType

func (c *TaskColl) DeleteByPipelineNameAndType(pipelineName string, typeString config.PipelineType) error

func (*TaskColl) DistinctFieldsPipelineTask added in v1.9.0

func (c *TaskColl) DistinctFieldsPipelineTask(fieldName, projectName, pipelineName string, typeString config.PipelineType, isNeedAllData bool) ([]interface{}, error)

func (*TaskColl) EnsureIndex

func (c *TaskColl) EnsureIndex(ctx context.Context) error

func (*TaskColl) Find

func (c *TaskColl) Find(id int64, pipelineName string, typeString config.PipelineType) (*task.Task, error)

func (*TaskColl) FindLatestTask

func (c *TaskColl) FindLatestTask(args *FindTaskOption) (*task.Task, error)

func (*TaskColl) FindTask

func (c *TaskColl) FindTask(pipelineName string, typeString config.PipelineType) (*task.Task, error)

func (*TaskColl) FindTodoTasks

func (c *TaskColl) FindTodoTasks() ([]*task.Task, error)

func (*TaskColl) GetCollectionName

func (c *TaskColl) GetCollectionName() string

func (*TaskColl) InCompletedTasks

func (c *TaskColl) InCompletedTasks() ([]*task.Task, error)

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) ListByCursor added in v1.9.9

func (c *TaskColl) ListByCursor(option *ListAllTaskOption) (*mongo.Cursor, error)

func (*TaskColl) ListPreview added in v1.9.9

func (c *TaskColl) ListPreview(pipelineNames []string) (ret []*TaskPreview, err error)

func (*TaskColl) ListRecentTasks added in v1.7.1

func (c *TaskColl) ListRecentTasks(args *ListTaskOption) ([]*TaskInfo, 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) Update

func (c *TaskColl) Update(args *task.Task) error

func (*TaskColl) UpdateStatus

func (c *TaskColl) UpdateStatus(taskID int64, pipelineName, userName string, status config.Status) error

func (*TaskColl) UpdateUnfinishedTask

func (c *TaskColl) UpdateUnfinishedTask(args *task.Task) error

type TaskInfo added in v1.7.1

type TaskInfo struct {
	ID           taskGrouped `bson:"_id"`
	TaskID       int64       `bson:"task_id"`
	PipelineName string      `bson:"pipeline_name"`
	Status       string      `bson:"status"`
}

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"`
	ServiceModules []*ServiceModule          `bson:"-"                     json:"service_modules"`
	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) GetTestTasks added in v1.9.9

func (c *TestTaskStatColl) GetTestTasks(startTime, endTime int64) ([]*models.TestTaskStat, error)

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) Create

func (c *TestingColl) Create(testing *models.Testing) error

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)

func (*TestingColl) Update

func (c *TestingColl) Update(testing *models.Testing) error

type VariableSetColl added in v1.9.9

type VariableSetColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewVariableSetColl added in v1.9.9

func NewVariableSetColl() *VariableSetColl

func (*VariableSetColl) Create added in v1.9.9

func (c *VariableSetColl) Create(args *models.VariableSet) error

func (*VariableSetColl) Delete added in v1.9.9

func (c *VariableSetColl) Delete(id string) error

func (*VariableSetColl) EnsureIndex added in v1.9.9

func (c *VariableSetColl) EnsureIndex(ctx context.Context) error

func (*VariableSetColl) Find added in v1.9.9

func (*VariableSetColl) GetCollectionName added in v1.9.9

func (c *VariableSetColl) GetCollectionName() string

func (*VariableSetColl) List added in v1.9.9

func (*VariableSetColl) Update added in v1.9.9

func (c *VariableSetColl) Update(id string, args *models.VariableSet) error

type VariableSetFindOption added in v1.9.9

type VariableSetFindOption struct {
	ID          string `json:"id"`
	PerPage     int    `json:"perPage"`
	Page        int    `json:"page"`
	ProjectName string `json:"projectName"`
}

type WebHookColl

type WebHookColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWebHookColl

func NewWebHookColl() *WebHookColl

func (*WebHookColl) AddReferenceOrCreate

func (c *WebHookColl) AddReferenceOrCreate(owner, repo, address, ref string) (bool, error)

AddReferenceOrCreate updates the existing record by adding a new reference if there is a matching record, otherwise, it will create a new record and return true. It is an atomic operation and is safe cross goroutines (because of the unique index).

func (*WebHookColl) Delete

func (c *WebHookColl) Delete(owner, repo, address string) error

Delete deletes the webhook record

func (*WebHookColl) EnsureIndex

func (c *WebHookColl) EnsureIndex(ctx context.Context) error

func (*WebHookColl) Find added in v1.3.0

func (c *WebHookColl) Find(owner, repo, address string) (*models.WebHook, error)

Find find webhook

func (*WebHookColl) GetCollectionName

func (c *WebHookColl) GetCollectionName() string

func (*WebHookColl) List added in v1.7.0

func (c *WebHookColl) List() ([]*models.WebHook, error)

func (*WebHookColl) RemoveReference

func (c *WebHookColl) RemoveReference(owner, repo, address, ref string) (*models.WebHook, error)

RemoveReference removes a reference in the webhook record

func (*WebHookColl) Update added in v1.3.0

func (c *WebHookColl) Update(owner, repo, address, hookID string) error

Update update hookID

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 WebHookUserOption struct {
	Email    string
	UserName string
}

type WorkFlowOptions added in v1.9.9

type WorkFlowOptions struct {
	ProjectName  string
	WorkflowName string
}

type WorkFlowTaskFilter added in v1.9.9

type WorkFlowTaskFilter struct {
	WorkflowName string   `json:"workflow_name"`
	ProjectName  string   `json:"project_name"`
	JobName      string   `json:"job_name"`
	StartTime    int64    `json:"start_time"`
	EndTime      int64    `json:"end_time"`
	Creator      []string `json:"creator"`
	Service      []string `json:"service"`
	Env          []string `json:"env"`
	Status       []string `json:"status"`
}

type WorkLoadsStatColl added in v1.5.0

type WorkLoadsStatColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWorkLoadsStatColl added in v1.5.0

func NewWorkLoadsStatColl() *WorkLoadsStatColl

func (*WorkLoadsStatColl) Create added in v1.5.0

func (c *WorkLoadsStatColl) Create(args *models.WorkloadStat) error

func (*WorkLoadsStatColl) EnsureIndex added in v1.5.0

func (c *WorkLoadsStatColl) EnsureIndex(ctx context.Context) error

func (*WorkLoadsStatColl) Find added in v1.5.0

func (c *WorkLoadsStatColl) Find(clusterID string, namespace string) (*models.WorkloadStat, error)

func (*WorkLoadsStatColl) FindByProductName added in v1.5.0

func (c *WorkLoadsStatColl) FindByProductName(productName string) ([]*models.WorkloadStat, error)

func (*WorkLoadsStatColl) GetCollectionName added in v1.5.0

func (c *WorkLoadsStatColl) GetCollectionName() string

func (*WorkLoadsStatColl) UpdateWorkloads added in v1.5.0

func (c *WorkLoadsStatColl) UpdateWorkloads(args *models.WorkloadStat) error

type Workflow added in v1.9.9

type Workflow struct {
	Name        string `json:"name"`
	ProjectName string `json:"projectName"`
}

type WorkflowColl

type WorkflowColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWorkflowColl

func NewWorkflowColl() *WorkflowColl

func (*WorkflowColl) BulkCreate added in v1.9.9

func (c *WorkflowColl) BulkCreate(args []*models.Workflow) error

func (*WorkflowColl) Count added in v1.9.0

func (c *WorkflowColl) Count() (int64, error)

func (*WorkflowColl) Create

func (c *WorkflowColl) Create(args *models.Workflow) error

func (*WorkflowColl) Delete

func (c *WorkflowColl) Delete(name string) error

func (*WorkflowColl) EnsureIndex

func (c *WorkflowColl) EnsureIndex(ctx context.Context) error

func (*WorkflowColl) Find

func (c *WorkflowColl) Find(name string) (*models.Workflow, error)

func (*WorkflowColl) GetCollectionName

func (c *WorkflowColl) GetCollectionName() string

func (*WorkflowColl) List

func (c *WorkflowColl) List(opt *ListWorkflowOption) ([]*models.Workflow, error)

func (*WorkflowColl) ListByCursor added in v1.9.9

func (c *WorkflowColl) ListByCursor(opt *ListWorkflowOption) (*mongo.Cursor, error)

func (*WorkflowColl) ListByTestName

func (c *WorkflowColl) ListByTestName(testName string) ([]*models.Workflow, error)

func (*WorkflowColl) ListByWorkflows added in v1.9.9

func (c *WorkflowColl) ListByWorkflows(opt ListWorkflowOpt) ([]*models.Workflow, error)

func (*WorkflowColl) ListWithScheduleEnabled

func (c *WorkflowColl) ListWithScheduleEnabled() ([]*models.Workflow, error)

func (*WorkflowColl) ListWorkflowsByProjects added in v1.7.0

func (c *WorkflowColl) ListWorkflowsByProjects(projects []string) ([]*models.Workflow, error)

func (*WorkflowColl) Replace

func (c *WorkflowColl) Replace(args *models.Workflow) error

type WorkflowQueueColl added in v1.9.9

type WorkflowQueueColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWorkflowQueueColl added in v1.9.9

func NewWorkflowQueueColl() *WorkflowQueueColl

func (*WorkflowQueueColl) Create added in v1.9.9

func (c *WorkflowQueueColl) Create(args *models.WorkflowQueue) error

func (*WorkflowQueueColl) Delete added in v1.9.9

func (c *WorkflowQueueColl) Delete(args *models.WorkflowQueue) error

func (*WorkflowQueueColl) EnsureIndex added in v1.9.9

func (c *WorkflowQueueColl) EnsureIndex(ctx context.Context) error

func (*WorkflowQueueColl) GetCollectionName added in v1.9.9

func (c *WorkflowQueueColl) GetCollectionName() string

func (*WorkflowQueueColl) List added in v1.9.9

func (*WorkflowQueueColl) Update added in v1.9.9

func (c *WorkflowQueueColl) Update(args *models.WorkflowQueue) error

type WorkflowStatArgs

type WorkflowStatArgs struct {
	Names []string
	Type  string
}

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

type WorkflowTaskv4Coll added in v1.9.9

type WorkflowTaskv4Coll struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewworkflowTaskv4Coll added in v1.9.9

func NewworkflowTaskv4Coll() *WorkflowTaskv4Coll

func (*WorkflowTaskv4Coll) ArchiveHistoryWorkflowTask added in v1.9.9

func (c *WorkflowTaskv4Coll) ArchiveHistoryWorkflowTask(workflowName string, remain, remainDays int) error

func (*WorkflowTaskv4Coll) Create added in v1.9.9

func (c *WorkflowTaskv4Coll) Create(obj *models.WorkflowTask) (string, error)

func (*WorkflowTaskv4Coll) DeleteByWorkflowName added in v1.9.9

func (c *WorkflowTaskv4Coll) DeleteByWorkflowName(workflowName string) error

func (*WorkflowTaskv4Coll) EnsureIndex added in v1.9.9

func (c *WorkflowTaskv4Coll) EnsureIndex(ctx context.Context) error

func (*WorkflowTaskv4Coll) Find added in v1.9.9

func (c *WorkflowTaskv4Coll) Find(workflowName string, taskID int64) (*models.WorkflowTask, error)

func (*WorkflowTaskv4Coll) FindPreviousTask added in v1.9.9

func (c *WorkflowTaskv4Coll) FindPreviousTask(workflowName, username string) (*models.WorkflowTask, error)

func (*WorkflowTaskv4Coll) FindTodoTasksByWorkflowName added in v1.9.9

func (c *WorkflowTaskv4Coll) FindTodoTasksByWorkflowName(workflowName string) ([]*models.WorkflowTask, error)

func (*WorkflowTaskv4Coll) GetByID added in v1.9.9

func (c *WorkflowTaskv4Coll) GetByID(idstring string) (*models.WorkflowTask, error)

func (*WorkflowTaskv4Coll) GetCollectionName added in v1.9.9

func (c *WorkflowTaskv4Coll) GetCollectionName() string

func (*WorkflowTaskv4Coll) GetLatest added in v1.9.9

func (c *WorkflowTaskv4Coll) GetLatest(workflowName string) (*models.WorkflowTask, error)

func (*WorkflowTaskv4Coll) InCompletedTasks added in v1.9.9

func (c *WorkflowTaskv4Coll) InCompletedTasks() ([]*models.WorkflowTask, error)

func (*WorkflowTaskv4Coll) List added in v1.9.9

func (*WorkflowTaskv4Coll) ListByCursor added in v1.9.9

func (c *WorkflowTaskv4Coll) ListByCursor(opt *ListWorkflowTaskV4Option) (*mongo.Cursor, error)

func (*WorkflowTaskv4Coll) ListByFilter added in v1.9.9

func (c *WorkflowTaskv4Coll) ListByFilter(filter *WorkFlowTaskFilter, pageNum, pageSize int64) ([]*models.WorkflowTask, int64, error)

func (*WorkflowTaskv4Coll) ListCreator added in v1.9.9

func (c *WorkflowTaskv4Coll) ListCreator(projectName, name string) ([]string, error)

func (*WorkflowTaskv4Coll) Update added in v1.9.9

func (c *WorkflowTaskv4Coll) Update(idString string, obj *models.WorkflowTask) error

type WorkflowTemplateListOption added in v1.9.9

type WorkflowTemplateListOption struct {
	CreatedBy      string
	Category       string
	ExcludeBuildIn bool
}

type WorkflowTemplateQueryOption added in v1.9.9

type WorkflowTemplateQueryOption struct {
	ID   string
	Name string
}

type WorkflowV3Coll added in v1.8.0

type WorkflowV3Coll struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWorkflowV3Coll added in v1.8.0

func NewWorkflowV3Coll() *WorkflowV3Coll

func (*WorkflowV3Coll) Create added in v1.8.0

func (c *WorkflowV3Coll) Create(obj *models.WorkflowV3) (string, error)

func (*WorkflowV3Coll) DeleteByID added in v1.8.0

func (c *WorkflowV3Coll) DeleteByID(idString string) error

func (*WorkflowV3Coll) EnsureIndex added in v1.8.0

func (c *WorkflowV3Coll) EnsureIndex(ctx context.Context) error

func (*WorkflowV3Coll) Find added in v1.8.0

func (c *WorkflowV3Coll) Find(name string) (*models.WorkflowV3, error)

func (*WorkflowV3Coll) GetByID added in v1.8.0

func (c *WorkflowV3Coll) GetByID(idstring string) (*models.WorkflowV3, error)

func (*WorkflowV3Coll) GetCollectionName added in v1.8.0

func (c *WorkflowV3Coll) GetCollectionName() string

func (*WorkflowV3Coll) List added in v1.8.0

func (c *WorkflowV3Coll) List(opt *ListWorkflowV3Option, pageNum, pageSize int64) ([]*models.WorkflowV3, int64, error)

func (*WorkflowV3Coll) Update added in v1.8.0

func (c *WorkflowV3Coll) Update(idString string, obj *models.WorkflowV3) error

type WorkflowV4 added in v1.9.9

type WorkflowV4 struct {
	Name        string `json:"name"`
	ProjectName string `json:"projectName"`
}

type WorkflowV4Coll added in v1.9.9

type WorkflowV4Coll struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWorkflowV4Coll added in v1.9.9

func NewWorkflowV4Coll() *WorkflowV4Coll

func (*WorkflowV4Coll) BulkCreate added in v1.9.9

func (c *WorkflowV4Coll) BulkCreate(args []*models.WorkflowV4) error

func (*WorkflowV4Coll) Count added in v1.9.9

func (c *WorkflowV4Coll) Count() (int64, error)

func (*WorkflowV4Coll) Create added in v1.9.9

func (c *WorkflowV4Coll) Create(obj *models.WorkflowV4) (string, error)

func (*WorkflowV4Coll) DeleteByID added in v1.9.9

func (c *WorkflowV4Coll) DeleteByID(idString string) error

func (*WorkflowV4Coll) EnsureIndex added in v1.9.9

func (c *WorkflowV4Coll) EnsureIndex(ctx context.Context) error

func (*WorkflowV4Coll) Find added in v1.9.9

func (c *WorkflowV4Coll) Find(name string) (*models.WorkflowV4, error)

func (*WorkflowV4Coll) FindByOptions added in v1.9.9

func (c *WorkflowV4Coll) FindByOptions(opts WorkFlowOptions) (*models.WorkflowV4, error)

func (*WorkflowV4Coll) GetByID added in v1.9.9

func (c *WorkflowV4Coll) GetByID(idstring string) (*models.WorkflowV4, error)

func (*WorkflowV4Coll) GetCollectionName added in v1.9.9

func (c *WorkflowV4Coll) GetCollectionName() string

func (*WorkflowV4Coll) GetJobNameList added in v1.9.9

func (c *WorkflowV4Coll) GetJobNameList(projectName, workflowName, jobType string) ([]string, error)

func (*WorkflowV4Coll) List added in v1.9.9

func (c *WorkflowV4Coll) List(opt *ListWorkflowV4Option, pageNum, pageSize int64) ([]*models.WorkflowV4, int64, error)

func (*WorkflowV4Coll) ListByCursor added in v1.9.9

func (c *WorkflowV4Coll) ListByCursor(opt *ListWorkflowV4Option) (*mongo.Cursor, error)

func (*WorkflowV4Coll) ListByProjectNames added in v1.9.9

func (c *WorkflowV4Coll) ListByProjectNames(projects []string) ([]*models.WorkflowV4, error)

func (*WorkflowV4Coll) ListByWorkflows added in v1.9.9

func (c *WorkflowV4Coll) ListByWorkflows(opt ListWorkflowV4Opt) ([]*models.WorkflowV4, error)

func (*WorkflowV4Coll) SetCustomFields added in v1.9.9

func (c *WorkflowV4Coll) SetCustomFields(opts SetCustomFieldsOptions, args *models.CustomField) error

func (*WorkflowV4Coll) Update added in v1.9.9

func (c *WorkflowV4Coll) Update(idString string, obj *models.WorkflowV4) error

type WorkflowV4TemplateColl added in v1.9.9

type WorkflowV4TemplateColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWorkflowV4TemplateColl added in v1.9.9

func NewWorkflowV4TemplateColl() *WorkflowV4TemplateColl

func (*WorkflowV4TemplateColl) Create added in v1.9.9

func (*WorkflowV4TemplateColl) DeleteByID added in v1.9.9

func (c *WorkflowV4TemplateColl) DeleteByID(idStr string) error

func (*WorkflowV4TemplateColl) DeleteInternalByName added in v1.9.9

func (c *WorkflowV4TemplateColl) DeleteInternalByName(name string) error

func (*WorkflowV4TemplateColl) EnsureIndex added in v1.9.9

func (c *WorkflowV4TemplateColl) EnsureIndex(ctx context.Context) error

func (*WorkflowV4TemplateColl) Find added in v1.9.9

func (*WorkflowV4TemplateColl) GetCollectionName added in v1.9.9

func (c *WorkflowV4TemplateColl) GetCollectionName() string

func (*WorkflowV4TemplateColl) List added in v1.9.9

func (*WorkflowV4TemplateColl) ListByCursor added in v1.9.9

func (*WorkflowV4TemplateColl) Update added in v1.9.9

func (*WorkflowV4TemplateColl) UpsertByName added in v1.9.9

func (c *WorkflowV4TemplateColl) UpsertByName(obj *models.WorkflowV4Template) error

type WorkflowViewColl added in v1.9.9

type WorkflowViewColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewWorkflowViewColl added in v1.9.9

func NewWorkflowViewColl() *WorkflowViewColl

func (*WorkflowViewColl) Create added in v1.9.9

func (c *WorkflowViewColl) Create(args *models.WorkflowView) error

func (*WorkflowViewColl) DeleteByID added in v1.9.9

func (c *WorkflowViewColl) DeleteByID(idString string) error

func (*WorkflowViewColl) EnsureIndex added in v1.9.9

func (c *WorkflowViewColl) EnsureIndex(ctx context.Context) error

func (*WorkflowViewColl) Find added in v1.9.9

func (c *WorkflowViewColl) Find(projectName, viewName string) (*models.WorkflowView, error)

func (*WorkflowViewColl) FindByID added in v1.9.9

func (c *WorkflowViewColl) FindByID(idString string) (*models.WorkflowView, error)

func (*WorkflowViewColl) GetCollectionName added in v1.9.9

func (c *WorkflowViewColl) GetCollectionName() string

func (*WorkflowViewColl) ListByProject added in v1.9.9

func (c *WorkflowViewColl) ListByProject(projectName string) ([]*models.WorkflowView, error)

func (*WorkflowViewColl) ListNamesByProject added in v1.9.9

func (c *WorkflowViewColl) ListNamesByProject(projectName string) ([]string, error)

func (*WorkflowViewColl) Update added in v1.9.9

func (c *WorkflowViewColl) Update(args *models.WorkflowView) error

type YamlTemplateColl added in v1.6.0

type YamlTemplateColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewYamlTemplateColl added in v1.6.0

func NewYamlTemplateColl() *YamlTemplateColl

func (*YamlTemplateColl) Create added in v1.6.0

func (c *YamlTemplateColl) Create(obj *models.YamlTemplate) error

func (*YamlTemplateColl) DeleteByID added in v1.6.0

func (c *YamlTemplateColl) DeleteByID(idstring string) error

func (*YamlTemplateColl) EnsureIndex added in v1.6.0

func (c *YamlTemplateColl) EnsureIndex(ctx context.Context) error

func (*YamlTemplateColl) GetById added in v1.6.0

func (c *YamlTemplateColl) GetById(idstring string) (*models.YamlTemplate, error)

func (*YamlTemplateColl) GetByName added in v1.9.9

func (c *YamlTemplateColl) GetByName(name string) (*models.YamlTemplate, error)

func (*YamlTemplateColl) GetCollectionName added in v1.6.0

func (c *YamlTemplateColl) GetCollectionName() string

func (*YamlTemplateColl) List added in v1.6.0

func (c *YamlTemplateColl) List(pageNum, pageSize int) ([]*models.YamlTemplate, int, error)

func (*YamlTemplateColl) Update added in v1.6.0

func (c *YamlTemplateColl) Update(idString string, obj *models.YamlTemplate) error

func (*YamlTemplateColl) UpdateVariable added in v1.9.9

func (c *YamlTemplateColl) UpdateVariable(idString string, variable string, serviceVariableKVs []*commontypes.ServiceVariableKV) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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