models

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageFromKoderover = "koderover"
	ImageFromCustom    = "custom"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRule added in v1.9.9

type ActionRule struct {
	Method          string      `bson:"method"                     json:"method"`
	Endpoint        string      `bson:"endpoint"                   json:"endpoint"`
	ResourceType    string      `bson:"resource_type,omitempty"    json:"resourceType,omitempty"`
	IDRegex         string      `bson:"id_regex,omitempty"         json:"idRegex,omitempty"`
	MatchAttributes []Attribute `bson:"match_attributes,omitempty" json:"matchAttributes,omitempty"`
}

type Attribute added in v1.9.9

type Attribute struct {
	Key   string `bson:"key"   json:"key"`
	Value string `bson:"value" json:"value"`
}

type BasicImage added in v1.9.9

type BasicImage struct {
	ID         primitive.ObjectID `bson:"_id,omitempty"          json:"id,omitempty"`
	Value      string             `bson:"value"                  json:"value"`
	Label      string             `bson:"label"                  json:"label"`
	ImageFrom  string             `bson:"image_from"             json:"image_from"`
	CreateTime int64              `bson:"create_time"            json:"create_time"`
	UpdateTime int64              `bson:"update_time"            json:"update_time"`
	UpdateBy   string             `bson:"update_by"              json:"update_by"`
	// New field since 1.12
	// ImageType is the type of the image, currently only one type is supported called sonar
	ImageType string `bson:"image_type" json:"image_type"`
}

BasicImage ...

func (BasicImage) TableName added in v1.9.9

func (BasicImage) TableName() string

type Build added in v1.9.9

type Build struct {
	ID          primitive.ObjectID `bson:"_id,omitempty"                json:"id,omitempty"`
	Name        string             `bson:"name"                         json:"name"`
	ProductName string             `bson:"product_name"                 json:"product_name"`
	PreBuild    *PreBuild          `bson:"pre_build"                    json:"pre_build"`
	Timeout     int                `bson:"timeout"                      json:"timeout"`
	// TODO: Deprecated.
	Caches []string `bson:"caches"                        json:"caches"`

	// New since V1.10.0.
	CacheEnable  bool               `bson:"cache_enable"        json:"cache_enable"`
	CacheDirType types.CacheDirType `bson:"cache_dir_type"      json:"cache_dir_type"`
	CacheUserDir string             `bson:"cache_user_dir"      json:"cache_user_dir"`
	// New since V1.10.0. Only to tell the webpage should the advanced settings be displayed
	AdvancedSettingsModified bool          `bson:"advanced_setting_modified"     json:"advanced_setting_modified"`
	JenkinsBuild             *JenkinsBuild `bson:"jenkins_build,omitempty"       json:"jenkins_build,omitempty"`
}

func (Build) TableName added in v1.9.9

func (Build) TableName() string

type CodeHost

type CodeHost struct {
	ID          int    `bson:"id"                   json:"id"`
	Type        string `bson:"type"                 json:"type"`
	Address     string `bson:"address"              json:"address"`
	Namespace   string `bson:"namespace"            json:"namespace"`
	AccessToken string `bson:"access_token"         json:"accessToken"`
	EnableProxy bool   `bson:"enable_proxy"         json:"enable_proxy"`
	Alias       string `bson:"alias"                json:"alias"`
	Username    string `bson:"username"             json:"username"`
	AccessKey   string `bson:"application_id"       json:"application_id"`
}

func (CodeHost) TableName

func (CodeHost) TableName() string

type Container added in v1.8.0

type Container struct {
	Name      string         `bson:"name"           json:"name"`
	Image     string         `bson:"image"          json:"image"`
	ImagePath *ImagePathSpec `bson:"image_path,omitempty"          json:"imagePath,omitempty"`
}

type EmailHost added in v1.8.0

type EmailHost struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"           json:"id,omitempty"`
	Name      string             `bson:"name"       json:"name"`
	Port      int                `bson:"port"       json:"port"`
	Username  string             `bson:"username"   json:"username"`
	Password  string             `bson:"password"   json:"password"`
	IsTLS     interface{}        `bson:"is_tls"     json:"isTLS"`
	CreatedAt int64              `bson:"created_at" json:"created_at"`
	DeletedAt int64              `bson:"deleted_at" json:"deleted_at"`
	UpdatedAt int64              `bson:"updated_at" json:"updated_at"`
}

func (EmailHost) TableName added in v1.8.0

func (EmailHost) TableName() string

type EnvConfig added in v1.8.0

type EnvConfig struct {
	EnvName string   `bson:"env_name,omitempty" json:"env_name"`
	HostIDs []string `bson:"host_ids,omitempty" json:"host_ids"`
	Labels  []string `bson:"labels,omitempty"   json:"labels"`
}

type EnvConfigMap added in v1.9.9

type EnvConfigMap struct {
	ID             primitive.ObjectID `bson:"_id,omitempty"             json:"id,omitempty"`
	ProductName    string             `bson:"product_name"              json:"product_name"`
	CreateTime     int64              `bson:"create_time"               json:"create_time"`
	UpdateUserName string             `bson:"update_user_name"          json:"update_user_name"`
	Namespace      string             `bson:"namespace,omitempty"       json:"namespace,omitempty"`
	EnvName        string             `bson:"env_name"                  json:"env_name"`
	Name           string             `bson:"name"                      json:"name"`
	YamlData       string             `bson:"yaml_data"                 json:"yaml_data"`
}

func (EnvConfigMap) TableName added in v1.9.9

func (EnvConfigMap) TableName() string

type EnvIngress added in v1.9.9

type EnvIngress struct {
	ID             primitive.ObjectID `bson:"_id,omitempty"             json:"id,omitempty"`
	ProductName    string             `bson:"product_name"              json:"product_name"`
	CreateTime     int64              `bson:"create_time"               json:"create_time"`
	UpdateUserName string             `bson:"update_user_name"          json:"update_user_name"`
	Namespace      string             `bson:"namespace,omitempty"       json:"namespace,omitempty"`
	Status         string             `bson:"status"                    json:"status"`
	EnvName        string             `bson:"env_name"                  json:"env_name"`
	Name           string             `bson:"name"                      json:"name"`
	YamlData       string             `bson:"yaml_data"                 json:"yaml_data"`
}

func (EnvIngress) TableName added in v1.9.9

func (EnvIngress) TableName() string

type EnvPvc added in v1.9.9

type EnvPvc struct {
	ID             primitive.ObjectID `bson:"_id,omitempty"             json:"id,omitempty"`
	ProductName    string             `bson:"product_name"              json:"product_name"`
	CreateTime     int64              `bson:"create_time"               json:"create_time"`
	UpdateUserName string             `bson:"update_user_name"          json:"update_user_name"`
	Namespace      string             `bson:"namespace,omitempty"       json:"namespace,omitempty"`
	Status         string             `bson:"status"                    json:"status"`
	EnvName        string             `bson:"env_name"                  json:"env_name"`
	Name           string             `bson:"name"                      json:"name"`
	YamlData       string             `bson:"yaml_data"                 json:"yaml_data"`
}

func (EnvPvc) TableName added in v1.9.9

func (EnvPvc) TableName() string

type EnvResource added in v1.9.9

type EnvResource struct {
	ID             primitive.ObjectID `bson:"_id,omitempty"             json:"id,omitempty"`
	Type           string             `bson:"type"                      json:"type"`
	ProductName    string             `bson:"product_name"              json:"product_name"`
	CreateTime     int64              `bson:"create_time"               json:"create_time"`
	UpdateUserName string             `bson:"update_user_name"          json:"update_user_name"`
	Namespace      string             `bson:"namespace,omitempty"       json:"namespace,omitempty"`
	Status         string             `bson:"status"                    json:"status"`
	DeletedAt      int64              `bson:"deleted_at"                json:"deleted_at" `
	EnvName        string             `bson:"env_name"                  json:"env_name"`
	Name           string             `bson:"name"                      json:"name"`
	YamlData       string             `bson:"yaml_data"                 json:"yaml_data"`
}

func (EnvResource) TableName added in v1.9.9

func (EnvResource) TableName() string

type EnvSecret added in v1.9.9

type EnvSecret struct {
	ID             primitive.ObjectID `bson:"_id,omitempty"             json:"id,omitempty"`
	ProductName    string             `bson:"product_name"              json:"product_name"`
	CreateTime     int64              `bson:"create_time"               json:"create_time"`
	UpdateUserName string             `bson:"update_user_name"          json:"update_user_name"`
	Namespace      string             `bson:"namespace,omitempty"       json:"namespace,omitempty"`
	Status         string             `bson:"status"                    json:"status"`
	EnvName        string             `bson:"env_name"                  json:"env_name"`
	Name           string             `bson:"name"                      json:"name"`
	YamlData       string             `bson:"yaml_data"                 json:"yaml_data"`
}

func (EnvSecret) TableName added in v1.9.9

func (EnvSecret) TableName() string

type ImagePathSpec added in v1.8.0

type ImagePathSpec struct {
	Repo  string `bson:"repo,omitempty"           json:"repo,omitempty"`
	Image string `bson:"image,omitempty"           json:"image,omitempty"`
	Tag   string `bson:"tag,omitempty"           json:"tag,omitempty"`
}

ImagePathSpec paths in yaml used to parse image

type JenkinsBuild added in v1.9.9

type JenkinsBuild struct {
	JenkinsID         string                     `bson:"jenkins_id"          json:"jenkins_id"`
	JobName           string                     `bson:"job_name"            json:"job_name"`
	JenkinsBuildParam []*types.JenkinsBuildParam `bson:"jenkins_build_param" json:"jenkins_build_params"`
}

type JenkinsIntegration added in v1.9.9

type JenkinsIntegration struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"         json:"id,omitempty"`
	URL       string             `bson:"url"                   json:"url"`
	Username  string             `bson:"username"              json:"username"`
	Password  string             `bson:"password"              json:"password"`
	UpdateBy  string             `bson:"update_by"             json:"update_by"`
	UpdatedAt int64              `bson:"updated_at"            json:"updated_at"`
}

func (JenkinsIntegration) TableName added in v1.9.9

func (j JenkinsIntegration) TableName() string

type K8SCluster added in v1.8.0

type K8SCluster struct {
	ID     primitive.ObjectID       `json:"id,omitempty"              bson:"_id,omitempty"`
	Name   string                   `json:"name"                      bson:"name"`
	Status setting.K8SClusterStatus `json:"status"                    bson:"status"`
	Local  bool                     `json:"local"                     bson:"local"`
}

func (K8SCluster) TableName added in v1.8.0

func (K8SCluster) TableName() string

type MainHookRepo added in v1.9.9

type MainHookRepo struct {
	Name         string                 `bson:"name,omitempty"            json:"name,omitempty"`
	Description  string                 `bson:"description,omitempty"     json:"description,omitempty"`
	Source       string                 `bson:"source,omitempty"          json:"source,omitempty"`
	RepoOwner    string                 `bson:"repo_owner"                json:"repo_owner"`
	RepoName     string                 `bson:"repo_name"                 json:"repo_name"`
	Branch       string                 `bson:"branch"                    json:"branch"`
	Tag          string                 `bson:"tag"                       json:"tag"`
	Committer    string                 `bson:"committer"                 json:"committer"`
	MatchFolders []string               `bson:"match_folders"             json:"match_folders,omitempty"`
	CodehostID   int                    `bson:"codehost_id"               json:"codehost_id"`
	Events       []config.HookEventType `bson:"events"                    json:"events"`
	Label        string                 `bson:"label"                     json:"label"`
	Revision     string                 `bson:"revision"                  json:"revision"`
	IsRegular    bool                   `bson:"is_regular"                json:"is_regular"`
}

type MatchAttribute added in v1.9.9

type MatchAttribute struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type NotifyCtl added in v1.9.9

type NotifyCtl struct {
	Enabled         bool     `bson:"enabled"                          json:"enabled"`
	WebHookType     string   `bson:"webhook_type"                     json:"webhook_type"`
	WeChatWebHook   string   `bson:"weChat_webHook,omitempty"         json:"weChat_webHook,omitempty"`
	DingDingWebHook string   `bson:"dingding_webhook,omitempty"       json:"dingding_webhook,omitempty"`
	FeiShuWebHook   string   `bson:"feishu_webhook,omitempty"         json:"feishu_webhook,omitempty"`
	AtMobiles       []string `bson:"at_mobiles,omitempty"             json:"at_mobiles,omitempty"`
	IsAtAll         bool     `bson:"is_at_all,omitempty"              json:"is_at_all,omitempty"`
	NotifyTypes     []string `bson:"notify_type"                      json:"notify_type"`
}

type Organization

type Organization struct {
	ID    int    `bson:"id"              json:"id"`
	Token string `bson:"token,omitempty" json:"token,omitempty"`
}

func (Organization) TableName

func (Organization) TableName() string

type PolicyMeta added in v1.9.9

type PolicyMeta struct {
	Resource    string            `bson:"resource"    json:"resource"`
	Alias       string            `bson:"alias"       json:"alias"`
	Description string            `bson:"description" json:"description"`
	Rules       []*PolicyMetaRule `bson:"rules"       json:"rules"`
}

type PolicyMetaRule added in v1.9.9

type PolicyMetaRule struct {
	Action      string        `bson:"action"      json:"action"`
	Alias       string        `bson:"alias"       json:"alias"`
	Description string        `bson:"description" json:"description"`
	Rules       []*ActionRule `bson:"rules"       json:"rules"`
}

type PreBuild added in v1.9.9

type PreBuild struct {
	ClusterID string          `bson:"cluster_id"             json:"cluster_id"`
	ResReq    setting.Request `bson:"res_req"                json:"res_req"`
	// TODO: Deprecated.
	CleanWorkspace bool `bson:"clean_workspace"            json:"clean_workspace"`
}

PreBuild prepares an environment for a job

type PreTest added in v1.9.9

type PreTest struct {
	ClusterID string          `bson:"cluster_id"             json:"cluster_id"`
	ResReq    setting.Request `bson:"res_req"                json:"res_req"`
	// TODO: Deprecated.
	CleanWorkspace bool `bson:"clean_workspace"            json:"clean_workspace"`
}

PreTest prepares an environment for a job

type Product added in v1.8.0

type Product struct {
	ID              primitive.ObjectID            `bson:"_id,omitempty"             json:"id,omitempty"`
	ProductName     string                        `bson:"product_name"              json:"product_name"`
	CreateTime      int64                         `bson:"create_time"               json:"create_time"`
	UpdateTime      int64                         `bson:"update_time"               json:"update_time"`
	Namespace       string                        `bson:"namespace,omitempty"       json:"namespace,omitempty"`
	Status          string                        `bson:"status"                    json:"status"`
	Revision        int64                         `bson:"revision"                  json:"revision"`
	Enabled         bool                          `bson:"enabled"                   json:"enabled"`
	EnvName         string                        `bson:"env_name"                  json:"env_name"`
	UpdateBy        string                        `bson:"update_by"                 json:"update_by"`
	Auth            []*ProductAuth                `bson:"auth"                      json:"auth"`
	Visibility      string                        `bson:"-"                         json:"visibility"`
	Services        [][]*ProductService           `bson:"services"                  json:"services"`
	Render          *RenderInfo                   `bson:"render"                    json:"render"`
	Error           string                        `bson:"error"                     json:"error"`
	Vars            []*templatemodels.RenderKV    `bson:"vars,omitempty"            json:"vars,omitempty"`
	ChartInfos      []*templatemodels.RenderChart `bson:"-"                         json:"chart_infos,omitempty"`
	IsPublic        bool                          `bson:"is_public"                 json:"isPublic"`
	RoleIDs         []int64                       `bson:"role_ids"                  json:"roleIds"`
	ClusterID       string                        `bson:"cluster_id,omitempty"      json:"cluster_id,omitempty"`
	RecycleDay      int                           `bson:"recycle_day"               json:"recycle_day"`
	Source          string                        `bson:"source"                    json:"source"`
	IsOpenSource    bool                          `bson:"is_opensource"             json:"is_opensource"`
	RegistryID      string                        `bson:"registry_id"               json:"registry_id"`
	IsForkedProduct bool                          `bson:"-"                         json:"-"`
}

Vars do not save, only input parameters

func (*Product) GetGroupServiceNames added in v1.8.0

func (p *Product) GetGroupServiceNames() [][]string

func (*Product) GetNamespace added in v1.8.0

func (p *Product) GetNamespace() string

func (*Product) GetServiceMap added in v1.8.0

func (p *Product) GetServiceMap() map[string]*ProductService

func (Product) TableName added in v1.8.0

func (Product) TableName() string

type ProductAuth added in v1.8.0

type ProductAuth struct {
	Type        ProductAuthType     `bson:"type"          json:"type"`
	Name        string              `bson:"name"          json:"name"`
	Permissions []ProductPermission `bson:"permissions"   json:"permissions"`
}

type ProductAuthType added in v1.8.0

type ProductAuthType string

type ProductPermission added in v1.8.0

type ProductPermission string

type ProductService added in v1.8.0

type ProductService struct {
	ServiceName string       `bson:"service_name"               json:"service_name"`
	ProductName string       `bson:"product_name"               json:"product_name"`
	Type        string       `bson:"type"                       json:"type"`
	Revision    int64        `bson:"revision"                   json:"revision"`
	Containers  []*Container `bson:"containers"                 json:"containers,omitempty"`
	Render      *RenderInfo  `bson:"render,omitempty"           json:"render,omitempty"` // Record the render information of each service to facilitate the update of a single service
	EnvConfigs  []*EnvConfig `bson:"-"                          json:"env_configs,omitempty"`
}

type Project added in v1.8.0

type Project struct {
	ProductName string `bson:"product_name"              json:"product_name"`
}

func (Project) TableName added in v1.8.0

func (Project) TableName() string

type ProjectClusterRelation added in v1.8.0

type ProjectClusterRelation struct {
	ID          primitive.ObjectID `json:"id,omitempty"              bson:"_id,omitempty"`
	ProjectName string             `json:"project_name"              bson:"project_name"`
	ClusterID   string             `json:"cluster_id"                bson:"cluster_id"`
	CreatedAt   int64              `json:"createdAt"                 bson:"createdAt"`
	CreatedBy   string             `json:"createdBy"                 bson:"createdBy"`
}

func (ProjectClusterRelation) TableName added in v1.8.0

func (ProjectClusterRelation) TableName() string

type RegistryNamespace added in v1.8.0

type RegistryNamespace struct {
	ID          primitive.ObjectID `bson:"_id,omitempty"               json:"id,omitempty"`
	RegAddr     string             `bson:"reg_addr"                    json:"reg_addr"`
	RegType     string             `bson:"reg_type"                    json:"reg_type"`
	RegProvider string             `bson:"reg_provider"                json:"reg_provider"`
	IsDefault   bool               `bson:"is_default"                  json:"is_default"`
	Namespace   string             `bson:"namespace"                   json:"namespace"`
	AccessKey   string             `bson:"access_key"                  json:"access_key"`
	SecretKey   string             `bson:"secret_key"                  json:"secret_key"`
	Region      string             `bson:"region,omitempty"            json:"region,omitempty"`
	UpdateTime  int64              `bson:"update_time"                 json:"update_time"`
	UpdateBy    string             `bson:"update_by"                   json:"update_by"`
}

func (RegistryNamespace) TableName added in v1.8.0

func (RegistryNamespace) TableName() string

func (*RegistryNamespace) Validate added in v1.8.0

func (ns *RegistryNamespace) Validate() error

type RenderInfo added in v1.8.0

type RenderInfo struct {
	Name        string `bson:"name"                     json:"name"`
	Revision    int64  `bson:"revision"                 json:"revision"`
	ProductTmpl string `bson:"product_tmpl"             json:"product_tmpl"`
	Description string `bson:"description"              json:"description"`
}

type Role added in v1.9.9

type Role struct {
	Name      string  `bson:"name"      json:"name"`
	Namespace string  `bson:"namespace" json:"namespace"`
	Rules     []*Rule `bson:"rules"     json:"rules"`
}

type RoleBinding added in v1.9.9

type RoleBinding struct {
	Name      string `bson:"name" json:"name"`
	Namespace string `bson:"namespace" json:"namespace"`

	// RoleRef can reference a namespaced or cluster scoped Role.
	RoleRef *RoleRef             `bson:"role_ref" json:"roleRef"`
	Type    setting.ResourceType `bson:"type" json:"type"`
}

type RoleRef added in v1.9.9

type RoleRef struct {
	Name string `bson:"name" json:"name"`

	// Namespace of the referenced object. if the object is cluster scoped, namespace is empty.
	Namespace string `bson:"namespace" json:"namespace"`
}

RoleRef contains information that points to the role being used

type Rule added in v1.9.9

type Rule struct {
	// Verbs is a list of http methods or resource actions that apply to ALL the Resources contained in this rule. '*' represents all methods.
	Verbs           []string         `bson:"verbs"               json:"verbs"`
	Resources       []string         `bson:"resources"           json:"resources"`
	Kind            string           `bson:"kind"                json:"kind"`
	MatchAttributes []MatchAttribute `bson:"match_attributes"    json:"match_attributes"`
}

type ScheduleCtrl added in v1.9.9

type ScheduleCtrl struct {
	Enabled bool `bson:"enabled"    json:"enabled"`
}

type ServiceConfig added in v1.8.0

type ServiceConfig struct {
	ConfigName string `bson:"config_name"           json:"config_name"`
	Revision   int64  `bson:"revision"              json:"revision"`
}

type TestTaskArgs added in v1.9.9

type TestTaskArgs struct {
	ProductName     string `bson:"product_name"            json:"product_name"`
	TestName        string `bson:"test_name"               json:"test_name"`
	TestTaskCreator string `bson:"test_task_creator"       json:"test_task_creator"`
	NotificationID  string `bson:"notification_id"         json:"notification_id"`
	ReqID           string `bson:"req_id"                  json:"req_id"`
	// webhook触发测试任务时,触发任务的repo、prID和commitID
	MergeRequestID string `bson:"merge_request_id" json:"merge_request_id"`
	CommitID       string `bson:"commit_id"        json:"commit_id"`
	Source         string `bson:"source"           json:"source"`
	CodehostID     int    `bson:"codehost_id"      json:"codehost_id"`
	RepoOwner      string `bson:"repo_owner"       json:"repo_owner"`
	RepoName       string `bson:"repo_name"        json:"repo_name"`
}

type Testing added in v1.9.9

type Testing struct {
	ID         primitive.ObjectID `bson:"_id,omitempty"            json:"id,omitempty"`
	PreTest    *PreTest           `bson:"pre_test"                 json:"pre_test"`
	Timeout    int                `bson:"timeout"                  json:"timeout"`
	HookCtl    *TestingHookCtrl   `bson:"hook_ctl"                 json:"hook_ctl"`
	NotifyCtl  *NotifyCtl         `bson:"notify_ctl,omitempty"     json:"notify_ctl,omitempty"`
	NotifyCtls []*NotifyCtl       `bson:"notify_ctls"              json:"notify_ctls"`

	Schedules *ScheduleCtrl `bson:"schedules,omitempty"      json:"schedules,omitempty"`

	ArtifactPaths []string `bson:"artifact_paths,omitempty" json:"artifact_paths,omitempty"`

	// TODO: Deprecated.
	Caches []string `bson:"caches"                   json:"caches"`

	// New since V1.10.0.
	CacheEnable  bool               `bson:"cache_enable"        json:"cache_enable"`
	CacheDirType types.CacheDirType `bson:"cache_dir_type"      json:"cache_dir_type"`
	CacheUserDir string             `bson:"cache_user_dir"      json:"cache_user_dir"`
	// New since V1.10.0. Only to tell the webpage should the advanced settings be displayed
	AdvancedSettingsModified bool `bson:"advanced_setting_modified" json:"advanced_setting_modified"`
}

func (Testing) TableName added in v1.9.9

func (Testing) TableName() string

type TestingHook added in v1.9.9

type TestingHook struct {
	AutoCancel bool          `bson:"auto_cancel" json:"auto_cancel"`
	MainRepo   *MainHookRepo `bson:"main_repo"   json:"main_repo"`
	TestArgs   *TestTaskArgs `bson:"test_args"   json:"test_args"`
}

type TestingHookCtrl added in v1.9.9

type TestingHookCtrl struct {
	Enabled bool           `bson:"enabled" json:"enabled"`
	Items   []*TestingHook `bson:"items" json:"items"`
}

type Workflow added in v1.9.9

type Workflow struct {
	ID              primitive.ObjectID `bson:"_id,omitempty"                json:"id,omitempty"`
	Name            string             `bson:"name"                         json:"name"`
	Enabled         bool               `bson:"enabled"                      json:"enabled"`
	ProductTmplName string             `bson:"product_tmpl_name"            json:"product_tmpl_name"`
	Team            string             `bson:"team,omitempty"               json:"team,omitempty"`
	EnvName         string             `bson:"env_name"                     json:"env_name,omitempty"`
	Description     string             `bson:"description,omitempty"        json:"description,omitempty"`
	UpdateBy        string             `bson:"update_by"                    json:"update_by,omitempty"`
	CreateBy        string             `bson:"create_by"                    json:"create_by,omitempty"`
	UpdateTime      int64              `bson:"update_time"                  json:"update_time"`
	CreateTime      int64              `bson:"create_time"                  json:"create_time"`
	Schedules       *ScheduleCtrl      `bson:"schedules,omitempty"          json:"schedules,omitempty"`
	ScheduleEnabled bool               `bson:"schedule_enabled"             json:"schedule_enabled"`
	// TODO: Deprecated.
	NotifyCtl *NotifyCtl `bson:"notify_ctl,omitempty"         json:"notify_ctl,omitempty"`
	// New since V1.12.0.
	NotifyCtls []*NotifyCtl `bson:"notify_ctls"        json:"notify_ctls"`
	BaseName   string       `bson:"base_name" json:"base_name"`

	// ResetImage indicate whether reset image to original version after completion
	ResetImage bool `bson:"reset_image"                  json:"reset_image"`
	// IsParallel 控制单一工作流的任务是否支持并行处理
	IsParallel bool `json:"is_parallel" bson:"is_parallel"`
}

func (Workflow) TableName added in v1.9.9

func (Workflow) TableName() string

Jump to

Keyboard shortcuts

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