action

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: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "action"
)

Variables

View Source
var (
	RUNNER_TYPE_name = map[int32]string{
		0: "DOCKER",
		1: "K8s",
		2: "LOCAL",
	}
	RUNNER_TYPE_value = map[string]int32{
		"DOCKER": 0,
		"K8s":    1,
		"LOCAL":  2,
	}
)

Enum value maps for RUNNER_TYPE.

View Source
var File_api_apps_action_pb_action_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infraboard.workflow.action.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateAction",
			Handler:    _Service_CreateAction_Handler,
		},
		{
			MethodName: "QueryAction",
			Handler:    _Service_QueryAction_Handler,
		},
		{
			MethodName: "DescribeAction",
			Handler:    _Service_DescribeAction_Handler,
		},
		{
			MethodName: "UpdateAction",
			Handler:    _Service_UpdateAction_Handler,
		},
		{
			MethodName: "DeleteAction",
			Handler:    _Service_DeleteAction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/apps/action/pb/action.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 HttpEntry

func HttpEntry() *http.EntrySet

HttpEntry todo

func ParseActionKey

func ParseActionKey(key string) (name, version string)

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Action

type Action struct {

	// 名称
	// @gotags: bson:"_id" json:"id" validate:"required"
	Id string `protobuf:"bytes,19,opt,name=id,proto3" json:"id" bson:"_id" validate:"required"`
	// @gotags: bson:"logo" json:"logo"
	Logo string `protobuf:"bytes,20,opt,name=logo,proto3" json:"logo" bson:"logo"`
	// 展示名称
	// @gotags: bson:"display_name" json:"display_name"
	DisplayName string `protobuf:"bytes,21,opt,name=display_name,json=displayName,proto3" json:"display_name" bson:"display_name"`
	// 是否是最新版本, 最新版本只有一个
	// @gotags: bson:"is_latest" json:"is_latest"
	IsLatest bool `protobuf:"varint,22,opt,name=is_latest,json=isLatest,proto3" json:"is_latest" bson:"is_latest"`
	// 名称
	// @gotags: bson:"name" json:"name" validate:"required"
	Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name" bson:"name" validate:"required"`
	// Action对应的版本, 推荐默认v1
	// @gotags: json:"version" validate:"required"
	Version string `protobuf:"bytes,18,opt,name=version,proto3" json:"version" validate:"required"`
	// 资源版本
	// @gotags: bson:"resource_version" json:"resource_version,omitempty"
	ResourceVersion int64 `` /* 132-byte string literal not displayed */
	// 所属域
	// @gotags: bson:"domain" json:"domain"
	Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain" bson:"domain"`
	// 所属空间
	// @gotags: bson:"namespace" json:"namespace"
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace" bson:"namespace"`
	// 创建时间
	// @gotags: bson:"create_at" json:"create_at"
	CreateAt int64 `protobuf:"varint,3,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 创建人
	// @gotags: bson:"create_by" json:"create_by"
	CreateBy string `protobuf:"bytes,4,opt,name=create_by,json=createBy,proto3" json:"create_by" bson:"create_by"`
	// 更新时间
	// @gotags: bson:"update_at" json:"update_at"
	UpdateAt int64 `protobuf:"varint,5,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// 更新人
	// @gotags: bson:"update_by" json:"update_by"
	UpdateBy string `protobuf:"bytes,6,opt,name=update_by,json=updateBy,proto3" json:"update_by" bson:"update_by"`
	// 可见模式
	// @gotags: bson:"visiable_mode" json:"visiable_mode"
	VisiableMode resource.VisiableMode `` /* 154-byte string literal not displayed */
	// 执行器类型, 默认采用Node节点本地Docker执行
	// @gotags: bson:"runner_type" json:"runner_type"
	RunnerType RUNNER_TYPE `` /* 146-byte string literal not displayed */
	// runner运行时参数
	// @gotags: bson:"runner_params" json:"runner_params"
	RunnerParams map[string]string `` /* 197-byte string literal not displayed */
	// step运行时的参数说明
	// @gotags: bson:"run_params" json:"run_params"
	RunParams []*RunParamDesc `protobuf:"bytes,14,rep,name=run_params,json=runParams,proto3" json:"run_params" bson:"run_params"`
	// 标签
	// @gotags: bson:"tags" json:"tags"
	Tags map[string]string `` /* 152-byte string literal not displayed */
	// 描述
	// @gotags: bson:"description" json:"description"
	Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description" bson:"description"`
	// contains filtered or unexported fields
}

Action 动作定义

func LoadActionFromBytes

func LoadActionFromBytes(payload []byte) (*Action, error)

func NewAction

func NewAction(req *CreateActionRequest) (*Action, error)

func NewDefaultAction

func NewDefaultAction() *Action

func (*Action) DefaultRunParam

func (a *Action) DefaultRunParam() map[string]string

func (*Action) Descriptor deprecated

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

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetCreateAt

func (x *Action) GetCreateAt() int64

func (*Action) GetCreateBy

func (x *Action) GetCreateBy() string

func (*Action) GetDescription

func (x *Action) GetDescription() string

func (*Action) GetDisplayName

func (x *Action) GetDisplayName() string

func (*Action) GetDomain

func (x *Action) GetDomain() string

func (*Action) GetId

func (x *Action) GetId() string

func (*Action) GetIsLatest

func (x *Action) GetIsLatest() bool
func (x *Action) GetLogo() string

func (*Action) GetName

func (x *Action) GetName() string

func (*Action) GetNamespace

func (x *Action) GetNamespace() string

func (*Action) GetResourceVersion

func (x *Action) GetResourceVersion() int64

func (*Action) GetRunParams

func (x *Action) GetRunParams() []*RunParamDesc

func (*Action) GetRunnerParams

func (x *Action) GetRunnerParams() map[string]string

func (*Action) GetRunnerType

func (x *Action) GetRunnerType() RUNNER_TYPE

func (*Action) GetTags

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

func (*Action) GetUpdateAt

func (x *Action) GetUpdateAt() int64

func (*Action) GetUpdateBy

func (x *Action) GetUpdateBy() string

func (*Action) GetVersion

func (x *Action) GetVersion() string

func (*Action) GetVisiableMode

func (x *Action) GetVisiableMode() resource.VisiableMode

func (*Action) InitNil

func (a *Action) InitNil()

func (*Action) Key

func (a *Action) Key() string

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

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

func (*Action) Reset

func (x *Action) Reset()

func (*Action) RunnerParam

func (a *Action) RunnerParam() map[string]string

func (*Action) String

func (x *Action) String() string

func (*Action) Update

func (a *Action) Update(req *UpdateActionRequest)

func (*Action) Validate

func (a *Action) Validate() error

func (*Action) ValidateRunParam

func (a *Action) ValidateRunParam(params map[string]string) error

ValidateParam 按照action的定义, 检查必传参数是否传人

type ActionSet

type ActionSet 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 []*Action `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

ActionSet todo

func NewActionSet

func NewActionSet() *ActionSet

NewActionSet todo

func (*ActionSet) Add

func (s *ActionSet) Add(item *Action)

func (*ActionSet) Descriptor deprecated

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

Deprecated: Use ActionSet.ProtoReflect.Descriptor instead.

func (*ActionSet) GetItems

func (x *ActionSet) GetItems() []*Action

func (*ActionSet) GetTotal

func (x *ActionSet) GetTotal() int64

func (*ActionSet) InitNil

func (s *ActionSet) InitNil()

func (*ActionSet) ProtoMessage

func (*ActionSet) ProtoMessage()

func (*ActionSet) ProtoReflect

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

func (*ActionSet) Reset

func (x *ActionSet) Reset()

func (*ActionSet) String

func (x *ActionSet) String() string

type CreateActionRequest

type CreateActionRequest struct {

	// 执行器类型, 默认采用Node节点本地Docker执行
	// @gotags: json:"runner_type"
	RunnerType RUNNER_TYPE `` /* 126-byte string literal not displayed */
	// 所属域
	// @gotags: json:"domain" validate:"required"
	Domain string `protobuf:"bytes,9,opt,name=domain,proto3" json:"domain" validate:"required"`
	// 所属空间
	// @gotags: json:"namespace" validate:"required"
	Namespace string `protobuf:"bytes,10,opt,name=namespace,proto3" json:"namespace" validate:"required"`
	// 创建人
	// @gotags: json:"create_by" validate:"required"
	CreateBy string `protobuf:"bytes,11,opt,name=create_by,json=createBy,proto3" json:"create_by" validate:"required"`
	// @gotags: json:"logo"
	Logo string `protobuf:"bytes,12,opt,name=logo,proto3" json:"logo"`
	// 名称
	// @gotags: json:"name" validate:"required"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" validate:"required"`
	// Action对应的版本, 推荐默认v1
	// @gotags: json:"version" validate:"required"
	Version string `protobuf:"bytes,8,opt,name=version,proto3" json:"version" validate:"required"`
	// 展示名称
	// @gotags: json:"display_name"
	DisplayName string `protobuf:"bytes,13,opt,name=display_name,json=displayName,proto3" json:"display_name"`
	// 可见模式
	// @gotags: json:"visiable_mode"
	VisiableMode resource.VisiableMode `` /* 132-byte string literal not displayed */
	// 运行时 Runner传人参数, 创建完成后不能修改, 要修改请新建版本
	// @gotags: bson:"runner_params" json:"runner_params"
	RunnerParams map[string]string `` /* 196-byte string literal not displayed */
	// 运行时 用户传人的参数说明
	// @gotags: bson:"run_params" json:"run_params"
	RunParams []*RunParamDesc `protobuf:"bytes,3,rep,name=run_params,json=runParams,proto3" json:"run_params" bson:"run_params"`
	// 标签
	// @gotags: json:"tags"
	Tags map[string]string `` /* 139-byte string literal not displayed */
	// 描述
	// @gotags: json:"description"
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description"`
	// contains filtered or unexported fields
}

func NewCreateActionRequest

func NewCreateActionRequest() *CreateActionRequest

func (*CreateActionRequest) Descriptor deprecated

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

Deprecated: Use CreateActionRequest.ProtoReflect.Descriptor instead.

func (*CreateActionRequest) GetCreateBy

func (x *CreateActionRequest) GetCreateBy() string

func (*CreateActionRequest) GetDescription

func (x *CreateActionRequest) GetDescription() string

func (*CreateActionRequest) GetDisplayName

func (x *CreateActionRequest) GetDisplayName() string

func (*CreateActionRequest) GetDomain

func (x *CreateActionRequest) GetDomain() string
func (x *CreateActionRequest) GetLogo() string

func (*CreateActionRequest) GetName

func (x *CreateActionRequest) GetName() string

func (*CreateActionRequest) GetNamespace

func (x *CreateActionRequest) GetNamespace() string

func (*CreateActionRequest) GetRunParams

func (x *CreateActionRequest) GetRunParams() []*RunParamDesc

func (*CreateActionRequest) GetRunnerParams

func (x *CreateActionRequest) GetRunnerParams() map[string]string

func (*CreateActionRequest) GetRunnerType

func (x *CreateActionRequest) GetRunnerType() RUNNER_TYPE

func (*CreateActionRequest) GetTags

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

func (*CreateActionRequest) GetVersion

func (x *CreateActionRequest) GetVersion() string

func (*CreateActionRequest) GetVisiableMode

func (x *CreateActionRequest) GetVisiableMode() resource.VisiableMode

func (*CreateActionRequest) ProtoMessage

func (*CreateActionRequest) ProtoMessage()

func (*CreateActionRequest) ProtoReflect

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

func (*CreateActionRequest) Reset

func (x *CreateActionRequest) Reset()

func (*CreateActionRequest) String

func (x *CreateActionRequest) String() string

func (*CreateActionRequest) UpdateOwner

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

func (*CreateActionRequest) Validate

func (req *CreateActionRequest) Validate() error

type DeleteActionRequest

type DeleteActionRequest struct {

	// 指定名称
	// @gotags: json:"name" validate:"required"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" validate:"required"`
	// 指定版本
	// @gotags: json:"version" validate:"required"
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version" validate:"required"`
	// 唯一空间
	// @gotags: json:"namespace" validate:"required"
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace" validate:"required"`
	// contains filtered or unexported fields
}

func NewDeleteActionRequest

func NewDeleteActionRequest(name, version string) *DeleteActionRequest

NewDeleteActionRequest 查询book列表

func (*DeleteActionRequest) Descriptor deprecated

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

Deprecated: Use DeleteActionRequest.ProtoReflect.Descriptor instead.

func (*DeleteActionRequest) GetName

func (x *DeleteActionRequest) GetName() string

func (*DeleteActionRequest) GetNamespace

func (x *DeleteActionRequest) GetNamespace() string

func (*DeleteActionRequest) GetVersion

func (x *DeleteActionRequest) GetVersion() string

func (*DeleteActionRequest) ProtoMessage

func (*DeleteActionRequest) ProtoMessage()

func (*DeleteActionRequest) ProtoReflect

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

func (*DeleteActionRequest) Reset

func (x *DeleteActionRequest) Reset()

func (*DeleteActionRequest) String

func (x *DeleteActionRequest) String() string

func (*DeleteActionRequest) Validate

func (req *DeleteActionRequest) Validate() error

type DescribeActionRequest

type DescribeActionRequest struct {

	// id
	// @gotags: json:"id"
	Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id"`
	// 名称
	// @gotags: json:"name"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
	// 对应的版本
	// @gotags: json:"version"
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version"`
	// contains filtered or unexported fields
}

func NewDescribeActionRequest

func NewDescribeActionRequest(name, version string) *DescribeActionRequest

NewQueryActionRequest 查询book列表

func (*DescribeActionRequest) Descriptor deprecated

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

Deprecated: Use DescribeActionRequest.ProtoReflect.Descriptor instead.

func (*DescribeActionRequest) GetId

func (x *DescribeActionRequest) GetId() string

func (*DescribeActionRequest) GetName

func (x *DescribeActionRequest) GetName() string

func (*DescribeActionRequest) GetVersion

func (x *DescribeActionRequest) GetVersion() string

func (*DescribeActionRequest) ProtoMessage

func (*DescribeActionRequest) ProtoMessage()

func (*DescribeActionRequest) ProtoReflect

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

func (*DescribeActionRequest) Reset

func (x *DescribeActionRequest) Reset()

func (*DescribeActionRequest) String

func (x *DescribeActionRequest) String() string

func (*DescribeActionRequest) Validate

func (req *DescribeActionRequest) Validate() error

type QueryActionRequest

type QueryActionRequest struct {

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

QueryPipelineRequest 查询Book请求

func NewQueryActionRequest

func NewQueryActionRequest(page *request.PageRequest) *QueryActionRequest

NewQueryActionRequest 查询book列表

func (*QueryActionRequest) Descriptor deprecated

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

Deprecated: Use QueryActionRequest.ProtoReflect.Descriptor instead.

func (*QueryActionRequest) GetName

func (x *QueryActionRequest) GetName() string

func (*QueryActionRequest) GetNamespace

func (x *QueryActionRequest) GetNamespace() string

func (*QueryActionRequest) GetPage

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

func (*QueryActionRequest) GetVersion

func (x *QueryActionRequest) GetVersion() string

func (*QueryActionRequest) ProtoMessage

func (*QueryActionRequest) ProtoMessage()

func (*QueryActionRequest) ProtoReflect

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

func (*QueryActionRequest) Reset

func (x *QueryActionRequest) Reset()

func (*QueryActionRequest) String

func (x *QueryActionRequest) String() string

type RUNNER_TYPE

type RUNNER_TYPE int32

STEP_RUNNER step执行类型

const (
	// 使用Node节点本地安装的Docker执行
	RUNNER_TYPE_DOCKER RUNNER_TYPE = 0
	// 使用K8s执行
	RUNNER_TYPE_K8s RUNNER_TYPE = 1
	// 本地执行, 用于在Node节点本地执行
	RUNNER_TYPE_LOCAL RUNNER_TYPE = 2
)

func ParseRUNNER_TYPEFromString

func ParseRUNNER_TYPEFromString(str string) (RUNNER_TYPE, error)

ParseRUNNER_TYPEFromString Parse RUNNER_TYPE from string

func (RUNNER_TYPE) Descriptor

func (RUNNER_TYPE) Enum

func (x RUNNER_TYPE) Enum() *RUNNER_TYPE

func (RUNNER_TYPE) EnumDescriptor deprecated

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

Deprecated: Use RUNNER_TYPE.Descriptor instead.

func (RUNNER_TYPE) Equal

func (t RUNNER_TYPE) Equal(target RUNNER_TYPE) bool

Equal type compare

func (RUNNER_TYPE) IsIn

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

IsIn todo

func (RUNNER_TYPE) MarshalJSON

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

MarshalJSON todo

func (RUNNER_TYPE) Number

func (x RUNNER_TYPE) Number() protoreflect.EnumNumber

func (RUNNER_TYPE) String

func (x RUNNER_TYPE) String() string

func (RUNNER_TYPE) Type

func (*RUNNER_TYPE) UnmarshalJSON

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

UnmarshalJSON todo

type RunParamDesc

type RunParamDesc struct {

	// 可选/必传
	// @gotags: bson:"required" json:"required"
	Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required" bson:"required"`
	// 建的名称
	// @gotags: bson:"key_name" json:"key_name" validate:"required"
	KeyName string `protobuf:"bytes,4,opt,name=key_name,json=keyName,proto3" json:"key_name" bson:"key_name" validate:"required"`
	// 建的描述
	// @gotags: bson:"key_desc" json:"key_desc"
	KeyDesc string `protobuf:"bytes,5,opt,name=key_desc,json=keyDesc,proto3" json:"key_desc" bson:"key_desc"`
	// 默认值, action运行时如果未传人,会填充默认值
	// @gotags: bson:"default_value" json:"default_value"
	DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value" bson:"default_value"`
	// 值描述
	// @gotags: bson:"value_desc" json:"value_desc"
	ValueDesc string `protobuf:"bytes,3,opt,name=value_desc,json=valueDesc,proto3" json:"value_desc" bson:"value_desc"`
	// contains filtered or unexported fields
}

func (*RunParamDesc) Descriptor deprecated

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

Deprecated: Use RunParamDesc.ProtoReflect.Descriptor instead.

func (*RunParamDesc) GetDefaultValue

func (x *RunParamDesc) GetDefaultValue() string

func (*RunParamDesc) GetKeyDesc

func (x *RunParamDesc) GetKeyDesc() string

func (*RunParamDesc) GetKeyName

func (x *RunParamDesc) GetKeyName() string

func (*RunParamDesc) GetRequired

func (x *RunParamDesc) GetRequired() bool

func (*RunParamDesc) GetValueDesc

func (x *RunParamDesc) GetValueDesc() string

func (*RunParamDesc) ProtoMessage

func (*RunParamDesc) ProtoMessage()

func (*RunParamDesc) ProtoReflect

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

func (*RunParamDesc) Reset

func (x *RunParamDesc) Reset()

func (*RunParamDesc) String

func (x *RunParamDesc) String() string

type RunnerParam

type RunnerParam struct {

	// 参数的值
	// @gotags: bson:"value" json:"value"
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value" bson:"value"`
	// 值描述
	// @gotags: bson:"describe" json:"describe"
	Describe string `protobuf:"bytes,2,opt,name=describe,proto3" json:"describe" bson:"describe"`
	// contains filtered or unexported fields
}

func (*RunnerParam) Descriptor deprecated

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

Deprecated: Use RunnerParam.ProtoReflect.Descriptor instead.

func (*RunnerParam) GetDescribe

func (x *RunnerParam) GetDescribe() string

func (*RunnerParam) GetValue

func (x *RunnerParam) GetValue() string

func (*RunnerParam) ProtoMessage

func (*RunnerParam) ProtoMessage()

func (*RunnerParam) ProtoReflect

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

func (*RunnerParam) Reset

func (x *RunnerParam) Reset()

func (*RunnerParam) String

func (x *RunnerParam) String() string

type ServiceClient

type ServiceClient interface {
	CreateAction(ctx context.Context, in *CreateActionRequest, opts ...grpc.CallOption) (*Action, error)
	QueryAction(ctx context.Context, in *QueryActionRequest, opts ...grpc.CallOption) (*ActionSet, error)
	DescribeAction(ctx context.Context, in *DescribeActionRequest, opts ...grpc.CallOption) (*Action, error)
	UpdateAction(ctx context.Context, in *UpdateActionRequest, opts ...grpc.CallOption) (*Action, error)
	DeleteAction(ctx context.Context, in *DeleteActionRequest, opts ...grpc.CallOption) (*Action, 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 {
	CreateAction(context.Context, *CreateActionRequest) (*Action, error)
	QueryAction(context.Context, *QueryActionRequest) (*ActionSet, error)
	DescribeAction(context.Context, *DescribeActionRequest) (*Action, error)
	UpdateAction(context.Context, *UpdateActionRequest) (*Action, error)
	DeleteAction(context.Context, *DeleteActionRequest) (*Action, error)
	// contains filtered or unexported methods
}

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

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) CreateAction

func (UnimplementedServiceServer) DeleteAction

func (UnimplementedServiceServer) DescribeAction

func (UnimplementedServiceServer) QueryAction

func (UnimplementedServiceServer) UpdateAction

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 UpdateActionRequest

type UpdateActionRequest struct {

	// 指定名称
	// @gotags: json:"name" validate:"required"
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name" validate:"required"`
	// 指定版本
	// @gotags: json:"version" validate:"required"
	Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version" validate:"required"`
	// 可见模式
	// @gotags: json:"visiable_mode"
	VisiableMode resource.VisiableMode `` /* 132-byte string literal not displayed */
	// 运行时的参数说明
	// @gotags: bson:"run_params" json:"run_params"
	RunParams []*RunParamDesc `protobuf:"bytes,2,rep,name=run_params,json=runParams,proto3" json:"run_params" bson:"run_params"`
	// 标签
	// @gotags: json:"tags"
	Tags map[string]string `` /* 139-byte string literal not displayed */
	// 描述
	// @gotags: json:"description"
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description"`
	// contains filtered or unexported fields
}

UpdateActionRequest, 不能修改ActionRunner运行参数, 如果需要修改,请新建一个版本

func NewUpdateActionRequest

func NewUpdateActionRequest() *UpdateActionRequest

func (*UpdateActionRequest) Descriptor deprecated

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

Deprecated: Use UpdateActionRequest.ProtoReflect.Descriptor instead.

func (*UpdateActionRequest) GetDescription

func (x *UpdateActionRequest) GetDescription() string

func (*UpdateActionRequest) GetName

func (x *UpdateActionRequest) GetName() string

func (*UpdateActionRequest) GetRunParams

func (x *UpdateActionRequest) GetRunParams() []*RunParamDesc

func (*UpdateActionRequest) GetTags

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

func (*UpdateActionRequest) GetVersion

func (x *UpdateActionRequest) GetVersion() string

func (*UpdateActionRequest) GetVisiableMode

func (x *UpdateActionRequest) GetVisiableMode() resource.VisiableMode

func (*UpdateActionRequest) ProtoMessage

func (*UpdateActionRequest) ProtoMessage()

func (*UpdateActionRequest) ProtoReflect

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

func (*UpdateActionRequest) Reset

func (x *UpdateActionRequest) Reset()

func (*UpdateActionRequest) String

func (x *UpdateActionRequest) String() string

func (*UpdateActionRequest) Validate

func (req *UpdateActionRequest) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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