Documentation ¶
Overview ¶
Package consignment is a generated protocol buffer package.
It is generated from these files:
proto/consignment/consignment.proto
It has these top-level messages:
Consignment Container GetRequest Response
Index ¶
- func NewShippingServiceEndpoints() []*api.Endpoint
- func RegisterShippingServiceHandler(s server.Server, hdlr ShippingServiceHandler, opts ...server.HandlerOption) error
- type Consignment
- func (*Consignment) Descriptor() ([]byte, []int)
- func (m *Consignment) GetContainers() []*Container
- func (m *Consignment) GetDescription() string
- func (m *Consignment) GetId() string
- func (m *Consignment) GetVesselId() string
- func (m *Consignment) GetWeight() int32
- func (*Consignment) ProtoMessage()
- func (m *Consignment) Reset()
- func (m *Consignment) String() string
- type Container
- type GetRequest
- type Response
- type ShippingService
- type ShippingServiceHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterShippingServiceHandler ¶
func RegisterShippingServiceHandler(s server.Server, hdlr ShippingServiceHandler, opts ...server.HandlerOption) error
Types ¶
type Consignment ¶
type Consignment struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` Weight int32 `protobuf:"varint,3,opt,name=weight" json:"weight,omitempty"` Containers []*Container `protobuf:"bytes,4,rep,name=containers" json:"containers,omitempty"` VesselId string `protobuf:"bytes,5,opt,name=vessel_id,json=vesselId" json:"vessel_id,omitempty"` }
func (*Consignment) Descriptor ¶
func (*Consignment) Descriptor() ([]byte, []int)
func (*Consignment) GetContainers ¶
func (m *Consignment) GetContainers() []*Container
func (*Consignment) GetDescription ¶
func (m *Consignment) GetDescription() string
func (*Consignment) GetId ¶
func (m *Consignment) GetId() string
func (*Consignment) GetVesselId ¶
func (m *Consignment) GetVesselId() string
func (*Consignment) GetWeight ¶
func (m *Consignment) GetWeight() int32
func (*Consignment) ProtoMessage ¶
func (*Consignment) ProtoMessage()
func (*Consignment) Reset ¶
func (m *Consignment) Reset()
func (*Consignment) String ¶
func (m *Consignment) String() string
type Container ¶
type Container struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId" json:"customer_id,omitempty"` Origin string `protobuf:"bytes,3,opt,name=origin" json:"origin,omitempty"` UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId" json:"user_id,omitempty"` }
func (*Container) Descriptor ¶
func (*Container) GetCustomerId ¶
func (*Container) ProtoMessage ¶
func (*Container) ProtoMessage()
type GetRequest ¶
type GetRequest struct { }
Blank get request
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
type Response ¶
type Response struct { Created bool `protobuf:"varint,1,opt,name=created" json:"created,omitempty"` Consignment *Consignment `protobuf:"bytes,2,opt,name=consignment" json:"consignment,omitempty"` // Pluralised consignment to our generic response message Consignments []*Consignment `protobuf:"bytes,3,rep,name=consignments" json:"consignments,omitempty"` }
func (*Response) Descriptor ¶
func (*Response) GetConsignment ¶
func (m *Response) GetConsignment() *Consignment
func (*Response) GetConsignments ¶
func (m *Response) GetConsignments() []*Consignment
func (*Response) GetCreated ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type ShippingService ¶
type ShippingService interface { // Create a consignment service CreateConsignment(ctx context.Context, in *Consignment, opts ...client.CallOption) (*Response, error) //Get all created consignments GetConsignment(ctx context.Context, in *GetRequest, opts ...client.CallOption) (*Response, error) }
func NewShippingService ¶
func NewShippingService(name string, c client.Client) ShippingService
type ShippingServiceHandler ¶
type ShippingServiceHandler interface { // Create a consignment service CreateConsignment(context.Context, *Consignment, *Response) error //Get all created consignments GetConsignment(context.Context, *GetRequest, *Response) error }
Click to show internal directories.
Click to hide internal directories.