courier

package
v0.0.0-...-8fe5654 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Courier) GetAvailable

func (m *Courier) GetAvailable() bool

func (*Courier) GetCapacity

func (m *Courier) GetCapacity() int32

func (*Courier) GetCourierId

func (m *Courier) GetCourierId() string

func (*Courier) GetMaxWeight

func (m *Courier) GetMaxWeight() int32

func (*Courier) GetName

func (m *Courier) GetName() string

func (*Courier) GetOrderId

func (m *Courier) GetOrderId() []string

func (*Courier) ProtoMessage

func (*Courier) ProtoMessage()

func (*Courier) Reset

func (m *Courier) Reset()

func (*Courier) String

func (m *Courier) String() string

func (*Courier) XXX_DiscardUnknown

func (m *Courier) XXX_DiscardUnknown()

func (*Courier) XXX_Marshal

func (m *Courier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Courier) XXX_Merge

func (m *Courier) XXX_Merge(src proto.Message)

func (*Courier) XXX_Size

func (m *Courier) XXX_Size() int

func (*Courier) XXX_Unmarshal

func (m *Courier) XXX_Unmarshal(b []byte) error

type CourierService

type CourierService struct {
	CourierServiceHandler
}

func (*CourierService) Create

func (h *CourierService) Create(ctx context.Context, in *Courier, out *Response) error

func (*CourierService) Dispatch

func (h *CourierService) Dispatch(ctx context.Context, in *Request, out *Response) error

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 CourierServiceHandler interface {
	Dispatch(context.Context, *Request, *Response) error
	ShowAll(context.Context, *ShowRequest, *Result) error
	Create(context.Context, *Courier, *Response) error
}

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) Descriptor() ([]byte, []int)

func (*Request) GetOrderId

func (m *Request) GetOrderId() string

func (*Request) GetQuantity

func (m *Request) GetQuantity() int32

func (*Request) GetWeight

func (m *Request) GetWeight() int32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Response) GetCourier

func (m *Response) GetCourier() *Courier

func (*Response) GetDispatched

func (m *Response) GetDispatched() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Result) GetCouriers

func (m *Result) GetCouriers() []*Courier

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

func (*Result) XXX_DiscardUnknown

func (m *Result) XXX_DiscardUnknown()

func (*Result) XXX_Marshal

func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Result) XXX_Merge

func (m *Result) XXX_Merge(src proto.Message)

func (*Result) XXX_Size

func (m *Result) XXX_Size() int

func (*Result) XXX_Unmarshal

func (m *Result) XXX_Unmarshal(b []byte) error

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

Jump to

Keyboard shortcuts

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