Documentation ¶
Index ¶
- Variables
- func RegisterTaskServiceServer(s *grpc.Server, srv TaskServiceServer)
- type PlanRequest
- type PlanResponse
- func (*PlanResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PlanResponse) GetCode() int32
- func (x *PlanResponse) GetPlanID() string
- func (*PlanResponse) ProtoMessage()
- func (x *PlanResponse) ProtoReflect() protoreflect.Message
- func (x *PlanResponse) Reset()
- func (x *PlanResponse) String() string
- type TaskRequest
- func (*TaskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TaskRequest) GetAgeReq() int32
- func (x *TaskRequest) GetLocalTime() string
- func (x *TaskRequest) GetNameReq() string
- func (x *TaskRequest) GetRequest() string
- func (*TaskRequest) ProtoMessage()
- func (x *TaskRequest) ProtoReflect() protoreflect.Message
- func (x *TaskRequest) Reset()
- func (x *TaskRequest) String() string
- type TaskResponse
- func (*TaskResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TaskResponse) GetAgeRes() int32
- func (x *TaskResponse) GetCode() TaskResponse_Code
- func (x *TaskResponse) GetLocalAndServerTime() string
- func (x *TaskResponse) GetNameRes() string
- func (x *TaskResponse) GetResponse() string
- func (*TaskResponse) ProtoMessage()
- func (x *TaskResponse) ProtoReflect() protoreflect.Message
- func (x *TaskResponse) Reset()
- func (x *TaskResponse) String() string
- type TaskResponse_Code
- func (TaskResponse_Code) Descriptor() protoreflect.EnumDescriptor
- func (x TaskResponse_Code) Enum() *TaskResponse_Code
- func (TaskResponse_Code) EnumDescriptor() ([]byte, []int)deprecated
- func (x TaskResponse_Code) Number() protoreflect.EnumNumber
- func (x TaskResponse_Code) String() string
- func (TaskResponse_Code) Type() protoreflect.EnumType
- type TaskServiceClient
- type TaskServiceServer
- type UnimplementedTaskServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( TaskResponse_Code_name = map[int32]string{ 0: "failed", 1: "success", 2: "excepted", } TaskResponse_Code_value = map[string]int32{ "failed": 0, "success": 1, "excepted": 2, } )
Enum value maps for TaskResponse_Code.
var File_proto_task_task_proto protoreflect.FileDescriptor
Functions ¶
func RegisterTaskServiceServer ¶
func RegisterTaskServiceServer(s *grpc.Server, srv TaskServiceServer)
Types ¶
type PlanRequest ¶
type PlanRequest struct { PlanID string `protobuf:"bytes,1,opt,name=PlanID,proto3" json:"PlanID,omitempty"` // contains filtered or unexported fields }
func (*PlanRequest) Descriptor
deprecated
func (*PlanRequest) Descriptor() ([]byte, []int)
Deprecated: Use PlanRequest.ProtoReflect.Descriptor instead.
func (*PlanRequest) GetPlanID ¶
func (x *PlanRequest) GetPlanID() string
func (*PlanRequest) ProtoMessage ¶
func (*PlanRequest) ProtoMessage()
func (*PlanRequest) ProtoReflect ¶
func (x *PlanRequest) ProtoReflect() protoreflect.Message
func (*PlanRequest) Reset ¶
func (x *PlanRequest) Reset()
func (*PlanRequest) String ¶
func (x *PlanRequest) String() string
type PlanResponse ¶
type PlanResponse struct { PlanID string `protobuf:"bytes,1,opt,name=PlanID,proto3" json:"PlanID,omitempty"` Code int32 `protobuf:"varint,2,opt,name=Code,proto3" json:"Code,omitempty"` // contains filtered or unexported fields }
func (*PlanResponse) Descriptor
deprecated
func (*PlanResponse) Descriptor() ([]byte, []int)
Deprecated: Use PlanResponse.ProtoReflect.Descriptor instead.
func (*PlanResponse) GetCode ¶
func (x *PlanResponse) GetCode() int32
func (*PlanResponse) GetPlanID ¶
func (x *PlanResponse) GetPlanID() string
func (*PlanResponse) ProtoMessage ¶
func (*PlanResponse) ProtoMessage()
func (*PlanResponse) ProtoReflect ¶
func (x *PlanResponse) ProtoReflect() protoreflect.Message
func (*PlanResponse) Reset ¶
func (x *PlanResponse) Reset()
func (*PlanResponse) String ¶
func (x *PlanResponse) String() string
type TaskRequest ¶
type TaskRequest struct { Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` NameReq string `protobuf:"bytes,2,opt,name=nameReq,proto3" json:"nameReq,omitempty"` AgeReq int32 `protobuf:"varint,3,opt,name=ageReq,proto3" json:"ageReq,omitempty"` LocalTime string `protobuf:"bytes,4,opt,name=localTime,proto3" json:"localTime,omitempty"` // contains filtered or unexported fields }
func (*TaskRequest) Descriptor
deprecated
func (*TaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use TaskRequest.ProtoReflect.Descriptor instead.
func (*TaskRequest) GetAgeReq ¶
func (x *TaskRequest) GetAgeReq() int32
func (*TaskRequest) GetLocalTime ¶
func (x *TaskRequest) GetLocalTime() string
func (*TaskRequest) GetNameReq ¶
func (x *TaskRequest) GetNameReq() string
func (*TaskRequest) GetRequest ¶
func (x *TaskRequest) GetRequest() string
func (*TaskRequest) ProtoMessage ¶
func (*TaskRequest) ProtoMessage()
func (*TaskRequest) ProtoReflect ¶
func (x *TaskRequest) ProtoReflect() protoreflect.Message
func (*TaskRequest) Reset ¶
func (x *TaskRequest) Reset()
func (*TaskRequest) String ¶
func (x *TaskRequest) String() string
type TaskResponse ¶
type TaskResponse struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` NameRes string `protobuf:"bytes,2,opt,name=nameRes,proto3" json:"nameRes,omitempty"` AgeRes int32 `protobuf:"varint,3,opt,name=ageRes,proto3" json:"ageRes,omitempty"` LocalAndServerTime string `protobuf:"bytes,4,opt,name=localAndServerTime,proto3" json:"localAndServerTime,omitempty"` Code TaskResponse_Code `protobuf:"varint,5,opt,name=code,proto3,enum=task.TaskResponse_Code" json:"code,omitempty"` // contains filtered or unexported fields }
func (*TaskResponse) Descriptor
deprecated
func (*TaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use TaskResponse.ProtoReflect.Descriptor instead.
func (*TaskResponse) GetAgeRes ¶
func (x *TaskResponse) GetAgeRes() int32
func (*TaskResponse) GetCode ¶
func (x *TaskResponse) GetCode() TaskResponse_Code
func (*TaskResponse) GetLocalAndServerTime ¶
func (x *TaskResponse) GetLocalAndServerTime() string
func (*TaskResponse) GetNameRes ¶
func (x *TaskResponse) GetNameRes() string
func (*TaskResponse) GetResponse ¶
func (x *TaskResponse) GetResponse() string
func (*TaskResponse) ProtoMessage ¶
func (*TaskResponse) ProtoMessage()
func (*TaskResponse) ProtoReflect ¶
func (x *TaskResponse) ProtoReflect() protoreflect.Message
func (*TaskResponse) Reset ¶
func (x *TaskResponse) Reset()
func (*TaskResponse) String ¶
func (x *TaskResponse) String() string
type TaskResponse_Code ¶
type TaskResponse_Code int32
const ( TaskResponse_failed TaskResponse_Code = 0 TaskResponse_success TaskResponse_Code = 1 TaskResponse_excepted TaskResponse_Code = 2 )
func (TaskResponse_Code) Descriptor ¶
func (TaskResponse_Code) Descriptor() protoreflect.EnumDescriptor
func (TaskResponse_Code) Enum ¶
func (x TaskResponse_Code) Enum() *TaskResponse_Code
func (TaskResponse_Code) EnumDescriptor
deprecated
func (TaskResponse_Code) EnumDescriptor() ([]byte, []int)
Deprecated: Use TaskResponse_Code.Descriptor instead.
func (TaskResponse_Code) Number ¶
func (x TaskResponse_Code) Number() protoreflect.EnumNumber
func (TaskResponse_Code) String ¶
func (x TaskResponse_Code) String() string
func (TaskResponse_Code) Type ¶
func (TaskResponse_Code) Type() protoreflect.EnumType
type TaskServiceClient ¶
type TaskServiceClient interface { Search(ctx context.Context, in *TaskRequest, opts ...grpc.CallOption) (*TaskResponse, error) PlanDetail(ctx context.Context, in *PlanRequest, opts ...grpc.CallOption) (*PlanResponse, error) }
TaskServiceClient is the client API for TaskService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTaskServiceClient ¶
func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient
type TaskServiceServer ¶
type TaskServiceServer interface { Search(context.Context, *TaskRequest) (*TaskResponse, error) PlanDetail(context.Context, *PlanRequest) (*PlanResponse, error) }
TaskServiceServer is the server API for TaskService service.
type UnimplementedTaskServiceServer ¶
type UnimplementedTaskServiceServer struct { }
UnimplementedTaskServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedTaskServiceServer) PlanDetail ¶
func (*UnimplementedTaskServiceServer) PlanDetail(context.Context, *PlanRequest) (*PlanResponse, error)
func (*UnimplementedTaskServiceServer) Search ¶
func (*UnimplementedTaskServiceServer) Search(context.Context, *TaskRequest) (*TaskResponse, error)