consignment

package
v0.0.0-...-54bb499 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterShippingServiceHandler

func RegisterShippingServiceHandler(s server.Server, hdlr ShippingServiceHandler, opts ...server.HandlerOption)

Types

type Consignment

type Consignment struct {
	Id                   string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"-"`
	Description          string       `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" bson:"description,omitempty"`
	Weight               int32        `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty" bson:"weight,omitempty"`
	Containers           []*Container `protobuf:"bytes,4,rep,name=containers,proto3" json:"containers,omitempty" bson:"containers,omitempty"`
	VesselId             string       `protobuf:"bytes,5,opt,name=vessel_id,json=vesselId,proto3" json:"vessel_id,omitempty" bson:"vessel_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-" bson:"-"`
	XXX_unrecognized     []byte       `json:"-" bson:"-"`
	XXX_sizecache        int32        `json:"-" bson:"-"`
}

货轮承运的一批货物

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

func (*Consignment) XXX_DiscardUnknown

func (m *Consignment) XXX_DiscardUnknown()

func (*Consignment) XXX_Marshal

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

func (*Consignment) XXX_Merge

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

func (*Consignment) XXX_Size

func (m *Consignment) XXX_Size() int

func (*Consignment) XXX_Unmarshal

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

type Container

type Container struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CustomerId           string   `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	Origin               string   `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"`
	UserId               string   `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

单个集装箱

func (*Container) Descriptor

func (*Container) Descriptor() ([]byte, []int)

func (*Container) GetCustomerId

func (m *Container) GetCustomerId() string

func (*Container) GetId

func (m *Container) GetId() string

func (*Container) GetOrigin

func (m *Container) GetOrigin() string

func (*Container) GetUserId

func (m *Container) GetUserId() string

func (*Container) ProtoMessage

func (*Container) ProtoMessage()

func (*Container) Reset

func (m *Container) Reset()

func (*Container) String

func (m *Container) String() string

func (*Container) XXX_DiscardUnknown

func (m *Container) XXX_DiscardUnknown()

func (*Container) XXX_Marshal

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

func (*Container) XXX_Merge

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

func (*Container) XXX_Size

func (m *Container) XXX_Size() int

func (*Container) XXX_Unmarshal

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

type GetRequest

type GetRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

查看货物信息的请求 客户端想要从服务端请求数据,必须有请求格式,哪怕为空

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

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

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

func (*GetRequest) XXX_Merge

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

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

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

type Response

type Response struct {
	Created              bool           `protobuf:"varint,1,opt,name=created,proto3" json:"created,omitempty"`
	Consignment          *Consignment   `protobuf:"bytes,2,opt,name=consignment,proto3" json:"consignment,omitempty"`
	Consignments         []*Consignment `protobuf:"bytes,3,rep,name=consignments,proto3" json:"consignments,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

托运结果

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetConsignment

func (m *Response) GetConsignment() *Consignment

func (*Response) GetConsignments

func (m *Response) GetConsignments() []*Consignment

func (*Response) GetCreated

func (m *Response) GetCreated() 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 ShippingService

type ShippingService struct {
	ShippingServiceHandler
}

func (*ShippingService) CreateConsignment

func (h *ShippingService) CreateConsignment(ctx context.Context, in *Consignment, out *Response) error

func (*ShippingService) GetConsignments

func (h *ShippingService) GetConsignments(ctx context.Context, in *GetRequest, out *Response) error

type ShippingServiceClient

type ShippingServiceClient interface {
	// 托运一批货物
	CreateConsignment(ctx context.Context, in *Consignment, opts ...client.CallOption) (*Response, error)
	// 查看托运货物的信息
	GetConsignments(ctx context.Context, in *GetRequest, opts ...client.CallOption) (*Response, error)
}

func NewShippingServiceClient

func NewShippingServiceClient(serviceName string, c client.Client) ShippingServiceClient

type ShippingServiceHandler

type ShippingServiceHandler interface {
	// 托运一批货物
	CreateConsignment(context.Context, *Consignment, *Response) error
	// 查看托运货物的信息
	GetConsignments(context.Context, *GetRequest, *Response) error
}

Jump to

Keyboard shortcuts

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