pipeline

package
v0.0.0-...-c01aa29 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUDIT_NOTIFY_MARK_KEY = "AUDIT_NOTIFY_HAS_SEND"
)
View Source
const (
	AppName = "pipeline"
)
View Source
const (
	// 一个pipeline最多可以有少个step
	PIPELINE_MAX_STEPS = 100
)

Variables

View Source
var (
	STEP_STATUS_name = map[int32]string{
		0:  "PENDDING",
		10: "SCHEDULE_FAILED",
		1:  "RUNNING",
		3:  "SUCCEEDED",
		4:  "FAILED",
		5:  "CANCELING",
		6:  "CANCELED",
		7:  "SKIP",
		8:  "AUDITING",
		9:  "REFUSE",
	}
	STEP_STATUS_value = map[string]int32{
		"PENDDING":        0,
		"SCHEDULE_FAILED": 10,
		"RUNNING":         1,
		"SUCCEEDED":       3,
		"FAILED":          4,
		"CANCELING":       5,
		"CANCELED":        6,
		"SKIP":            7,
		"AUDITING":        8,
		"REFUSE":          9,
	}
)

Enum value maps for STEP_STATUS.

View Source
var (
	PIPELINE_STATUS_name = map[int32]string{
		0: "WAITTING",
		1: "EXECUTING",
		2: "COMPLETE",
	}
	PIPELINE_STATUS_value = map[string]int32{
		"WAITTING":  0,
		"EXECUTING": 1,
		"COMPLETE":  2,
	}
)

Enum value maps for PIPELINE_STATUS.

View Source
var (
	PARAM_VALUE_TYPE_name = map[int32]string{
		0: "PLAIN",
		1: "APP_VAR",
		2: "SECRET_REF",
		3: "PASSWORD",
		4: "CRYPTO",
	}
	PARAM_VALUE_TYPE_value = map[string]int32{
		"PLAIN":      0,
		"APP_VAR":    1,
		"SECRET_REF": 2,
		"PASSWORD":   3,
		"CRYPTO":     4,
	}
)

Enum value maps for PARAM_VALUE_TYPE.

View Source
var (
	AUDIT_RESPONSE_name = map[int32]string{
		0: "UOD",
		1: "ALLOW",
		2: "DENY",
	}
	AUDIT_RESPONSE_value = map[string]int32{
		"UOD":   0,
		"ALLOW": 1,
		"DENY":  2,
	}
)

Enum value maps for AUDIT_RESPONSE.

View Source
var (
	STEP_CREATE_BY_name = map[int32]string{
		0: "PIPELINE",
		1: "CRONJOB",
		2: "USER",
	}
	STEP_CREATE_BY_value = map[string]int32{
		"PIPELINE": 0,
		"CRONJOB":  1,
		"USER":     2,
	}
)

Enum value maps for STEP_CREATE_BY.

View Source
var (
	PIPELINE_WATCH_MOD_name = map[int32]string{
		0: "BY_ID",
		1: "BY_NAMESPACE",
	}
	PIPELINE_WATCH_MOD_value = map[string]int32{
		"BY_ID":        0,
		"BY_NAMESPACE": 1,
	}
)

Enum value maps for PIPELINE_WATCH_MOD.

View Source
var File_api_apps_pipeline_pb_pipeline_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infraboard.workflow.pipeline.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePipeline",
			Handler:    _Service_CreatePipeline_Handler,
		},
		{
			MethodName: "QueryPipeline",
			Handler:    _Service_QueryPipeline_Handler,
		},
		{
			MethodName: "DescribePipeline",
			Handler:    _Service_DescribePipeline_Handler,
		},
		{
			MethodName: "DeletePipeline",
			Handler:    _Service_DeletePipeline_Handler,
		},
		{
			MethodName: "CreateStep",
			Handler:    _Service_CreateStep_Handler,
		},
		{
			MethodName: "QueryStep",
			Handler:    _Service_QueryStep_Handler,
		},
		{
			MethodName: "DescribeStep",
			Handler:    _Service_DescribeStep_Handler,
		},
		{
			MethodName: "DeleteStep",
			Handler:    _Service_DeleteStep_Handler,
		},
		{
			MethodName: "CancelStep",
			Handler:    _Service_CancelStep_Handler,
		},
		{
			MethodName: "AuditStep",
			Handler:    _Service_AuditStep_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchPipeline",
			Handler:       _Service_WatchPipeline_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "api/apps/pipeline/pb/pipeline.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func ActionObjectKey

func ActionObjectKey(namespace, name, version string) string

func EtcdActionPrefix

func EtcdActionPrefix() string

func EtcdPipelinePrefix

func EtcdPipelinePrefix() string

func EtcdStepPrefix

func EtcdStepPrefix() string

func PipeLineObjectKey

func PipeLineObjectKey(namespace, id string) string

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

func StepObjectKey

func StepObjectKey(key string) string

Types

type AUDIT_RESPONSE

type AUDIT_RESPONSE int32

AUDIT_RESPONSE 审核结果

const (
	// 未处理
	AUDIT_RESPONSE_UOD AUDIT_RESPONSE = 0
	// 允许执行
	AUDIT_RESPONSE_ALLOW AUDIT_RESPONSE = 1
	// 不允许执行
	AUDIT_RESPONSE_DENY AUDIT_RESPONSE = 2
)

func ParseAUDIT_RESPONSEFromString

func ParseAUDIT_RESPONSEFromString(str string) (AUDIT_RESPONSE, error)

ParseAUDIT_RESPONSEFromString Parse AUDIT_RESPONSE from string

func (AUDIT_RESPONSE) Descriptor

func (AUDIT_RESPONSE) Enum

func (x AUDIT_RESPONSE) Enum() *AUDIT_RESPONSE

func (AUDIT_RESPONSE) EnumDescriptor deprecated

func (AUDIT_RESPONSE) EnumDescriptor() ([]byte, []int)

Deprecated: Use AUDIT_RESPONSE.Descriptor instead.

func (AUDIT_RESPONSE) Equal

func (t AUDIT_RESPONSE) Equal(target AUDIT_RESPONSE) bool

Equal type compare

func (AUDIT_RESPONSE) IsIn

func (t AUDIT_RESPONSE) IsIn(targets ...AUDIT_RESPONSE) bool

IsIn todo

func (AUDIT_RESPONSE) MarshalJSON

func (t AUDIT_RESPONSE) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (AUDIT_RESPONSE) Number

func (AUDIT_RESPONSE) String

func (x AUDIT_RESPONSE) String() string

func (AUDIT_RESPONSE) Type

func (*AUDIT_RESPONSE) UnmarshalJSON

func (t *AUDIT_RESPONSE) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type AuditStepRequest

type AuditStepRequest struct {

	// 取消step对应的key
	// @gotags: json:"key"
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
	// 审核的结果
	// @gotags: json:"audit_reponse"
	AuditReponse AUDIT_RESPONSE `` /* 137-byte string literal not displayed */
	// 审批时的反馈信息
	// @gotags: json:"audit_message"
	AuditMessage string `protobuf:"bytes,3,opt,name=audit_message,json=auditMessage,proto3" json:"audit_message"`
	// contains filtered or unexported fields
}

func NewAuditStepRequest

func NewAuditStepRequest() *AuditStepRequest

func NewAuditStepRequestWithKey

func NewAuditStepRequestWithKey(key string) *AuditStepRequest

func (*AuditStepRequest) Descriptor deprecated

func (*AuditStepRequest) Descriptor() ([]byte, []int)

Deprecated: Use AuditStepRequest.ProtoReflect.Descriptor instead.

func (*AuditStepRequest) GetAuditMessage

func (x *AuditStepRequest) GetAuditMessage() string

func (*AuditStepRequest) GetAuditReponse

func (x *AuditStepRequest) GetAuditReponse() AUDIT_RESPONSE

func (*AuditStepRequest) GetKey

func (x *AuditStepRequest) GetKey() string

func (*AuditStepRequest) ProtoMessage

func (*AuditStepRequest) ProtoMessage()

func (*AuditStepRequest) ProtoReflect

func (x *AuditStepRequest) ProtoReflect() protoreflect.Message

func (*AuditStepRequest) Reset

func (x *AuditStepRequest) Reset()

func (*AuditStepRequest) String

func (x *AuditStepRequest) String() string

type CancelStepRequest

type CancelStepRequest struct {

	// 取消step对应的key
	// @gotags: json:"id"
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"id"`
	// contains filtered or unexported fields
}

func NewCancelStepRequestWithKey

func NewCancelStepRequestWithKey(key string) *CancelStepRequest

func (*CancelStepRequest) Descriptor deprecated

func (*CancelStepRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelStepRequest.ProtoReflect.Descriptor instead.

func (*CancelStepRequest) GetKey

func (x *CancelStepRequest) GetKey() string

func (*CancelStepRequest) ProtoMessage

func (*CancelStepRequest) ProtoMessage()

func (*CancelStepRequest) ProtoReflect

func (x *CancelStepRequest) ProtoReflect() protoreflect.Message

func (*CancelStepRequest) Reset

func (x *CancelStepRequest) Reset()

func (*CancelStepRequest) String

func (x *CancelStepRequest) String() string

type CancelWatchPipelineRequest

type CancelWatchPipelineRequest struct {

	// @gotags: json:"watch_id"
	WatchId int64 `protobuf:"varint,2,opt,name=watch_id,json=watchId,proto3" json:"watch_id"`
	// contains filtered or unexported fields
}

func (*CancelWatchPipelineRequest) Descriptor deprecated

func (*CancelWatchPipelineRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelWatchPipelineRequest.ProtoReflect.Descriptor instead.

func (*CancelWatchPipelineRequest) GetWatchId

func (x *CancelWatchPipelineRequest) GetWatchId() int64

func (*CancelWatchPipelineRequest) ProtoMessage

func (*CancelWatchPipelineRequest) ProtoMessage()

func (*CancelWatchPipelineRequest) ProtoReflect

func (*CancelWatchPipelineRequest) Reset

func (x *CancelWatchPipelineRequest) Reset()

func (*CancelWatchPipelineRequest) String

func (x *CancelWatchPipelineRequest) String() string

type CreatePipelineRequest

type CreatePipelineRequest struct {

	// 模版id
	// @gotags: bson:"template_id" json:"template_id"
	TemplateId string `protobuf:"bytes,8,opt,name=template_id,json=templateId,proto3" json:"template_id" bson:"template_id"`
	// 触发事件
	// @gotags: bson:"hook_event" json:"hook_event"
	HookEvent *scm.WebHookEvent `protobuf:"bytes,9,opt,name=hook_event,json=hookEvent,proto3" json:"hook_event" bson:"hook_event"`
	// 所属域
	// @gotags: bson:"domain" json:"domain" validate:"required"
	Domain string `protobuf:"bytes,10,opt,name=domain,proto3" json:"domain" bson:"domain" validate:"required"`
	// 所属空间
	// @gotags: bson:"namespace" json:"namespace" validate:"required"
	Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace" bson:"namespace" validate:"required"`
	// 创建人
	// @gotags: bson:"create_by" json:"create_by" validate:"required"
	CreateBy string `protobuf:"bytes,12,opt,name=create_by,json=createBy,proto3" json:"create_by" bson:"create_by" validate:"required"`
	// 名称
	// @gotags: bson:"name" json:"name" validate:"required"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name" validate:"required"`
	// 全局参数, Step执行时合并处理
	// @gotags: bson:"with" json:"with"
	With map[string]string `` /* 151-byte string literal not displayed */
	// 挂载文件
	// @gotags: bson:"mount" json:"mount"
	Mount *MountData `protobuf:"bytes,7,opt,name=mount,proto3" json:"mount" bson:"mount"`
	// 标签
	// @gotags: bson:"tags" json:"tags"
	Tags map[string]string `` /* 151-byte string literal not displayed */
	// 描述
	// @gotags: bson:"description" json:"description"
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description" bson:"description"`
	// 触发条件
	// @gotags: bson:"on" json:"on"
	On *Trigger `protobuf:"bytes,4,opt,name=on,proto3" json:"on" bson:"on"`
	// 具体编排阶段
	// @gotags: bson:"stages" json:"stages"
	Stages []*Stage `protobuf:"bytes,5,rep,name=stages,proto3" json:"stages" bson:"stages"`
	// contains filtered or unexported fields
}

CreatePipelineRequest 创建Book请求

func NewCreatePipelineRequest

func NewCreatePipelineRequest() *CreatePipelineRequest

func (*CreatePipelineRequest) Descriptor deprecated

func (*CreatePipelineRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreatePipelineRequest.ProtoReflect.Descriptor instead.

func (*CreatePipelineRequest) EnsureStep

func (req *CreatePipelineRequest) EnsureStep()

func (*CreatePipelineRequest) GetCreateBy

func (x *CreatePipelineRequest) GetCreateBy() string

func (*CreatePipelineRequest) GetDescription

func (x *CreatePipelineRequest) GetDescription() string

func (*CreatePipelineRequest) GetDomain

func (x *CreatePipelineRequest) GetDomain() string

func (*CreatePipelineRequest) GetHookEvent

func (x *CreatePipelineRequest) GetHookEvent() *scm.WebHookEvent

func (*CreatePipelineRequest) GetMount

func (x *CreatePipelineRequest) GetMount() *MountData

func (*CreatePipelineRequest) GetName

func (x *CreatePipelineRequest) GetName() string

func (*CreatePipelineRequest) GetNamespace

func (x *CreatePipelineRequest) GetNamespace() string

func (*CreatePipelineRequest) GetOn

func (x *CreatePipelineRequest) GetOn() *Trigger

func (*CreatePipelineRequest) GetStages

func (x *CreatePipelineRequest) GetStages() []*Stage

func (*CreatePipelineRequest) GetTags

func (x *CreatePipelineRequest) GetTags() map[string]string

func (*CreatePipelineRequest) GetTemplateId

func (x *CreatePipelineRequest) GetTemplateId() string

func (*CreatePipelineRequest) GetWith

func (x *CreatePipelineRequest) GetWith() map[string]string

func (*CreatePipelineRequest) ProtoMessage

func (*CreatePipelineRequest) ProtoMessage()

func (*CreatePipelineRequest) ProtoReflect

func (x *CreatePipelineRequest) ProtoReflect() protoreflect.Message

func (*CreatePipelineRequest) Reset

func (x *CreatePipelineRequest) Reset()

func (*CreatePipelineRequest) String

func (x *CreatePipelineRequest) String() string

func (*CreatePipelineRequest) UpdateOwner

func (req *CreatePipelineRequest) UpdateOwner(tk *token.Token)

func (*CreatePipelineRequest) Validate

func (req *CreatePipelineRequest) Validate() error

type CreateStepRequest

type CreateStepRequest struct {

	// 名称
	// @gotags: json:"name" validate:"required"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" validate:"required"`
	// 具体动作
	// @gotags: json:"action" validate:"required"
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action" validate:"required"`
	// 是否需要审批, 审批通过后才能执行
	// @gotags: json:"with_audit"
	WithAudit bool `protobuf:"varint,3,opt,name=with_audit,json=withAudit,proto3" json:"with_audit"`
	// 审批参数, 有审批模块做具体实现
	// @gotags: json:"audit_params"
	AuditParams map[string]string `` /* 172-byte string literal not displayed */
	// 参数
	// @gotags: json:"with"
	With map[string]string `` /* 139-byte string literal not displayed */
	// step执行完成后, 是否需要通知
	// @gotags: json:"with_notify"
	WithNotify bool `protobuf:"varint,6,opt,name=with_notify,json=withNotify,proto3" json:"with_notify"`
	// 通知参数, 由通知模块做具体实现
	// @gotags: json:"notify_params"
	NotifyParams map[string]string `` /* 175-byte string literal not displayed */
	// WebHook配置, 用于和其他系统联动, 比如各种机器人
	// @gotags: json:"webhooks"
	Webhooks []*WebHook `protobuf:"bytes,8,rep,name=webhooks,proto3" json:"webhooks"`
	// 调度标签
	// @gotags: json:"node_selector"
	NodeSelector map[string]string `` /* 175-byte string literal not displayed */
	// 空间
	// @gotags: json:"namespace"
	Namespace string `protobuf:"bytes,10,opt,name=namespace,proto3" json:"namespace"`
	// contains filtered or unexported fields
}

func NewCreateStepRequest

func NewCreateStepRequest() *CreateStepRequest

func (*CreateStepRequest) Descriptor deprecated

func (*CreateStepRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateStepRequest.ProtoReflect.Descriptor instead.

func (*CreateStepRequest) GetAction

func (x *CreateStepRequest) GetAction() string

func (*CreateStepRequest) GetAuditParams

func (x *CreateStepRequest) GetAuditParams() map[string]string

func (*CreateStepRequest) GetName

func (x *CreateStepRequest) GetName() string

func (*CreateStepRequest) GetNamespace

func (x *CreateStepRequest) GetNamespace() string

func (*CreateStepRequest) GetNodeSelector

func (x *CreateStepRequest) GetNodeSelector() map[string]string

func (*CreateStepRequest) GetNotifyParams

func (x *CreateStepRequest) GetNotifyParams() map[string]string

func (*CreateStepRequest) GetWebhooks

func (x *CreateStepRequest) GetWebhooks() []*WebHook

func (*CreateStepRequest) GetWith

func (x *CreateStepRequest) GetWith() map[string]string

func (*CreateStepRequest) GetWithAudit

func (x *CreateStepRequest) GetWithAudit() bool

func (*CreateStepRequest) GetWithNotify

func (x *CreateStepRequest) GetWithNotify() bool

func (*CreateStepRequest) ProtoMessage

func (*CreateStepRequest) ProtoMessage()

func (*CreateStepRequest) ProtoReflect

func (x *CreateStepRequest) ProtoReflect() protoreflect.Message

func (*CreateStepRequest) Reset

func (x *CreateStepRequest) Reset()

func (*CreateStepRequest) String

func (x *CreateStepRequest) String() string

func (*CreateStepRequest) Validate

func (r *CreateStepRequest) Validate() error

type CreateWatchPipelineRequest

type CreateWatchPipelineRequest struct {

	// @gotags: json:"mod"
	Mod PIPELINE_WATCH_MOD `protobuf:"varint,1,opt,name=mod,proto3,enum=infraboard.workflow.pipeline.PIPELINE_WATCH_MOD" json:"mod"`
	// 需要watch的pipeline id
	// @gotags: json:"id"
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
	// watch整个namespace piplein 状态变化, 用于做namespace实时状态大屏
	// @gotags: json:"namespace"
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace"`
	// 并不执行真正的watch, 尝试运行, 主要用于链接前的检查工作
	// @gotags: json:"dry_run"
	DryRun bool `protobuf:"varint,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run"`
	// contains filtered or unexported fields
}

func NewWatchPipelineRequestByID

func NewWatchPipelineRequestByID(namespace, id string) *CreateWatchPipelineRequest

func NewWatchPipelineRequestByNamespace

func NewWatchPipelineRequestByNamespace(namespace string) *CreateWatchPipelineRequest

func (*CreateWatchPipelineRequest) Descriptor deprecated

func (*CreateWatchPipelineRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateWatchPipelineRequest.ProtoReflect.Descriptor instead.

func (*CreateWatchPipelineRequest) GetDryRun

func (x *CreateWatchPipelineRequest) GetDryRun() bool

func (*CreateWatchPipelineRequest) GetId

func (*CreateWatchPipelineRequest) GetMod

func (*CreateWatchPipelineRequest) GetNamespace

func (x *CreateWatchPipelineRequest) GetNamespace() string

func (*CreateWatchPipelineRequest) ProtoMessage

func (*CreateWatchPipelineRequest) ProtoMessage()

func (*CreateWatchPipelineRequest) ProtoReflect

func (*CreateWatchPipelineRequest) Reset

func (x *CreateWatchPipelineRequest) Reset()

func (*CreateWatchPipelineRequest) String

func (x *CreateWatchPipelineRequest) String() string

func (*CreateWatchPipelineRequest) Validate

func (req *CreateWatchPipelineRequest) Validate() error

type DeletePipelineRequest

type DeletePipelineRequest struct {

	// 唯一ID
	// @gotags: json:"id"
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
	// 只有所在在的空间
	// @gotags: json:"namespace"
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace"`
	// contains filtered or unexported fields
}

func NewDeletePipelineRequestWithID

func NewDeletePipelineRequestWithID(id string) *DeletePipelineRequest

NewDeletePipelineRequestWithID 查询book列表

func (*DeletePipelineRequest) Descriptor deprecated

func (*DeletePipelineRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeletePipelineRequest.ProtoReflect.Descriptor instead.

func (*DeletePipelineRequest) GetId

func (x *DeletePipelineRequest) GetId() string

func (*DeletePipelineRequest) GetNamespace

func (x *DeletePipelineRequest) GetNamespace() string

func (*DeletePipelineRequest) ProtoMessage

func (*DeletePipelineRequest) ProtoMessage()

func (*DeletePipelineRequest) ProtoReflect

func (x *DeletePipelineRequest) ProtoReflect() protoreflect.Message

func (*DeletePipelineRequest) Reset

func (x *DeletePipelineRequest) Reset()

func (*DeletePipelineRequest) String

func (x *DeletePipelineRequest) String() string

type DeleteStepRequest

type DeleteStepRequest struct {

	// 唯一ID
	// @gotags: json:"key" validate:"required"
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key" validate:"required"`
	// contains filtered or unexported fields
}

func NewDeleteStepRequestWithKey

func NewDeleteStepRequestWithKey(key string) *DeleteStepRequest

func (*DeleteStepRequest) Descriptor deprecated

func (*DeleteStepRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteStepRequest.ProtoReflect.Descriptor instead.

func (*DeleteStepRequest) GetKey

func (x *DeleteStepRequest) GetKey() string

func (*DeleteStepRequest) ProtoMessage

func (*DeleteStepRequest) ProtoMessage()

func (*DeleteStepRequest) ProtoReflect

func (x *DeleteStepRequest) ProtoReflect() protoreflect.Message

func (*DeleteStepRequest) Reset

func (x *DeleteStepRequest) Reset()

func (*DeleteStepRequest) String

func (x *DeleteStepRequest) String() string

func (*DeleteStepRequest) Validate

func (req *DeleteStepRequest) Validate() error

type DescribePipelineRequest

type DescribePipelineRequest struct {

	// 唯一ID
	// @gotags: json:"id"
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
	// 只有所在在的空间
	// @gotags: json:"namespace"
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace"`
	// contains filtered or unexported fields
}

func NewDescribePipelineRequestWithID

func NewDescribePipelineRequestWithID(id string) *DescribePipelineRequest

NewQueryPipelineRequest 查询book列表

func (*DescribePipelineRequest) Descriptor deprecated

func (*DescribePipelineRequest) Descriptor() ([]byte, []int)

Deprecated: Use DescribePipelineRequest.ProtoReflect.Descriptor instead.

func (*DescribePipelineRequest) GetId

func (x *DescribePipelineRequest) GetId() string

func (*DescribePipelineRequest) GetNamespace

func (x *DescribePipelineRequest) GetNamespace() string

func (*DescribePipelineRequest) ProtoMessage

func (*DescribePipelineRequest) ProtoMessage()

func (*DescribePipelineRequest) ProtoReflect

func (x *DescribePipelineRequest) ProtoReflect() protoreflect.Message

func (*DescribePipelineRequest) Reset

func (x *DescribePipelineRequest) Reset()

func (*DescribePipelineRequest) String

func (x *DescribePipelineRequest) String() string

type DescribeStepRequest

type DescribeStepRequest struct {

	// 唯一ID
	// @gotags: json:"key"
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
	// 唯一name
	// @gotags: json:"namespace"
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace"`
	// contains filtered or unexported fields
}

DescribeStepRequest todo

func NewDescribeStepRequestWithKey

func NewDescribeStepRequestWithKey(key string) *DescribeStepRequest

NewDescribeStepRequestWithKey 查询book列表

func (*DescribeStepRequest) Descriptor deprecated

func (*DescribeStepRequest) Descriptor() ([]byte, []int)

Deprecated: Use DescribeStepRequest.ProtoReflect.Descriptor instead.

func (*DescribeStepRequest) GetKey

func (x *DescribeStepRequest) GetKey() string

func (*DescribeStepRequest) GetNamespace

func (x *DescribeStepRequest) GetNamespace() string

func (*DescribeStepRequest) ProtoMessage

func (*DescribeStepRequest) ProtoMessage()

func (*DescribeStepRequest) ProtoReflect

func (x *DescribeStepRequest) ProtoReflect() protoreflect.Message

func (*DescribeStepRequest) Reset

func (x *DescribeStepRequest) Reset()

func (*DescribeStepRequest) String

func (x *DescribeStepRequest) String() string

type Flow

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

func NewFlow

func NewFlow(number int64, items []*Step) *Flow

func (*Flow) IsBreak

func (f *Flow) IsBreak() bool

判断 这个flow有没有中断

func (*Flow) IsComplete

func (f *Flow) IsComplete() bool

func (*Flow) IsPassed

func (f *Flow) IsPassed() bool

判断所有的step是不是都执行成功了

type MountData

type MountData struct {

	// 挂载的根节点位置, 默认挂载点: workflow
	// @gotags: bson:"root" json:"root"
	Root string `protobuf:"bytes,1,opt,name=root,proto3" json:"root" bson:"root"`
	// 需要挂载的文件列表
	// @gotags: bson:"files" json:"files"
	Files []*MountFile `protobuf:"bytes,2,rep,name=files,proto3" json:"files" bson:"files"`
	// contains filtered or unexported fields
}

挂载信息, 用于流水线执行过程中 数据共享

func (*MountData) Descriptor deprecated

func (*MountData) Descriptor() ([]byte, []int)

Deprecated: Use MountData.ProtoReflect.Descriptor instead.

func (*MountData) GetFiles

func (x *MountData) GetFiles() []*MountFile

func (*MountData) GetRoot

func (x *MountData) GetRoot() string

func (*MountData) ProtoMessage

func (*MountData) ProtoMessage()

func (*MountData) ProtoReflect

func (x *MountData) ProtoReflect() protoreflect.Message

func (*MountData) Reset

func (x *MountData) Reset()

func (*MountData) String

func (x *MountData) String() string

type MountFile

type MountFile struct {

	// 文件名称, 默认就是下载文件的名称
	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"`
	// 文件下载地址
	// @gotags: bson:"download_url" json:"download_url"
	DownloadUrl string `protobuf:"bytes,2,opt,name=download_url,json=downloadUrl,proto3" json:"download_url" bson:"download_url"`
	// 是否解压
	// @gotags: bson:"unpack" json:"unpack"
	Unpack bool `protobuf:"varint,3,opt,name=unpack,proto3" json:"unpack" bson:"unpack"`
	// 解压目录
	// @gotags: bson:"unpack_dir" json:"unpack_dir"
	UnpackDir string `protobuf:"bytes,4,opt,name=unpack_dir,json=unpackDir,proto3" json:"unpack_dir" bson:"unpack_dir"`
	// contains filtered or unexported fields
}

func (*MountFile) Descriptor deprecated

func (*MountFile) Descriptor() ([]byte, []int)

Deprecated: Use MountFile.ProtoReflect.Descriptor instead.

func (*MountFile) GetDownloadUrl

func (x *MountFile) GetDownloadUrl() string

func (*MountFile) GetName

func (x *MountFile) GetName() string

func (*MountFile) GetUnpack

func (x *MountFile) GetUnpack() bool

func (*MountFile) GetUnpackDir

func (x *MountFile) GetUnpackDir() string

func (*MountFile) ProtoMessage

func (*MountFile) ProtoMessage()

func (*MountFile) ProtoReflect

func (x *MountFile) ProtoReflect() protoreflect.Message

func (*MountFile) Reset

func (x *MountFile) Reset()

func (*MountFile) String

func (x *MountFile) String() string

type PARAM_VALUE_TYPE

type PARAM_VALUE_TYPE int32

PARAM_VALUE_TYPE 参数值类型

const (
	// 明文文本信息
	PARAM_VALUE_TYPE_PLAIN PARAM_VALUE_TYPE = 0
	// 应用变量
	PARAM_VALUE_TYPE_APP_VAR PARAM_VALUE_TYPE = 1
	// secret 引用
	PARAM_VALUE_TYPE_SECRET_REF PARAM_VALUE_TYPE = 2
	// 明文敏感信息, 需要后端加密
	PARAM_VALUE_TYPE_PASSWORD PARAM_VALUE_TYPE = 3
	// 密文信息, 由PASSWORD类型加密后得到
	PARAM_VALUE_TYPE_CRYPTO PARAM_VALUE_TYPE = 4
)

func ParsePARAM_VALUE_TYPEFromString

func ParsePARAM_VALUE_TYPEFromString(str string) (PARAM_VALUE_TYPE, error)

ParsePARAM_VALUE_TYPEFromString Parse PARAM_VALUE_TYPE from string

func (PARAM_VALUE_TYPE) Descriptor

func (PARAM_VALUE_TYPE) Enum

func (PARAM_VALUE_TYPE) EnumDescriptor deprecated

func (PARAM_VALUE_TYPE) EnumDescriptor() ([]byte, []int)

Deprecated: Use PARAM_VALUE_TYPE.Descriptor instead.

func (PARAM_VALUE_TYPE) Equal

func (t PARAM_VALUE_TYPE) Equal(target PARAM_VALUE_TYPE) bool

Equal type compare

func (PARAM_VALUE_TYPE) IsIn

func (t PARAM_VALUE_TYPE) IsIn(targets ...PARAM_VALUE_TYPE) bool

IsIn todo

func (PARAM_VALUE_TYPE) MarshalJSON

func (t PARAM_VALUE_TYPE) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (PARAM_VALUE_TYPE) Number

func (PARAM_VALUE_TYPE) String

func (x PARAM_VALUE_TYPE) String() string

func (PARAM_VALUE_TYPE) Type

func (*PARAM_VALUE_TYPE) UnmarshalJSON

func (t *PARAM_VALUE_TYPE) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type PIPELINE_STATUS

type PIPELINE_STATUS int32

PIPELINE_STATUS 流水线状态

const (
	// 已经调度完成, 等待执行
	PIPELINE_STATUS_WAITTING PIPELINE_STATUS = 0
	// 执行中
	PIPELINE_STATUS_EXECUTING PIPELINE_STATUS = 1
	// 执行结束
	PIPELINE_STATUS_COMPLETE PIPELINE_STATUS = 2
)

func ParsePIPELINE_STATUSFromString

func ParsePIPELINE_STATUSFromString(str string) (PIPELINE_STATUS, error)

ParsePIPELINE_STATUSFromString Parse PIPELINE_STATUS from string

func (PIPELINE_STATUS) Descriptor

func (PIPELINE_STATUS) Enum

func (x PIPELINE_STATUS) Enum() *PIPELINE_STATUS

func (PIPELINE_STATUS) EnumDescriptor deprecated

func (PIPELINE_STATUS) EnumDescriptor() ([]byte, []int)

Deprecated: Use PIPELINE_STATUS.Descriptor instead.

func (PIPELINE_STATUS) Equal

func (t PIPELINE_STATUS) Equal(target PIPELINE_STATUS) bool

Equal type compare

func (PIPELINE_STATUS) IsIn

func (t PIPELINE_STATUS) IsIn(targets ...PIPELINE_STATUS) bool

IsIn todo

func (PIPELINE_STATUS) MarshalJSON

func (t PIPELINE_STATUS) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (PIPELINE_STATUS) Number

func (PIPELINE_STATUS) String

func (x PIPELINE_STATUS) String() string

func (PIPELINE_STATUS) Type

func (*PIPELINE_STATUS) UnmarshalJSON

func (t *PIPELINE_STATUS) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type PIPELINE_WATCH_MOD

type PIPELINE_WATCH_MOD int32
const (
	// watch sigle pipeline
	PIPELINE_WATCH_MOD_BY_ID PIPELINE_WATCH_MOD = 0
	// watch namespace pipeline
	PIPELINE_WATCH_MOD_BY_NAMESPACE PIPELINE_WATCH_MOD = 1
)

func ParsePIPELINE_WATCH_MODFromString

func ParsePIPELINE_WATCH_MODFromString(str string) (PIPELINE_WATCH_MOD, error)

ParsePIPELINE_WATCH_MODFromString Parse PIPELINE_WATCH_MOD from string

func (PIPELINE_WATCH_MOD) Descriptor

func (PIPELINE_WATCH_MOD) Enum

func (PIPELINE_WATCH_MOD) EnumDescriptor deprecated

func (PIPELINE_WATCH_MOD) EnumDescriptor() ([]byte, []int)

Deprecated: Use PIPELINE_WATCH_MOD.Descriptor instead.

func (PIPELINE_WATCH_MOD) Equal

func (t PIPELINE_WATCH_MOD) Equal(target PIPELINE_WATCH_MOD) bool

Equal type compare

func (PIPELINE_WATCH_MOD) IsIn

func (t PIPELINE_WATCH_MOD) IsIn(targets ...PIPELINE_WATCH_MOD) bool

IsIn todo

func (PIPELINE_WATCH_MOD) MarshalJSON

func (t PIPELINE_WATCH_MOD) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (PIPELINE_WATCH_MOD) Number

func (PIPELINE_WATCH_MOD) String

func (x PIPELINE_WATCH_MOD) String() string

func (PIPELINE_WATCH_MOD) Type

func (*PIPELINE_WATCH_MOD) UnmarshalJSON

func (t *PIPELINE_WATCH_MOD) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type Pipeline

type Pipeline struct {

	// 唯一ID
	// @gotags: bson:"_id" json:"id"
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"`
	// 资源版本
	// @gotags: bson:"resource_version" json:"resource_version,omitempty"
	ResourceVersion int64 `` /* 131-byte string literal not displayed */
	// 所属域
	// @gotags: bson:"domain" json:"domain"
	Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain" bson:"domain"`
	// 所属空间
	// @gotags: bson:"namespace" json:"namespace"
	Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace" bson:"namespace"`
	// 创建时间
	// @gotags: bson:"create_at" json:"create_at"
	CreateAt int64 `protobuf:"varint,5,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 创建人
	// @gotags: bson:"create_by" json:"create_by"
	CreateBy string `protobuf:"bytes,6,opt,name=create_by,json=createBy,proto3" json:"create_by" bson:"create_by"`
	// 模版id
	// @gotags: bson:"template_id" json:"template_id"
	TemplateId string `protobuf:"bytes,16,opt,name=template_id,json=templateId,proto3" json:"template_id" bson:"template_id"`
	// 名称
	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name" bson:"name"`
	// 全局参数, step执行时合并处理
	// @gotags: bson:"with" json:"with"
	With map[string]string `` /* 152-byte string literal not displayed */
	// 需要挂载的文件
	// @gotags: bson:"mount" json:"mount"
	Mount *MountData `protobuf:"bytes,14,opt,name=mount,proto3" json:"mount" bson:"mount"`
	// 标签
	// @gotags: bson:"tags" json:"tags"
	Tags map[string]string `` /* 151-byte string literal not displayed */
	// 描述
	// @gotags: bson:"description" json:"description"
	Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description" bson:"description"`
	// 触发条件
	// @gotags: bson:"on" json:"on"
	On *Trigger `protobuf:"bytes,10,opt,name=on,proto3" json:"on" bson:"on"`
	// 触发事件
	// @gotags: bson:"hook_event" json:"hook_event"
	HookEvent *scm.WebHookEvent `protobuf:"bytes,15,opt,name=hook_event,json=hookEvent,proto3" json:"hook_event" bson:"hook_event"`
	// 当前状态
	// @gotags: bson:"status" json:"status"
	Status *PipelineStatus `protobuf:"bytes,11,opt,name=status,proto3" json:"status" bson:"status"`
	// 具体编排阶段
	// @gotags: bson:"stages" json:"stages"
	Stages []*Stage `protobuf:"bytes,12,rep,name=stages,proto3" json:"stages" bson:"stages"`
	// contains filtered or unexported fields
}

Pipeline todo

func LoadPipelineFromBytes

func LoadPipelineFromBytes(payload []byte) (*Pipeline, error)

func NewDefaultPipeline

func NewDefaultPipeline() *Pipeline

func NewPipeline

func NewPipeline(req *CreatePipelineRequest) (*Pipeline, error)

func (*Pipeline) AddStage

func (p *Pipeline) AddStage(item *Stage)

func (*Pipeline) Complete

func (p *Pipeline) Complete()

func (*Pipeline) CurrentFlowNumber

func (p *Pipeline) CurrentFlowNumber() int64

func (*Pipeline) Descriptor deprecated

func (*Pipeline) Descriptor() ([]byte, []int)

Deprecated: Use Pipeline.ProtoReflect.Descriptor instead.

func (*Pipeline) EtcdObjectKey

func (p *Pipeline) EtcdObjectKey() string

func (*Pipeline) GetCreateAt

func (x *Pipeline) GetCreateAt() int64

func (*Pipeline) GetCreateBy

func (x *Pipeline) GetCreateBy() string

func (*Pipeline) GetCurrentFlow

func (p *Pipeline) GetCurrentFlow() *Flow

func (*Pipeline) GetDescription

func (x *Pipeline) GetDescription() string

func (*Pipeline) GetDomain

func (x *Pipeline) GetDomain() string

func (*Pipeline) GetHookEvent

func (x *Pipeline) GetHookEvent() *scm.WebHookEvent

func (*Pipeline) GetId

func (x *Pipeline) GetId() string

func (*Pipeline) GetMount

func (x *Pipeline) GetMount() *MountData

func (*Pipeline) GetName

func (x *Pipeline) GetName() string

func (*Pipeline) GetNamespace

func (x *Pipeline) GetNamespace() string

func (*Pipeline) GetNextFlow

func (p *Pipeline) GetNextFlow() *Flow

func (*Pipeline) GetOn

func (x *Pipeline) GetOn() *Trigger

func (*Pipeline) GetResourceVersion

func (x *Pipeline) GetResourceVersion() int64

func (*Pipeline) GetStageByNumber

func (p *Pipeline) GetStageByNumber(number int32) (*Stage, error)

func (*Pipeline) GetStages

func (x *Pipeline) GetStages() []*Stage

func (*Pipeline) GetStatus

func (x *Pipeline) GetStatus() *PipelineStatus

func (*Pipeline) GetStep

func (p *Pipeline) GetStep(stageNumber int32, stepKey string) (*Step, error)

func (*Pipeline) GetTags

func (x *Pipeline) GetTags() map[string]string

func (*Pipeline) GetTemplateId

func (x *Pipeline) GetTemplateId() string

func (*Pipeline) GetWith

func (x *Pipeline) GetWith() map[string]string

func (*Pipeline) IsComplete

func (p *Pipeline) IsComplete() bool

func (*Pipeline) IsRunning

func (p *Pipeline) IsRunning() bool

func (*Pipeline) IsScheduled

func (s *Pipeline) IsScheduled() bool

func (*Pipeline) LastStage

func (p *Pipeline) LastStage() *Stage

func (*Pipeline) MakeObjectKey

func (p *Pipeline) MakeObjectKey() string

MakeObjectKey 构建etcd对应的key 例如: inforboard/workflow/service/node/node-01

func (*Pipeline) MatchScheduler

func (p *Pipeline) MatchScheduler(schedulerName string) bool

func (*Pipeline) NextFlowNumber

func (p *Pipeline) NextFlowNumber() int64

func (*Pipeline) NextStep

func (p *Pipeline) NextStep() (steps []*Step, isComplete bool)

只有上一个flow执行完成后, 才会有下个fow 注意: 多个并行的任务是不能跨stage同时执行的

也就是说stage一定是串行的

func (*Pipeline) ProtoMessage

func (*Pipeline) ProtoMessage()

func (*Pipeline) ProtoReflect

func (x *Pipeline) ProtoReflect() protoreflect.Message

func (*Pipeline) Reset

func (x *Pipeline) Reset()

func (*Pipeline) Run

func (p *Pipeline) Run()

func (*Pipeline) ScheduledNodeName

func (p *Pipeline) ScheduledNodeName() string

func (*Pipeline) SetScheduleNode

func (p *Pipeline) SetScheduleNode(nodeName string)

func (*Pipeline) ShortDescribe

func (p *Pipeline) ShortDescribe() string

func (*Pipeline) StepPrefix

func (p *Pipeline) StepPrefix() string

func (*Pipeline) String

func (x *Pipeline) String() string

func (*Pipeline) UpdateOwner

func (p *Pipeline) UpdateOwner(tk *token.Token)

func (*Pipeline) UpdateStep

func (p *Pipeline) UpdateStep(s *Step) error

func (*Pipeline) Validate

func (p *Pipeline) Validate() error

type PipelineSet

type PipelineSet struct {

	// @gotags: bson:"total" json:"total"
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	// @gotags: bson:"items" json:"items"
	Items []*Pipeline `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

PipelineSet todo

func NewPipelineSet

func NewPipelineSet() *PipelineSet

NewPipelineSet todo

func (*PipelineSet) Add

func (s *PipelineSet) Add(item *Pipeline)

func (*PipelineSet) Descriptor deprecated

func (*PipelineSet) Descriptor() ([]byte, []int)

Deprecated: Use PipelineSet.ProtoReflect.Descriptor instead.

func (*PipelineSet) GetItems

func (x *PipelineSet) GetItems() []*Pipeline

func (*PipelineSet) GetTotal

func (x *PipelineSet) GetTotal() int64

func (*PipelineSet) ProtoMessage

func (*PipelineSet) ProtoMessage()

func (*PipelineSet) ProtoReflect

func (x *PipelineSet) ProtoReflect() protoreflect.Message

func (*PipelineSet) Reset

func (x *PipelineSet) Reset()

func (*PipelineSet) String

func (x *PipelineSet) String() string

type PipelineStatus

type PipelineStatus struct {

	// 当前正在执行step的flow number
	// @gotags: bson:"current_flow" json:"current_flow"
	CurrentFlow int64 `protobuf:"varint,1,opt,name=current_flow,json=currentFlow,proto3" json:"current_flow" bson:"current_flow"`
	// 开始时间
	// @gotags: bson:"start_at" json:"start_at"
	StartAt int64 `protobuf:"varint,2,opt,name=start_at,json=startAt,proto3" json:"start_at" bson:"start_at"`
	// 结束时间
	// @gotags: bson:"end_at" json:"end_at"
	EndAt int64 `protobuf:"varint,3,opt,name=end_at,json=endAt,proto3" json:"end_at" bson:"end_at"`
	// 当前状态
	// @gotags: bson:"status" json:"status"
	Status PIPELINE_STATUS `protobuf:"varint,4,opt,name=status,proto3,enum=infraboard.workflow.pipeline.PIPELINE_STATUS" json:"status" bson:"status"`
	// 由哪个调度器实例负责进行调度运行
	// @gotags: bson:"scheduler_node" json:"scheduler_node"
	SchedulerNode string `protobuf:"bytes,5,opt,name=scheduler_node,json=schedulerNode,proto3" json:"scheduler_node" bson:"scheduler_node"`
	// 执行结果
	// @gotags: bson:"message" json:"message"
	Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message" bson:"message"`
	// contains filtered or unexported fields
}

PipelineStatus 当前状态

func NewDefaultPipelineStatus

func NewDefaultPipelineStatus() *PipelineStatus

func (*PipelineStatus) Descriptor deprecated

func (*PipelineStatus) Descriptor() ([]byte, []int)

Deprecated: Use PipelineStatus.ProtoReflect.Descriptor instead.

func (*PipelineStatus) GetCurrentFlow

func (x *PipelineStatus) GetCurrentFlow() int64

func (*PipelineStatus) GetEndAt

func (x *PipelineStatus) GetEndAt() int64

func (*PipelineStatus) GetMessage

func (x *PipelineStatus) GetMessage() string

func (*PipelineStatus) GetSchedulerNode

func (x *PipelineStatus) GetSchedulerNode() string

func (*PipelineStatus) GetStartAt

func (x *PipelineStatus) GetStartAt() int64

func (*PipelineStatus) GetStatus

func (x *PipelineStatus) GetStatus() PIPELINE_STATUS

func (*PipelineStatus) ProtoMessage

func (*PipelineStatus) ProtoMessage()

func (*PipelineStatus) ProtoReflect

func (x *PipelineStatus) ProtoReflect() protoreflect.Message

func (*PipelineStatus) Reset

func (x *PipelineStatus) Reset()

func (*PipelineStatus) String

func (x *PipelineStatus) String() string

type QueryPipelineOptions

type QueryPipelineOptions struct {
	Node string
}

QueryPipelineTaskOptions ListPipeline 查询条件

func NewQueryPipelineOptions

func NewQueryPipelineOptions() *QueryPipelineOptions

type QueryPipelineRequest

type QueryPipelineRequest struct {

	// @gotags: json:"page"
	Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// @gotags: json:"name"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	// contains filtered or unexported fields
}

QueryPipelineRequest 查询Book请求

func NewQueryPipelineRequest

func NewQueryPipelineRequest() *QueryPipelineRequest

NewQueryPipelineRequest 查询book列表

func (*QueryPipelineRequest) Descriptor deprecated

func (*QueryPipelineRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryPipelineRequest.ProtoReflect.Descriptor instead.

func (*QueryPipelineRequest) GetName

func (x *QueryPipelineRequest) GetName() string

func (*QueryPipelineRequest) GetPage

func (*QueryPipelineRequest) ProtoMessage

func (*QueryPipelineRequest) ProtoMessage()

func (*QueryPipelineRequest) ProtoReflect

func (x *QueryPipelineRequest) ProtoReflect() protoreflect.Message

func (*QueryPipelineRequest) Reset

func (x *QueryPipelineRequest) Reset()

func (*QueryPipelineRequest) String

func (x *QueryPipelineRequest) String() string

type QueryStepRequest

type QueryStepRequest struct {

	// @gotags: json:"page"
	Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// @gotags: json:"key"
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key"`
	// contains filtered or unexported fields
}

QueryStepRequest 查询Book请求

func NewQueryStepRequest

func NewQueryStepRequest() *QueryStepRequest

NewQueryStepRequest 查询book列表

func (*QueryStepRequest) Descriptor deprecated

func (*QueryStepRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryStepRequest.ProtoReflect.Descriptor instead.

func (*QueryStepRequest) GetKey

func (x *QueryStepRequest) GetKey() string

func (*QueryStepRequest) GetPage

func (x *QueryStepRequest) GetPage() *request.PageRequest

func (*QueryStepRequest) ProtoMessage

func (*QueryStepRequest) ProtoMessage()

func (*QueryStepRequest) ProtoReflect

func (x *QueryStepRequest) ProtoReflect() protoreflect.Message

func (*QueryStepRequest) Reset

func (x *QueryStepRequest) Reset()

func (*QueryStepRequest) String

func (x *QueryStepRequest) String() string

type STEP_CREATE_BY

type STEP_CREATE_BY int32

STEP_CREATE_BY step任务类型

const (
	// 由pipeline控制器创建
	STEP_CREATE_BY_PIPELINE STEP_CREATE_BY = 0
	// 由cronjob控制器创建
	STEP_CREATE_BY_CRONJOB STEP_CREATE_BY = 1
	// 由用户自己创建, 用于单次任务执行,比如调试
	STEP_CREATE_BY_USER STEP_CREATE_BY = 2
)

func ParseSTEP_CREATE_BYFromString

func ParseSTEP_CREATE_BYFromString(str string) (STEP_CREATE_BY, error)

ParseSTEP_CREATE_BYFromString Parse STEP_CREATE_BY from string

func (STEP_CREATE_BY) Descriptor

func (STEP_CREATE_BY) Enum

func (x STEP_CREATE_BY) Enum() *STEP_CREATE_BY

func (STEP_CREATE_BY) EnumDescriptor deprecated

func (STEP_CREATE_BY) EnumDescriptor() ([]byte, []int)

Deprecated: Use STEP_CREATE_BY.Descriptor instead.

func (STEP_CREATE_BY) Equal

func (t STEP_CREATE_BY) Equal(target STEP_CREATE_BY) bool

Equal type compare

func (STEP_CREATE_BY) IsIn

func (t STEP_CREATE_BY) IsIn(targets ...STEP_CREATE_BY) bool

IsIn todo

func (STEP_CREATE_BY) MarshalJSON

func (t STEP_CREATE_BY) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (STEP_CREATE_BY) Number

func (STEP_CREATE_BY) String

func (x STEP_CREATE_BY) String() string

func (STEP_CREATE_BY) Type

func (*STEP_CREATE_BY) UnmarshalJSON

func (t *STEP_CREATE_BY) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type STEP_STATUS

type STEP_STATUS int32

STEP_STATUS Step任务状态

const (
	// 任务等待被执行
	STEP_STATUS_PENDDING STEP_STATUS = 0
	// 任务调度失败
	STEP_STATUS_SCHEDULE_FAILED STEP_STATUS = 10
	// 正在执行
	STEP_STATUS_RUNNING STEP_STATUS = 1
	// 执行成功
	STEP_STATUS_SUCCEEDED STEP_STATUS = 3
	// 执行失败
	STEP_STATUS_FAILED STEP_STATUS = 4
	// 取消中
	STEP_STATUS_CANCELING STEP_STATUS = 5
	// 取消完成
	STEP_STATUS_CANCELED STEP_STATUS = 6
	// 忽略执行
	STEP_STATUS_SKIP STEP_STATUS = 7
	// 审批中, 确认过后才能继续执行
	STEP_STATUS_AUDITING STEP_STATUS = 8
	// 审批拒绝
	STEP_STATUS_REFUSE STEP_STATUS = 9
)

func ParseSTEP_STATUSFromString

func ParseSTEP_STATUSFromString(str string) (STEP_STATUS, error)

ParseSTEP_STATUSFromString Parse STEP_STATUS from string

func (STEP_STATUS) Descriptor

func (STEP_STATUS) Enum

func (x STEP_STATUS) Enum() *STEP_STATUS

func (STEP_STATUS) EnumDescriptor deprecated

func (STEP_STATUS) EnumDescriptor() ([]byte, []int)

Deprecated: Use STEP_STATUS.Descriptor instead.

func (STEP_STATUS) Equal

func (t STEP_STATUS) Equal(target STEP_STATUS) bool

Equal type compare

func (STEP_STATUS) IsIn

func (t STEP_STATUS) IsIn(targets ...STEP_STATUS) bool

IsIn todo

func (STEP_STATUS) MarshalJSON

func (t STEP_STATUS) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (STEP_STATUS) Number

func (x STEP_STATUS) Number() protoreflect.EnumNumber

func (STEP_STATUS) String

func (x STEP_STATUS) String() string

func (STEP_STATUS) Type

func (*STEP_STATUS) UnmarshalJSON

func (t *STEP_STATUS) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type ServiceClient

type ServiceClient interface {
	// pipeline管理
	CreatePipeline(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error)
	QueryPipeline(ctx context.Context, in *QueryPipelineRequest, opts ...grpc.CallOption) (*PipelineSet, error)
	DescribePipeline(ctx context.Context, in *DescribePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error)
	WatchPipeline(ctx context.Context, opts ...grpc.CallOption) (Service_WatchPipelineClient, error)
	DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error)
	// step管理
	CreateStep(ctx context.Context, in *CreateStepRequest, opts ...grpc.CallOption) (*Step, error)
	QueryStep(ctx context.Context, in *QueryStepRequest, opts ...grpc.CallOption) (*StepSet, error)
	DescribeStep(ctx context.Context, in *DescribeStepRequest, opts ...grpc.CallOption) (*Step, error)
	DeleteStep(ctx context.Context, in *DeleteStepRequest, opts ...grpc.CallOption) (*Step, error)
	CancelStep(ctx context.Context, in *CancelStepRequest, opts ...grpc.CallOption) (*Step, error)
	AuditStep(ctx context.Context, in *AuditStepRequest, opts ...grpc.CallOption) (*Step, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// pipeline管理
	CreatePipeline(context.Context, *CreatePipelineRequest) (*Pipeline, error)
	QueryPipeline(context.Context, *QueryPipelineRequest) (*PipelineSet, error)
	DescribePipeline(context.Context, *DescribePipelineRequest) (*Pipeline, error)
	WatchPipeline(Service_WatchPipelineServer) error
	DeletePipeline(context.Context, *DeletePipelineRequest) (*Pipeline, error)
	// step管理
	CreateStep(context.Context, *CreateStepRequest) (*Step, error)
	QueryStep(context.Context, *QueryStepRequest) (*StepSet, error)
	DescribeStep(context.Context, *DescribeStepRequest) (*Step, error)
	DeleteStep(context.Context, *DeleteStepRequest) (*Step, error)
	CancelStep(context.Context, *CancelStepRequest) (*Step, error)
	AuditStep(context.Context, *AuditStepRequest) (*Step, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Service_WatchPipelineClient

type Service_WatchPipelineClient interface {
	Send(*WatchPipelineRequest) error
	Recv() (*WatchPipelineResponse, error)
	grpc.ClientStream
}

type Service_WatchPipelineServer

type Service_WatchPipelineServer interface {
	Send(*WatchPipelineResponse) error
	Recv() (*WatchPipelineRequest, error)
	grpc.ServerStream
}

type Stage

type Stage struct {

	// 阶段ID
	// @gotags: bson:"id" json:"id"
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id" bson:"id"`
	// 名称
	// @gotags: bson:"name" json:"name" validate:"required"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name" validate:"required"`
	// 依赖其他stage执行成功
	// @gotags: bson:"needs" json:"needs"
	Needs []string `protobuf:"bytes,3,rep,name=needs,proto3" json:"needs" bson:"needs"`
	// 具体步骤
	// @gotags: bson:"steps" json:"steps"
	Steps []*Step `protobuf:"bytes,4,rep,name=steps,proto3" json:"steps" bson:"steps"`
	// contains filtered or unexported fields
}

Stage todo

func NewDefaultStage

func NewDefaultStage() *Stage

func (*Stage) AddStep

func (s *Stage) AddStep(item *Step)

func (*Stage) Descriptor deprecated

func (*Stage) Descriptor() ([]byte, []int)

Deprecated: Use Stage.ProtoReflect.Descriptor instead.

func (*Stage) GetFlow

func (s *Stage) GetFlow(flowNumber int64) *Flow

func (*Stage) GetId

func (x *Stage) GetId() int32

func (*Stage) GetName

func (x *Stage) GetName() string

func (*Stage) GetNeeds

func (x *Stage) GetNeeds() []string

func (*Stage) GetStepByKey

func (s *Stage) GetStepByKey(key string) (*Step, error)

func (*Stage) GetSteps

func (x *Stage) GetSteps() []*Step

func (*Stage) IsBreakNow

func (s *Stage) IsBreakNow() bool

判断Stage是否执行成功

func (*Stage) IsPassed

func (s *Stage) IsPassed() bool

最后一个step都没有中断

func (*Stage) IsRunning

func (s *Stage) IsRunning() bool

func (*Stage) LastStep

func (s *Stage) LastStep() *Step

func (*Stage) NextStep

func (s *Stage) NextStep() (nextSteps []*Step)

因为可能包含并行任务, 下一次执行的任务可能是多个

func (*Stage) ProtoMessage

func (*Stage) ProtoMessage()

func (*Stage) ProtoReflect

func (x *Stage) ProtoReflect() protoreflect.Message

func (*Stage) Reset

func (x *Stage) Reset()

func (*Stage) ShortDesc

func (s *Stage) ShortDesc() string

func (*Stage) StepCount

func (s *Stage) StepCount() int

func (*Stage) String

func (x *Stage) String() string

func (*Stage) UpdateStep

func (s *Stage) UpdateStep(item *Step) error

type Step

type Step struct {

	// Key 运行时标识符
	// @gotags: bson:"key" json:"key,omitempty"
	Key string `protobuf:"bytes,9,opt,name=key,proto3" json:"key,omitempty" bson:"key"`
	// step由那种控制器创建的, 也就是step类型
	// @gotags: bson:"create_type" json:"create_type"
	CreateType STEP_CREATE_BY `` /* 151-byte string literal not displayed */
	// 所属空间
	// @gotags: bson:"namespace" json:"namespace"
	Namespace string `protobuf:"bytes,17,opt,name=namespace,proto3" json:"namespace" bson:"namespace"`
	// 所属空间
	// @gotags: bson:"pipeline_id" json:"pipeline_id,omitempty"
	PipelineId string `protobuf:"bytes,18,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty" bson:"pipeline_id"`
	// 创建时间
	// @gotags: bson:"create_at" json:"create_at"
	CreateAt int64 `protobuf:"varint,19,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 状态更新时间
	// @gotags: bson:"update_at" json:"update_at"
	UpdateAt int64 `protobuf:"varint,20,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// 关联的应用部署id, 关联部署过后可以通过变量传递当前部署的配置
	// @gotags: bson:"deploy_id" json:"deploy_id"
	DeployId string `protobuf:"bytes,21,opt,name=deploy_id,json=deployId,proto3" json:"deploy_id" bson:"deploy_id"`
	// 资源版本
	// @gotags: bson:"resource_version" json:"resource_version,omitempty"
	ResourceVersion int64 `` /* 132-byte string literal not displayed */
	// 步骤ID
	// @gotags: bson:"id" json:"id"
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id" bson:"id"`
	// 名称
	// @gotags: bson:"name" json:"name" validate:"required"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name" validate:"required"`
	// 具体动作
	// @gotags: bson:"action" json:"action" validate:"required"
	Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action" bson:"action" validate:"required"`
	// 参数
	// @gotags: bson:"with" json:"with"
	With map[string]string `` /* 151-byte string literal not displayed */
	// 是否并行
	// @gotags: bson:"is_parallel" json:"is_parallel"
	IsParallel bool `protobuf:"varint,5,opt,name=is_parallel,json=isParallel,proto3" json:"is_parallel" bson:"is_parallel"`
	// 忽略失败
	// @gotags: bson:"ignore_failed" json:"ignore_failed"
	IgnoreFailed bool `protobuf:"varint,6,opt,name=ignore_failed,json=ignoreFailed,proto3" json:"ignore_failed" bson:"ignore_failed"`
	// 是否需要审批, 审批通过后才能执行
	// @gotags: bson:"with_audit" json:"with_audit"
	WithAudit bool `protobuf:"varint,10,opt,name=with_audit,json=withAudit,proto3" json:"with_audit" bson:"with_audit"`
	// 审批参数, 有审批模块做具体实现
	// @gotags: bson:"audit_params" json:"audit_params"
	AuditParams map[string]string `` /* 193-byte string literal not displayed */
	// step执行完成后, 是否需要通知
	// @gotags: bson:"with_notify" json:"with_notify"
	WithNotify bool `protobuf:"varint,11,opt,name=with_notify,json=withNotify,proto3" json:"with_notify" bson:"with_notify"`
	// 通知参数, 由通知模块做具体实现
	// @gotags: bson:"notify_params" json:"notify_params"
	NotifyParams map[string]string `` /* 197-byte string literal not displayed */
	// WebHook配置, 用于和其他系统联动, 比如各种机器人
	// @gotags: bson:"webhooks" json:"webhooks"
	Webhooks []*WebHook `protobuf:"bytes,15,rep,name=webhooks,proto3" json:"webhooks" bson:"webhooks"`
	// 调度标签
	// @gotags: bson:"node_selector" json:"node_selector"
	NodeSelector map[string]string `` /* 196-byte string literal not displayed */
	// 当前步骤的状态
	// @gotags: bson:"status" json:"status,omitempty"
	Status *StepStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty" bson:"status"`
	// contains filtered or unexported fields
}

func LoadStepFromBytes

func LoadStepFromBytes(value []byte) (*Step, error)

LoadStepFromBytes 解析etcd 的step数据

func NewDefaultStep

func NewDefaultStep() *Step

func NewStep

func NewStep(t STEP_CREATE_BY, req *CreateStepRequest) *Step

func (*Step) ActionName

func (s *Step) ActionName() string

func (*Step) ActionVersion

func (s *Step) ActionVersion() string

func (*Step) Audit

func (s *Step) Audit(resp AUDIT_RESPONSE, message string)

func (*Step) AuditPass

func (s *Step) AuditPass() bool

func (*Step) BuildKey

func (s *Step) BuildKey(namespace, pipelineId string, stage int32)

func (*Step) Cancel

func (s *Step) Cancel(format string, a ...interface{})

func (*Step) Clone

func (s *Step) Clone() *Step

func (*Step) Descriptor deprecated

func (*Step) Descriptor() ([]byte, []int)

Deprecated: Use Step.ProtoReflect.Descriptor instead.

func (*Step) Failed

func (s *Step) Failed(format string, a ...interface{})

func (*Step) FlowNumber

func (s *Step) FlowNumber() int64

func (*Step) GetAction

func (x *Step) GetAction() string

func (*Step) GetAuditParams

func (x *Step) GetAuditParams() map[string]string

func (*Step) GetCreateAt

func (x *Step) GetCreateAt() int64

func (*Step) GetCreateType

func (x *Step) GetCreateType() STEP_CREATE_BY

func (*Step) GetDeployId

func (x *Step) GetDeployId() string

func (*Step) GetId

func (x *Step) GetId() int32

func (*Step) GetIgnoreFailed

func (x *Step) GetIgnoreFailed() bool

func (*Step) GetIsParallel

func (x *Step) GetIsParallel() bool

func (*Step) GetKey

func (x *Step) GetKey() string

func (*Step) GetName

func (x *Step) GetName() string

func (*Step) GetNamespace

func (x *Step) GetNamespace() string

func (*Step) GetNodeSelector

func (x *Step) GetNodeSelector() map[string]string

func (*Step) GetNotifyParams

func (x *Step) GetNotifyParams() map[string]string

func (*Step) GetPipelineId

func (x *Step) GetPipelineId() string

func (*Step) GetPipelineStageNumber

func (s *Step) GetPipelineStageNumber() int32

func (*Step) GetPipelineStepNumber

func (s *Step) GetPipelineStepNumber() int32

func (*Step) GetResourceVersion

func (x *Step) GetResourceVersion() int64

func (*Step) GetStatus

func (x *Step) GetStatus() *StepStatus

func (*Step) GetUpdateAt

func (x *Step) GetUpdateAt() int64

func (*Step) GetWebhooks

func (x *Step) GetWebhooks() []*WebHook

func (*Step) GetWith

func (x *Step) GetWith() map[string]string

func (*Step) GetWithAudit

func (x *Step) GetWithAudit() bool

func (*Step) GetWithNotify

func (x *Step) GetWithNotify() bool

func (*Step) HasSendAuditNotify

func (s *Step) HasSendAuditNotify() bool

func (*Step) IsBreakNow

func (s *Step) IsBreakNow() bool

func (*Step) IsComplete

func (s *Step) IsComplete() bool

func (*Step) IsCreateByPipeline

func (s *Step) IsCreateByPipeline() bool

func (*Step) IsPassed

func (s *Step) IsPassed() bool

func (*Step) IsRunning

func (s *Step) IsRunning() bool

func (*Step) IsScheduled

func (s *Step) IsScheduled() bool

func (*Step) IsScheduledFailed

func (s *Step) IsScheduledFailed() bool

func (*Step) IsStatusEqual

func (s *Step) IsStatusEqual(target *Step) bool

func (*Step) MakeObjectKey

func (s *Step) MakeObjectKey() string

func (*Step) MarkSendAuditNotify

func (s *Step) MarkSendAuditNotify()

func (*Step) MatchedHooks

func (s *Step) MatchedHooks() []*WebHook

func (*Step) ProtoMessage

func (*Step) ProtoMessage()

func (*Step) ProtoReflect

func (x *Step) ProtoReflect() protoreflect.Message

func (*Step) Reset

func (x *Step) Reset()

func (*Step) Run

func (s *Step) Run()

func (*Step) ScheduleFailed

func (s *Step) ScheduleFailed(format string, a ...interface{})

func (*Step) ScheduledNodeName

func (s *Step) ScheduledNodeName() string

func (*Step) SetScheduleNode

func (s *Step) SetScheduleNode(nodeName string)

func (*Step) ShowTitle

func (s *Step) ShowTitle() string

func (*Step) StatusDescribe

func (s *Step) StatusDescribe() string

func (*Step) String

func (x *Step) String() string

func (*Step) Success

func (s *Step) Success(format string, a ...interface{})

func (*Step) UpdateCtx

func (s *Step) UpdateCtx(resp map[string]string)

func (*Step) UpdateResponse

func (s *Step) UpdateResponse(resp map[string]string)

func (*Step) Validate

func (s *Step) Validate() error

type StepSet

type StepSet struct {

	// @gotags: bson:"total" json:"total"
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	// @gotags: bson:"items" json:"items"
	Items []*Step `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

StepSet todo

func NewStepSet

func NewStepSet() *StepSet

NewStepSet todo

func (*StepSet) Add

func (s *StepSet) Add(item *Step)

func (*StepSet) Descriptor deprecated

func (*StepSet) Descriptor() ([]byte, []int)

Deprecated: Use StepSet.ProtoReflect.Descriptor instead.

func (*StepSet) GetItems

func (x *StepSet) GetItems() []*Step

func (*StepSet) GetTotal

func (x *StepSet) GetTotal() int64

func (*StepSet) ProtoMessage

func (*StepSet) ProtoMessage()

func (*StepSet) ProtoReflect

func (x *StepSet) ProtoReflect() protoreflect.Message

func (*StepSet) Reset

func (x *StepSet) Reset()

func (*StepSet) String

func (x *StepSet) String() string

type StepStatus

type StepStatus struct {

	// 当前该step的flow编号
	// @gotags: bson:"flow_number" json:"flow_number"
	FlowNumber int64 `protobuf:"varint,1,opt,name=flow_number,json=flowNumber,proto3" json:"flow_number" bson:"flow_number"`
	// 开始时间
	// @gotags: bson:"start_at" json:"start_at"
	StartAt int64 `protobuf:"varint,2,opt,name=start_at,json=startAt,proto3" json:"start_at" bson:"start_at"`
	// 结束时间
	// @gotags: bson:"end_at" json:"end_at"
	EndAt int64 `protobuf:"varint,3,opt,name=end_at,json=endAt,proto3" json:"end_at" bson:"end_at"`
	// 当前状态
	// @gotags: bson:"status" json:"status"
	Status STEP_STATUS `protobuf:"varint,4,opt,name=status,proto3,enum=infraboard.workflow.pipeline.STEP_STATUS" json:"status" bson:"status"`
	// 被调度到的节点
	// @gotags: bson:"scheduled_node" json:"scheduled_node"
	ScheduledNode string `protobuf:"bytes,5,opt,name=scheduled_node,json=scheduledNode,proto3" json:"scheduled_node" bson:"scheduled_node"`
	// 审批时间
	// @gotags: bson:"audit_at" json:"audit_at"
	AuditAt int64 `protobuf:"varint,9,opt,name=audit_at,json=auditAt,proto3" json:"audit_at" bson:"audit_at"`
	// 审批结果
	// @gotags: bson:"audit_response" json:"audit_response"
	AuditResponse AUDIT_RESPONSE `` /* 163-byte string literal not displayed */
	// 审批时的反馈信息
	// @gotags: bson:"audit_message" json:"audit_message"
	AuditMessage string `protobuf:"bytes,8,opt,name=audit_message,json=auditMessage,proto3" json:"audit_message" bson:"audit_message"`
	// 通知发送时间
	// @gotags: bson:"notify_at" json:"notify_at"
	NotifyAt int64 `protobuf:"varint,10,opt,name=notify_at,json=notifyAt,proto3" json:"notify_at" bson:"notify_at"`
	// 通知失败信息, 如果没有表示成功
	// @gotags: bson:"notify_error" json:"notify_error"
	NotifyError string `protobuf:"bytes,11,opt,name=notify_error,json=notifyError,proto3" json:"notify_error" bson:"notify_error"`
	// 执行结果
	// @gotags: bson:"message" json:"message"
	Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message" bson:"message"`
	// 执行完后的一些额外数据, 都以URL的方式返回
	// @gotags: bson:"response" json:"response"
	Response map[string]string `` /* 163-byte string literal not displayed */
	// 执行过程中的一些上下文信息
	// @gotags: bson:"context_map" json:"context_map,omitempty"
	ContextMap map[string]string `` /* 199-byte string literal not displayed */
	// contains filtered or unexported fields
}

func NewDefaultStepStatus

func NewDefaultStepStatus() *StepStatus

func (*StepStatus) Descriptor deprecated

func (*StepStatus) Descriptor() ([]byte, []int)

Deprecated: Use StepStatus.ProtoReflect.Descriptor instead.

func (*StepStatus) GetAuditAt

func (x *StepStatus) GetAuditAt() int64

func (*StepStatus) GetAuditMessage

func (x *StepStatus) GetAuditMessage() string

func (*StepStatus) GetAuditResponse

func (x *StepStatus) GetAuditResponse() AUDIT_RESPONSE

func (*StepStatus) GetContextMap

func (x *StepStatus) GetContextMap() map[string]string

func (*StepStatus) GetEndAt

func (x *StepStatus) GetEndAt() int64

func (*StepStatus) GetFlowNumber

func (x *StepStatus) GetFlowNumber() int64

func (*StepStatus) GetMessage

func (x *StepStatus) GetMessage() string

func (*StepStatus) GetNotifyAt

func (x *StepStatus) GetNotifyAt() int64

func (*StepStatus) GetNotifyError

func (x *StepStatus) GetNotifyError() string

func (*StepStatus) GetResponse

func (x *StepStatus) GetResponse() map[string]string

func (*StepStatus) GetScheduledNode

func (x *StepStatus) GetScheduledNode() string

func (*StepStatus) GetStartAt

func (x *StepStatus) GetStartAt() int64

func (*StepStatus) GetStatus

func (x *StepStatus) GetStatus() STEP_STATUS

func (*StepStatus) ProtoMessage

func (*StepStatus) ProtoMessage()

func (*StepStatus) ProtoReflect

func (x *StepStatus) ProtoReflect() protoreflect.Message

func (*StepStatus) Reset

func (x *StepStatus) Reset()

func (*StepStatus) String

func (x *StepStatus) String() string

type Trigger

type Trigger struct {

	// 事件名称,那些事件可以触发
	// @gotags: bson:"events" json:"events"
	Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events" bson:"events"`
	// 分支名称, 那些分支可以触发
	// @gotags: bson:"branches" json:"branches"
	Branches []string `protobuf:"bytes,2,rep,name=branches,proto3" json:"branches" bson:"branches"`
	// contains filtered or unexported fields
}

Trigger Pipeline触发执行的条件

func (*Trigger) Descriptor deprecated

func (*Trigger) Descriptor() ([]byte, []int)

Deprecated: Use Trigger.ProtoReflect.Descriptor instead.

func (*Trigger) GetBranches

func (x *Trigger) GetBranches() []string

func (*Trigger) GetEvents

func (x *Trigger) GetEvents() []string

func (*Trigger) IsMatch

func (t *Trigger) IsMatch(branche, event string) bool

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) ProtoReflect

func (x *Trigger) ProtoReflect() protoreflect.Message

func (*Trigger) Reset

func (x *Trigger) Reset()

func (*Trigger) String

func (x *Trigger) String() string

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) AuditStep

func (UnimplementedServiceServer) CancelStep

func (UnimplementedServiceServer) CreatePipeline

func (UnimplementedServiceServer) CreateStep

func (UnimplementedServiceServer) DeletePipeline

func (UnimplementedServiceServer) DeleteStep

func (UnimplementedServiceServer) DescribePipeline

func (UnimplementedServiceServer) DescribeStep

func (UnimplementedServiceServer) QueryPipeline

func (UnimplementedServiceServer) QueryStep

func (UnimplementedServiceServer) WatchPipeline

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

type WatchPipelineRequest

type WatchPipelineRequest struct {

	// Types that are assignable to RequestUnion:
	//	*WatchPipelineRequest_CreateRequest
	//	*WatchPipelineRequest_CancelRequest
	RequestUnion isWatchPipelineRequest_RequestUnion `protobuf_oneof:"request_union"`
	// contains filtered or unexported fields
}

func (*WatchPipelineRequest) Descriptor deprecated

func (*WatchPipelineRequest) Descriptor() ([]byte, []int)

Deprecated: Use WatchPipelineRequest.ProtoReflect.Descriptor instead.

func (*WatchPipelineRequest) GetCancelRequest

func (x *WatchPipelineRequest) GetCancelRequest() *CancelWatchPipelineRequest

func (*WatchPipelineRequest) GetCreateRequest

func (x *WatchPipelineRequest) GetCreateRequest() *CreateWatchPipelineRequest

func (*WatchPipelineRequest) GetRequestUnion

func (m *WatchPipelineRequest) GetRequestUnion() isWatchPipelineRequest_RequestUnion

func (*WatchPipelineRequest) ProtoMessage

func (*WatchPipelineRequest) ProtoMessage()

func (*WatchPipelineRequest) ProtoReflect

func (x *WatchPipelineRequest) ProtoReflect() protoreflect.Message

func (*WatchPipelineRequest) Reset

func (x *WatchPipelineRequest) Reset()

func (*WatchPipelineRequest) String

func (x *WatchPipelineRequest) String() string

type WatchPipelineRequest_CancelRequest

type WatchPipelineRequest_CancelRequest struct {
	CancelRequest *CancelWatchPipelineRequest `protobuf:"bytes,2,opt,name=cancel_request,json=cancelRequest,proto3,oneof"`
}

type WatchPipelineRequest_CreateRequest

type WatchPipelineRequest_CreateRequest struct {
	CreateRequest *CreateWatchPipelineRequest `protobuf:"bytes,1,opt,name=create_request,json=createRequest,proto3,oneof"`
}

type WatchPipelineResponse

type WatchPipelineResponse struct {

	// @gotags: json:"watch_id"
	WatchId int64 `protobuf:"varint,1,opt,name=watch_id,json=watchId,proto3" json:"watch_id"`
	// @gotags: json:"pipeline"
	Pipeline *Pipeline `protobuf:"bytes,2,opt,name=pipeline,proto3" json:"pipeline"`
	// contains filtered or unexported fields
}

func (*WatchPipelineResponse) Descriptor deprecated

func (*WatchPipelineResponse) Descriptor() ([]byte, []int)

Deprecated: Use WatchPipelineResponse.ProtoReflect.Descriptor instead.

func (*WatchPipelineResponse) GetPipeline

func (x *WatchPipelineResponse) GetPipeline() *Pipeline

func (*WatchPipelineResponse) GetWatchId

func (x *WatchPipelineResponse) GetWatchId() int64

func (*WatchPipelineResponse) ProtoMessage

func (*WatchPipelineResponse) ProtoMessage()

func (*WatchPipelineResponse) ProtoReflect

func (x *WatchPipelineResponse) ProtoReflect() protoreflect.Message

func (*WatchPipelineResponse) Reset

func (x *WatchPipelineResponse) Reset()

func (*WatchPipelineResponse) String

func (x *WatchPipelineResponse) String() string

type WebHook

type WebHook struct {

	// POST URL
	// @gotags: bson:"url" json:"url" validate:"required,url"
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url" bson:"url" validate:"required,url"`
	// 需要自定义添加的头, 用于身份认证
	// @gotags: bson:"header" json:"header"
	Header map[string]string `` /* 157-byte string literal not displayed */
	// 那些状态下触发
	// @gotags: bson:"events" json:"events"
	Events []STEP_STATUS `protobuf:"varint,3,rep,packed,name=events,proto3,enum=infraboard.workflow.pipeline.STEP_STATUS" json:"events" bson:"events"`
	// 简单的描述信息
	// @gotags: bson:"description" json:"description"
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description" bson:"description"`
	// 推送结果
	// @gotags: bson:"status" json:"status"
	Status *WebHookStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status" bson:"status"`
	// contains filtered or unexported fields
}

func (*WebHook) Descriptor deprecated

func (*WebHook) Descriptor() ([]byte, []int)

Deprecated: Use WebHook.ProtoReflect.Descriptor instead.

func (*WebHook) GetDescription

func (x *WebHook) GetDescription() string

func (*WebHook) GetEvents

func (x *WebHook) GetEvents() []STEP_STATUS

func (*WebHook) GetHeader

func (x *WebHook) GetHeader() map[string]string

func (*WebHook) GetStatus

func (x *WebHook) GetStatus() *WebHookStatus

func (*WebHook) GetUrl

func (x *WebHook) GetUrl() string

func (*WebHook) IsMatch

func (h *WebHook) IsMatch(t STEP_STATUS) bool

func (*WebHook) ProtoMessage

func (*WebHook) ProtoMessage()

func (*WebHook) ProtoReflect

func (x *WebHook) ProtoReflect() protoreflect.Message

func (*WebHook) Reset

func (x *WebHook) Reset()

func (*WebHook) SendFailed

func (h *WebHook) SendFailed(format string, a ...interface{})

func (*WebHook) StartSend

func (h *WebHook) StartSend()

func (*WebHook) String

func (x *WebHook) String() string

func (*WebHook) Success

func (h *WebHook) Success(message string)

type WebHookStatus

type WebHookStatus struct {

	// 开始时间
	// @gotags: bson:"start_at" json:"start_at"
	StartAt int64 `protobuf:"varint,1,opt,name=start_at,json=startAt,proto3" json:"start_at" bson:"start_at"`
	// 耗时多久,单位毫秒
	// @gotags: bson:"cost" json:"cost"
	Cost int64 `protobuf:"varint,2,opt,name=cost,proto3" json:"cost" bson:"cost"`
	// 是否推送成功
	// @gotags: bson:"success" json:"success"
	Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success" bson:"success"`
	// 异常时的错误信息
	// @gotags: bson:"message" json:"message"
	Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message" bson:"message"`
	// contains filtered or unexported fields
}

func (*WebHookStatus) Descriptor deprecated

func (*WebHookStatus) Descriptor() ([]byte, []int)

Deprecated: Use WebHookStatus.ProtoReflect.Descriptor instead.

func (*WebHookStatus) GetCost

func (x *WebHookStatus) GetCost() int64

func (*WebHookStatus) GetMessage

func (x *WebHookStatus) GetMessage() string

func (*WebHookStatus) GetStartAt

func (x *WebHookStatus) GetStartAt() int64

func (*WebHookStatus) GetSuccess

func (x *WebHookStatus) GetSuccess() bool

func (*WebHookStatus) ProtoMessage

func (*WebHookStatus) ProtoMessage()

func (*WebHookStatus) ProtoReflect

func (x *WebHookStatus) ProtoReflect() protoreflect.Message

func (*WebHookStatus) Reset

func (x *WebHookStatus) Reset()

func (*WebHookStatus) String

func (x *WebHookStatus) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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