Documentation ¶
Index ¶
- Variables
- func RegisterTrackingServer(s grpc.ServiceRegistrar, srv TrackingServer)
- type GetTrackingID
- type GetTrackingResponse
- func (*GetTrackingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetTrackingResponse) GetStatus() bool
- func (x *GetTrackingResponse) GetTracking() []*TrackResponse
- func (*GetTrackingResponse) ProtoMessage()
- func (x *GetTrackingResponse) ProtoReflect() protoreflect.Message
- func (x *GetTrackingResponse) Reset()
- func (x *GetTrackingResponse) String() string
- type PostTrack
- type PostTrackingRequest
- func (*PostTrackingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PostTrackingRequest) GetTrackingNumbers() []string
- func (*PostTrackingRequest) ProtoMessage()
- func (x *PostTrackingRequest) ProtoReflect() protoreflect.Message
- func (x *PostTrackingRequest) Reset()
- func (x *PostTrackingRequest) String() string
- type PostTrackingResponse
- func (*PostTrackingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PostTrackingResponse) GetTrackingId() string
- func (x *PostTrackingResponse) GetTrackingNumbers() []*PostTrack
- func (*PostTrackingResponse) ProtoMessage()
- func (x *PostTrackingResponse) ProtoReflect() protoreflect.Message
- func (x *PostTrackingResponse) Reset()
- func (x *PostTrackingResponse) String() string
- type TrackResponse
- func (*TrackResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TrackResponse) GetCode() string
- func (x *TrackResponse) GetId() string
- func (x *TrackResponse) GetResult() []*TrackResult
- func (x *TrackResponse) GetStatus() string
- func (x *TrackResponse) GetUuid() string
- func (*TrackResponse) ProtoMessage()
- func (x *TrackResponse) ProtoReflect() protoreflect.Message
- func (x *TrackResponse) Reset()
- func (x *TrackResponse) String() string
- type TrackResult
- func (*TrackResult) Descriptor() ([]byte, []int)deprecated
- func (x *TrackResult) GetError() string
- func (x *TrackResult) GetExecuteTime() float32
- func (x *TrackResult) GetResult() string
- func (x *TrackResult) GetSpider() string
- func (x *TrackResult) GetTrackingNumber() string
- func (*TrackResult) ProtoMessage()
- func (x *TrackResult) ProtoReflect() protoreflect.Message
- func (x *TrackResult) Reset()
- func (x *TrackResult) String() string
- type TrackingClient
- type TrackingServer
- type UnimplementedTrackingServer
- type UnsafeTrackingServer
Constants ¶
This section is empty.
Variables ¶
var File_tracking_proto protoreflect.FileDescriptor
var Tracking_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tracking.Tracking", HandlerType: (*TrackingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PostTracking", Handler: _Tracking_PostTracking_Handler, }, { MethodName: "GetResult", Handler: _Tracking_GetResult_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "tracking.proto", }
Tracking_ServiceDesc is the grpc.ServiceDesc for Tracking service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTrackingServer ¶
func RegisterTrackingServer(s grpc.ServiceRegistrar, srv TrackingServer)
Types ¶
type GetTrackingID ¶
type GetTrackingID struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetTrackingID) Descriptor
deprecated
func (*GetTrackingID) Descriptor() ([]byte, []int)
Deprecated: Use GetTrackingID.ProtoReflect.Descriptor instead.
func (*GetTrackingID) GetId ¶
func (x *GetTrackingID) GetId() string
func (*GetTrackingID) ProtoMessage ¶
func (*GetTrackingID) ProtoMessage()
func (*GetTrackingID) ProtoReflect ¶
func (x *GetTrackingID) ProtoReflect() protoreflect.Message
func (*GetTrackingID) Reset ¶
func (x *GetTrackingID) Reset()
func (*GetTrackingID) String ¶
func (x *GetTrackingID) String() string
type GetTrackingResponse ¶
type GetTrackingResponse struct { Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Tracking []*TrackResponse `protobuf:"bytes,2,rep,name=tracking,proto3" json:"tracking,omitempty"` // contains filtered or unexported fields }
func (*GetTrackingResponse) Descriptor
deprecated
func (*GetTrackingResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTrackingResponse.ProtoReflect.Descriptor instead.
func (*GetTrackingResponse) GetStatus ¶
func (x *GetTrackingResponse) GetStatus() bool
func (*GetTrackingResponse) GetTracking ¶
func (x *GetTrackingResponse) GetTracking() []*TrackResponse
func (*GetTrackingResponse) ProtoMessage ¶
func (*GetTrackingResponse) ProtoMessage()
func (*GetTrackingResponse) ProtoReflect ¶
func (x *GetTrackingResponse) ProtoReflect() protoreflect.Message
func (*GetTrackingResponse) Reset ¶
func (x *GetTrackingResponse) Reset()
func (*GetTrackingResponse) String ¶
func (x *GetTrackingResponse) String() string
type PostTrack ¶
type PostTrack struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*PostTrack) Descriptor
deprecated
func (*PostTrack) ProtoMessage ¶
func (*PostTrack) ProtoMessage()
func (*PostTrack) ProtoReflect ¶
func (x *PostTrack) ProtoReflect() protoreflect.Message
type PostTrackingRequest ¶
type PostTrackingRequest struct { TrackingNumbers []string `protobuf:"bytes,1,rep,name=tracking_numbers,json=trackingNumbers,proto3" json:"tracking_numbers,omitempty"` // contains filtered or unexported fields }
func (*PostTrackingRequest) Descriptor
deprecated
func (*PostTrackingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PostTrackingRequest.ProtoReflect.Descriptor instead.
func (*PostTrackingRequest) GetTrackingNumbers ¶
func (x *PostTrackingRequest) GetTrackingNumbers() []string
func (*PostTrackingRequest) ProtoMessage ¶
func (*PostTrackingRequest) ProtoMessage()
func (*PostTrackingRequest) ProtoReflect ¶
func (x *PostTrackingRequest) ProtoReflect() protoreflect.Message
func (*PostTrackingRequest) Reset ¶
func (x *PostTrackingRequest) Reset()
func (*PostTrackingRequest) String ¶
func (x *PostTrackingRequest) String() string
type PostTrackingResponse ¶
type PostTrackingResponse struct { TrackingId string `protobuf:"bytes,1,opt,name=tracking_id,json=trackingId,proto3" json:"tracking_id,omitempty"` TrackingNumbers []*PostTrack `protobuf:"bytes,2,rep,name=tracking_numbers,json=trackingNumbers,proto3" json:"tracking_numbers,omitempty"` // contains filtered or unexported fields }
func (*PostTrackingResponse) Descriptor
deprecated
func (*PostTrackingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PostTrackingResponse.ProtoReflect.Descriptor instead.
func (*PostTrackingResponse) GetTrackingId ¶
func (x *PostTrackingResponse) GetTrackingId() string
func (*PostTrackingResponse) GetTrackingNumbers ¶
func (x *PostTrackingResponse) GetTrackingNumbers() []*PostTrack
func (*PostTrackingResponse) ProtoMessage ¶
func (*PostTrackingResponse) ProtoMessage()
func (*PostTrackingResponse) ProtoReflect ¶
func (x *PostTrackingResponse) ProtoReflect() protoreflect.Message
func (*PostTrackingResponse) Reset ¶
func (x *PostTrackingResponse) Reset()
func (*PostTrackingResponse) String ¶
func (x *PostTrackingResponse) String() string
type TrackResponse ¶
type TrackResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` Uuid string `protobuf:"bytes,4,opt,name=uuid,proto3" json:"uuid,omitempty"` Result []*TrackResult `protobuf:"bytes,5,rep,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*TrackResponse) Descriptor
deprecated
func (*TrackResponse) Descriptor() ([]byte, []int)
Deprecated: Use TrackResponse.ProtoReflect.Descriptor instead.
func (*TrackResponse) GetCode ¶
func (x *TrackResponse) GetCode() string
func (*TrackResponse) GetId ¶
func (x *TrackResponse) GetId() string
func (*TrackResponse) GetResult ¶
func (x *TrackResponse) GetResult() []*TrackResult
func (*TrackResponse) GetStatus ¶
func (x *TrackResponse) GetStatus() string
func (*TrackResponse) GetUuid ¶
func (x *TrackResponse) GetUuid() string
func (*TrackResponse) ProtoMessage ¶
func (*TrackResponse) ProtoMessage()
func (*TrackResponse) ProtoReflect ¶
func (x *TrackResponse) ProtoReflect() protoreflect.Message
func (*TrackResponse) Reset ¶
func (x *TrackResponse) Reset()
func (*TrackResponse) String ¶
func (x *TrackResponse) String() string
type TrackResult ¶
type TrackResult struct { Spider string `protobuf:"bytes,1,opt,name=spider,proto3" json:"spider,omitempty"` TrackingNumber string `protobuf:"bytes,2,opt,name=tracking_number,json=trackingNumber,proto3" json:"tracking_number,omitempty"` Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` ExecuteTime float32 `protobuf:"fixed32,4,opt,name=execute_time,json=executeTime,proto3" json:"execute_time,omitempty"` Result string `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*TrackResult) Descriptor
deprecated
func (*TrackResult) Descriptor() ([]byte, []int)
Deprecated: Use TrackResult.ProtoReflect.Descriptor instead.
func (*TrackResult) GetError ¶
func (x *TrackResult) GetError() string
func (*TrackResult) GetExecuteTime ¶
func (x *TrackResult) GetExecuteTime() float32
func (*TrackResult) GetResult ¶
func (x *TrackResult) GetResult() string
func (*TrackResult) GetSpider ¶
func (x *TrackResult) GetSpider() string
func (*TrackResult) GetTrackingNumber ¶
func (x *TrackResult) GetTrackingNumber() string
func (*TrackResult) ProtoMessage ¶
func (*TrackResult) ProtoMessage()
func (*TrackResult) ProtoReflect ¶
func (x *TrackResult) ProtoReflect() protoreflect.Message
func (*TrackResult) Reset ¶
func (x *TrackResult) Reset()
func (*TrackResult) String ¶
func (x *TrackResult) String() string
type TrackingClient ¶
type TrackingClient interface { PostTracking(ctx context.Context, in *PostTrackingRequest, opts ...grpc.CallOption) (*PostTrackingResponse, error) GetResult(ctx context.Context, in *GetTrackingID, opts ...grpc.CallOption) (*GetTrackingResponse, error) }
TrackingClient is the client API for Tracking 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 NewTrackingClient ¶
func NewTrackingClient(cc grpc.ClientConnInterface) TrackingClient
type TrackingServer ¶
type TrackingServer interface { PostTracking(context.Context, *PostTrackingRequest) (*PostTrackingResponse, error) GetResult(context.Context, *GetTrackingID) (*GetTrackingResponse, error) // contains filtered or unexported methods }
TrackingServer is the server API for Tracking service. All implementations must embed UnimplementedTrackingServer for forward compatibility
type UnimplementedTrackingServer ¶
type UnimplementedTrackingServer struct { }
UnimplementedTrackingServer must be embedded to have forward compatible implementations.
func (UnimplementedTrackingServer) GetResult ¶
func (UnimplementedTrackingServer) GetResult(context.Context, *GetTrackingID) (*GetTrackingResponse, error)
func (UnimplementedTrackingServer) PostTracking ¶
func (UnimplementedTrackingServer) PostTracking(context.Context, *PostTrackingRequest) (*PostTrackingResponse, error)
type UnsafeTrackingServer ¶
type UnsafeTrackingServer interface {
// contains filtered or unexported methods
}
UnsafeTrackingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrackingServer will result in compilation errors.