consignment

package
v0.0.0-...-dd90425 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 7 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShippingServiceEndpoints

func NewShippingServiceEndpoints() []*api.Endpoint

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) 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

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) 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

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
}

Jump to

Keyboard shortcuts

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