vessel

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 RegisterVesselServiceHandler

func RegisterVesselServiceHandler(s server.Server, hdlr VesselServiceHandler, opts ...server.HandlerOption)

Types

type Response

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

货轮装得下的话 返回的多条货轮信息

func (*Response) Descriptor

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

func (*Response) GetCreated

func (m *Response) GetCreated() bool

func (*Response) GetVessel

func (m *Response) GetVessel() *Vessel

func (*Response) GetVessels

func (m *Response) GetVessels() []*Vessel

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 Specification

type Specification struct {
	Capacity             int32    `protobuf:"varint,1,opt,name=capacity,proto3" json:"capacity,omitempty"`
	MaxWeight            int32    `protobuf:"varint,2,opt,name=max_weight,json=maxWeight,proto3" json:"max_weight,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

等待运送的货物

func (*Specification) Descriptor

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

func (*Specification) GetCapacity

func (m *Specification) GetCapacity() int32

func (*Specification) GetMaxWeight

func (m *Specification) GetMaxWeight() int32

func (*Specification) ProtoMessage

func (*Specification) ProtoMessage()

func (*Specification) Reset

func (m *Specification) Reset()

func (*Specification) String

func (m *Specification) String() string

func (*Specification) XXX_DiscardUnknown

func (m *Specification) XXX_DiscardUnknown()

func (*Specification) XXX_Marshal

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

func (*Specification) XXX_Merge

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

func (*Specification) XXX_Size

func (m *Specification) XXX_Size() int

func (*Specification) XXX_Unmarshal

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

type Vessel

type Vessel struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"  bson:"-"`
	Capacity             int32    `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty" bson:"capacity,omitempty"`
	MaxWeight            int32    `protobuf:"varint,3,opt,name=max_weight,json=maxWeight,proto3" json:"max_weight,omitempty" bson:"max_weight,omitempty"`
	Name                 string   `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty" bson:"name,omitempty"`
	Available            bool     `protobuf:"varint,5,opt,name=available,proto3" json:"available,omitempty" bson:"available,omitempty"`
	OwerId               string   `protobuf:"bytes,6,opt,name=ower_id,json=owerId,proto3" json:"ower_id,omitempty" bson:"ower_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" bson:"-"`
	XXX_unrecognized     []byte   `json:"-" bson:"-"`
	XXX_sizecache        int32    `json:"-" bson:"-"`
}

每条货轮的熟悉

func (*Vessel) Descriptor

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

func (*Vessel) GetAvailable

func (m *Vessel) GetAvailable() bool

func (*Vessel) GetCapacity

func (m *Vessel) GetCapacity() int32

func (*Vessel) GetId

func (m *Vessel) GetId() string

func (*Vessel) GetMaxWeight

func (m *Vessel) GetMaxWeight() int32

func (*Vessel) GetName

func (m *Vessel) GetName() string

func (*Vessel) GetOwerId

func (m *Vessel) GetOwerId() string

func (*Vessel) ProtoMessage

func (*Vessel) ProtoMessage()

func (*Vessel) Reset

func (m *Vessel) Reset()

func (*Vessel) String

func (m *Vessel) String() string

func (*Vessel) XXX_DiscardUnknown

func (m *Vessel) XXX_DiscardUnknown()

func (*Vessel) XXX_Marshal

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

func (*Vessel) XXX_Merge

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

func (*Vessel) XXX_Size

func (m *Vessel) XXX_Size() int

func (*Vessel) XXX_Unmarshal

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

type VesselService

type VesselService struct {
	VesselServiceHandler
}

func (*VesselService) Create

func (h *VesselService) Create(ctx context.Context, in *Vessel, out *Response) error

func (*VesselService) FindAvailable

func (h *VesselService) FindAvailable(ctx context.Context, in *Specification, out *Response) error

type VesselServiceClient

type VesselServiceClient interface {
	// 检查是否有能运送货物的轮船
	FindAvailable(ctx context.Context, in *Specification, opts ...client.CallOption) (*Response, error)
	// 创建货轮
	Create(ctx context.Context, in *Vessel, opts ...client.CallOption) (*Response, error)
}

func NewVesselServiceClient

func NewVesselServiceClient(serviceName string, c client.Client) VesselServiceClient

type VesselServiceHandler

type VesselServiceHandler interface {
	// 检查是否有能运送货物的轮船
	FindAvailable(context.Context, *Specification, *Response) error
	// 创建货轮
	Create(context.Context, *Vessel, *Response) error
}

Jump to

Keyboard shortcuts

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