Documentation ¶
Index ¶
- func RegisterCourierServiceHandler(s server.Server, hdlr CourierServiceHandler, opts ...server.HandlerOption)
- type Courier
- func (*Courier) Descriptor() ([]byte, []int)
- func (m *Courier) GetAvailable() bool
- func (m *Courier) GetCapacity() int32
- func (m *Courier) GetCourierId() string
- func (m *Courier) GetMaxWeight() int32
- func (m *Courier) GetName() string
- func (m *Courier) GetOrderId() []string
- func (*Courier) ProtoMessage()
- func (m *Courier) Reset()
- func (m *Courier) String() string
- func (m *Courier) XXX_DiscardUnknown()
- func (m *Courier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Courier) XXX_Merge(src proto.Message)
- func (m *Courier) XXX_Size() int
- func (m *Courier) XXX_Unmarshal(b []byte) error
- type CourierService
- type CourierServiceClient
- type CourierServiceHandler
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetOrderId() string
- func (m *Request) GetQuantity() int32
- func (m *Request) GetWeight() int32
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetCourier() *Courier
- func (m *Response) GetDispatched() bool
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetCouriers() []*Courier
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) String() string
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Result) XXX_Merge(src proto.Message)
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
- type ShowRequest
- func (*ShowRequest) Descriptor() ([]byte, []int)
- func (*ShowRequest) ProtoMessage()
- func (m *ShowRequest) Reset()
- func (m *ShowRequest) String() string
- func (m *ShowRequest) XXX_DiscardUnknown()
- func (m *ShowRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShowRequest) XXX_Merge(src proto.Message)
- func (m *ShowRequest) XXX_Size() int
- func (m *ShowRequest) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCourierServiceHandler ¶
func RegisterCourierServiceHandler(s server.Server, hdlr CourierServiceHandler, opts ...server.HandlerOption)
Types ¶
type Courier ¶
type Courier struct { CourierId string `protobuf:"bytes,1,opt,name=courier_id,json=courierId,proto3" json:"courier_id,omitempty"` Capacity int32 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"` MaxWeight int32 `protobuf:"varint,3,opt,name=max_weight,json=maxWeight,proto3" json:"max_weight,omitempty"` Available bool `protobuf:"varint,4,opt,name=available,proto3" json:"available,omitempty"` Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` OrderId []string `protobuf:"bytes,6,rep,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Courier) Descriptor ¶
func (*Courier) GetAvailable ¶
func (*Courier) GetCapacity ¶
func (*Courier) GetCourierId ¶
func (*Courier) GetMaxWeight ¶
func (*Courier) GetOrderId ¶
func (*Courier) ProtoMessage ¶
func (*Courier) ProtoMessage()
func (*Courier) XXX_DiscardUnknown ¶
func (m *Courier) XXX_DiscardUnknown()
func (*Courier) XXX_Marshal ¶
func (*Courier) XXX_Unmarshal ¶
type CourierService ¶
type CourierService struct {
CourierServiceHandler
}
func (*CourierService) ShowAll ¶
func (h *CourierService) ShowAll(ctx context.Context, in *ShowRequest, out *Result) error
type CourierServiceClient ¶
type CourierServiceClient interface { Dispatch(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) ShowAll(ctx context.Context, in *ShowRequest, opts ...client.CallOption) (*Result, error) Create(ctx context.Context, in *Courier, opts ...client.CallOption) (*Response, error) }
func NewCourierServiceClient ¶
func NewCourierServiceClient(serviceName string, c client.Client) CourierServiceClient
type CourierServiceHandler ¶
type Request ¶
type Request struct { Quantity int32 `protobuf:"varint,1,opt,name=quantity,proto3" json:"quantity,omitempty"` Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetOrderId ¶
func (*Request) GetQuantity ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Response ¶
type Response struct { Dispatched bool `protobuf:"varint,1,opt,name=dispatched,proto3" json:"dispatched,omitempty"` Courier *Courier `protobuf:"bytes,2,opt,name=courier,proto3" json:"courier,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) GetCourier ¶
func (*Response) GetDispatched ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type Result ¶
type Result struct { Couriers []*Courier `protobuf:"bytes,1,rep,name=couriers,proto3" json:"couriers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Result) Descriptor ¶
func (*Result) GetCouriers ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶
func (*Result) XXX_Unmarshal ¶
type ShowRequest ¶
type ShowRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ShowRequest) Descriptor ¶
func (*ShowRequest) Descriptor() ([]byte, []int)
func (*ShowRequest) ProtoMessage ¶
func (*ShowRequest) ProtoMessage()
func (*ShowRequest) Reset ¶
func (m *ShowRequest) Reset()
func (*ShowRequest) String ¶
func (m *ShowRequest) String() string
func (*ShowRequest) XXX_DiscardUnknown ¶
func (m *ShowRequest) XXX_DiscardUnknown()
func (*ShowRequest) XXX_Marshal ¶
func (m *ShowRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShowRequest) XXX_Merge ¶
func (m *ShowRequest) XXX_Merge(src proto.Message)
func (*ShowRequest) XXX_Size ¶
func (m *ShowRequest) XXX_Size() int
func (*ShowRequest) XXX_Unmarshal ¶
func (m *ShowRequest) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.