protobuf

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Job_InvokeService_FullMethodName    = "/protobuf.Job/InvokeService"
	Job_UpdateProgress_FullMethodName   = "/protobuf.Job/UpdateProgress"
	Job_CreateAttachment_FullMethodName = "/protobuf.Job/CreateAttachment"
)
View Source
const (
	Task_Execute_FullMethodName        = "/protobuf.Task/Execute"
	Task_GetDescription_FullMethodName = "/protobuf.Task/GetDescription"
)

Variables

View Source
var File_proto_job_proto protoreflect.FileDescriptor
View Source
var File_proto_task_proto protoreflect.FileDescriptor
View Source
var Job_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.Job",
	HandlerType: (*JobServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InvokeService",
			Handler:    _Job_InvokeService_Handler,
		},
		{
			MethodName: "UpdateProgress",
			Handler:    _Job_UpdateProgress_Handler,
		},
		{
			MethodName: "CreateAttachment",
			Handler:    _Job_CreateAttachment_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/job.proto",
}

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

View Source
var Task_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.Task",
	HandlerType: (*TaskServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Execute",
			Handler:    _Task_Execute_Handler,
		},
		{
			MethodName: "GetDescription",
			Handler:    _Task_GetDescription_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/task.proto",
}

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

Functions

func RegisterJobServer

func RegisterJobServer(s grpc.ServiceRegistrar, srv JobServer)

func RegisterTaskServer

func RegisterTaskServer(s grpc.ServiceRegistrar, srv TaskServer)

Types

type ExecuteTaskRequest added in v0.0.3

type ExecuteTaskRequest struct {
	Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecuteTaskRequest) Descriptor deprecated added in v0.0.3

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

Deprecated: Use ExecuteTaskRequest.ProtoReflect.Descriptor instead.

func (*ExecuteTaskRequest) GetRequest added in v0.0.3

func (x *ExecuteTaskRequest) GetRequest() []byte

func (*ExecuteTaskRequest) ProtoMessage added in v0.0.3

func (*ExecuteTaskRequest) ProtoMessage()

func (*ExecuteTaskRequest) ProtoReflect added in v0.0.3

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

func (*ExecuteTaskRequest) Reset added in v0.0.3

func (x *ExecuteTaskRequest) Reset()

func (*ExecuteTaskRequest) String added in v0.0.3

func (x *ExecuteTaskRequest) String() string

type ExecuteTaskResponse added in v0.0.3

type ExecuteTaskResponse struct {
	Url    string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	ErrMsg string `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecuteTaskResponse) Descriptor deprecated added in v0.0.3

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

Deprecated: Use ExecuteTaskResponse.ProtoReflect.Descriptor instead.

func (*ExecuteTaskResponse) GetErrMsg added in v0.0.4

func (x *ExecuteTaskResponse) GetErrMsg() string

func (*ExecuteTaskResponse) GetUrl added in v0.0.4

func (x *ExecuteTaskResponse) GetUrl() string

func (*ExecuteTaskResponse) ProtoMessage added in v0.0.3

func (*ExecuteTaskResponse) ProtoMessage()

func (*ExecuteTaskResponse) ProtoReflect added in v0.0.3

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

func (*ExecuteTaskResponse) Reset added in v0.0.3

func (x *ExecuteTaskResponse) Reset()

func (*ExecuteTaskResponse) String added in v0.0.3

func (x *ExecuteTaskResponse) String() string

type GetTaskDescriptionRequest added in v0.0.3

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

执行请求

func (*GetTaskDescriptionRequest) Descriptor deprecated added in v0.0.3

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

Deprecated: Use GetTaskDescriptionRequest.ProtoReflect.Descriptor instead.

func (*GetTaskDescriptionRequest) ProtoMessage added in v0.0.3

func (*GetTaskDescriptionRequest) ProtoMessage()

func (*GetTaskDescriptionRequest) ProtoReflect added in v0.0.3

func (*GetTaskDescriptionRequest) Reset added in v0.0.3

func (x *GetTaskDescriptionRequest) Reset()

func (*GetTaskDescriptionRequest) String added in v0.0.3

func (x *GetTaskDescriptionRequest) String() string

type GetTaskDescriptionResponse added in v0.0.3

type GetTaskDescriptionResponse struct {
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

执行响应

func (*GetTaskDescriptionResponse) Descriptor deprecated added in v0.0.3

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

Deprecated: Use GetTaskDescriptionResponse.ProtoReflect.Descriptor instead.

func (*GetTaskDescriptionResponse) GetDescription added in v0.0.3

func (x *GetTaskDescriptionResponse) GetDescription() string

func (*GetTaskDescriptionResponse) ProtoMessage added in v0.0.3

func (*GetTaskDescriptionResponse) ProtoMessage()

func (*GetTaskDescriptionResponse) ProtoReflect added in v0.0.3

func (*GetTaskDescriptionResponse) Reset added in v0.0.3

func (x *GetTaskDescriptionResponse) Reset()

func (*GetTaskDescriptionResponse) String added in v0.0.3

func (x *GetTaskDescriptionResponse) String() string

type JobClient

type JobClient interface {
	InvokeService(ctx context.Context, in *JobInvokeServiceRequest, opts ...grpc.CallOption) (*JobInvokeServiceResponse, error)
	UpdateProgress(ctx context.Context, in *JobUpdateProgressRequest, opts ...grpc.CallOption) (*JobUpdateProgressResponse, error)
	CreateAttachment(ctx context.Context, in *JobCreateAttachmentRequest, opts ...grpc.CallOption) (*JobCreateAttachmentResponse, error)
}

JobClient is the client API for Job 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 NewJobClient

func NewJobClient(cc grpc.ClientConnInterface) JobClient

type JobCreateAttachmentRequest added in v0.0.3

type JobCreateAttachmentRequest struct {
	JobName  string `protobuf:"bytes,1,opt,name=jobName,proto3" json:"jobName,omitempty"`
	Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	Data     []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*JobCreateAttachmentRequest) Descriptor deprecated added in v0.0.3

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

Deprecated: Use JobCreateAttachmentRequest.ProtoReflect.Descriptor instead.

func (*JobCreateAttachmentRequest) GetData added in v0.0.3

func (x *JobCreateAttachmentRequest) GetData() []byte

func (*JobCreateAttachmentRequest) GetFilename added in v0.0.3

func (x *JobCreateAttachmentRequest) GetFilename() string

func (*JobCreateAttachmentRequest) GetJobName added in v0.0.3

func (x *JobCreateAttachmentRequest) GetJobName() string

func (*JobCreateAttachmentRequest) ProtoMessage added in v0.0.3

func (*JobCreateAttachmentRequest) ProtoMessage()

func (*JobCreateAttachmentRequest) ProtoReflect added in v0.0.3

func (*JobCreateAttachmentRequest) Reset added in v0.0.3

func (x *JobCreateAttachmentRequest) Reset()

func (*JobCreateAttachmentRequest) String added in v0.0.3

func (x *JobCreateAttachmentRequest) String() string

type JobCreateAttachmentResponse added in v0.0.3

type JobCreateAttachmentResponse struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*JobCreateAttachmentResponse) Descriptor deprecated added in v0.0.3

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

Deprecated: Use JobCreateAttachmentResponse.ProtoReflect.Descriptor instead.

func (*JobCreateAttachmentResponse) GetUrl added in v0.0.3

func (x *JobCreateAttachmentResponse) GetUrl() string

func (*JobCreateAttachmentResponse) ProtoMessage added in v0.0.3

func (*JobCreateAttachmentResponse) ProtoMessage()

func (*JobCreateAttachmentResponse) ProtoReflect added in v0.0.3

func (*JobCreateAttachmentResponse) Reset added in v0.0.3

func (x *JobCreateAttachmentResponse) Reset()

func (*JobCreateAttachmentResponse) String added in v0.0.3

func (x *JobCreateAttachmentResponse) String() string

type JobInvokeServiceRequest

type JobInvokeServiceRequest struct {
	App     string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
	Version int32  `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	Module  string `protobuf:"bytes,3,opt,name=module,proto3" json:"module,omitempty"`
	Method  string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`
	Request []byte `protobuf:"bytes,5,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*JobInvokeServiceRequest) Descriptor deprecated

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

Deprecated: Use JobInvokeServiceRequest.ProtoReflect.Descriptor instead.

func (*JobInvokeServiceRequest) GetApp

func (x *JobInvokeServiceRequest) GetApp() string

func (*JobInvokeServiceRequest) GetMethod

func (x *JobInvokeServiceRequest) GetMethod() string

func (*JobInvokeServiceRequest) GetModule

func (x *JobInvokeServiceRequest) GetModule() string

func (*JobInvokeServiceRequest) GetRequest

func (x *JobInvokeServiceRequest) GetRequest() []byte

func (*JobInvokeServiceRequest) GetVersion

func (x *JobInvokeServiceRequest) GetVersion() int32

func (*JobInvokeServiceRequest) ProtoMessage

func (*JobInvokeServiceRequest) ProtoMessage()

func (*JobInvokeServiceRequest) ProtoReflect

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

func (*JobInvokeServiceRequest) Reset

func (x *JobInvokeServiceRequest) Reset()

func (*JobInvokeServiceRequest) String

func (x *JobInvokeServiceRequest) String() string

type JobInvokeServiceResponse

type JobInvokeServiceResponse struct {
	Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*JobInvokeServiceResponse) Descriptor deprecated

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

Deprecated: Use JobInvokeServiceResponse.ProtoReflect.Descriptor instead.

func (*JobInvokeServiceResponse) GetResponse

func (x *JobInvokeServiceResponse) GetResponse() []byte

func (*JobInvokeServiceResponse) ProtoMessage

func (*JobInvokeServiceResponse) ProtoMessage()

func (*JobInvokeServiceResponse) ProtoReflect

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

func (*JobInvokeServiceResponse) Reset

func (x *JobInvokeServiceResponse) Reset()

func (*JobInvokeServiceResponse) String

func (x *JobInvokeServiceResponse) String() string

type JobServer

type JobServer interface {
	InvokeService(context.Context, *JobInvokeServiceRequest) (*JobInvokeServiceResponse, error)
	UpdateProgress(context.Context, *JobUpdateProgressRequest) (*JobUpdateProgressResponse, error)
	CreateAttachment(context.Context, *JobCreateAttachmentRequest) (*JobCreateAttachmentResponse, error)
	// contains filtered or unexported methods
}

JobServer is the server API for Job service. All implementations must embed UnimplementedJobServer for forward compatibility.

type JobUpdateProgressRequest

type JobUpdateProgressRequest struct {
	Id       int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Progress int32 `protobuf:"varint,2,opt,name=progress,proto3" json:"progress,omitempty"`
	// contains filtered or unexported fields
}

func (*JobUpdateProgressRequest) Descriptor deprecated

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

Deprecated: Use JobUpdateProgressRequest.ProtoReflect.Descriptor instead.

func (*JobUpdateProgressRequest) GetId added in v0.0.3

func (x *JobUpdateProgressRequest) GetId() int64

func (*JobUpdateProgressRequest) GetProgress

func (x *JobUpdateProgressRequest) GetProgress() int32

func (*JobUpdateProgressRequest) ProtoMessage

func (*JobUpdateProgressRequest) ProtoMessage()

func (*JobUpdateProgressRequest) ProtoReflect

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

func (*JobUpdateProgressRequest) Reset

func (x *JobUpdateProgressRequest) Reset()

func (*JobUpdateProgressRequest) String

func (x *JobUpdateProgressRequest) String() string

type JobUpdateProgressResponse

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

func (*JobUpdateProgressResponse) Descriptor deprecated

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

Deprecated: Use JobUpdateProgressResponse.ProtoReflect.Descriptor instead.

func (*JobUpdateProgressResponse) ProtoMessage

func (*JobUpdateProgressResponse) ProtoMessage()

func (*JobUpdateProgressResponse) ProtoReflect

func (*JobUpdateProgressResponse) Reset

func (x *JobUpdateProgressResponse) Reset()

func (*JobUpdateProgressResponse) String

func (x *JobUpdateProgressResponse) String() string

type TaskClient

type TaskClient interface {
	Execute(ctx context.Context, in *ExecuteTaskRequest, opts ...grpc.CallOption) (*ExecuteTaskResponse, error)
	GetDescription(ctx context.Context, in *GetTaskDescriptionRequest, opts ...grpc.CallOption) (*GetTaskDescriptionResponse, error)
}

TaskClient is the client API for Task 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 NewTaskClient

func NewTaskClient(cc grpc.ClientConnInterface) TaskClient

type TaskServer

type TaskServer interface {
	Execute(context.Context, *ExecuteTaskRequest) (*ExecuteTaskResponse, error)
	GetDescription(context.Context, *GetTaskDescriptionRequest) (*GetTaskDescriptionResponse, error)
	// contains filtered or unexported methods
}

TaskServer is the server API for Task service. All implementations must embed UnimplementedTaskServer for forward compatibility.

type UnimplementedJobServer

type UnimplementedJobServer struct{}

UnimplementedJobServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedJobServer) CreateAttachment added in v0.0.3

type UnimplementedTaskServer

type UnimplementedTaskServer struct{}

UnimplementedTaskServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTaskServer) Execute

func (UnimplementedTaskServer) GetDescription added in v0.0.3

type UnsafeJobServer

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

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

type UnsafeTaskServer

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

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

Jump to

Keyboard shortcuts

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