inventory

package
v0.0.0-...-6c3add7 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_inventory_proto protoreflect.FileDescriptor
View Source
var Inventory_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Inventory",
	HandlerType: (*InventoryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStock",
			Handler:    _Inventory_GetStock_Handler,
		},
		{
			MethodName: "ChangeStock",
			Handler:    _Inventory_ChangeStock_Handler,
		},
		{
			MethodName: "CheckShort",
			Handler:    _Inventory_CheckShort_Handler,
		},
		{
			MethodName: "GetStore",
			Handler:    _Inventory_GetStore_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "inventory.proto",
}

Inventory_ServiceDesc is the grpc.ServiceDesc for Inventory service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInventoryServer

func RegisterInventoryServer(s grpc.ServiceRegistrar, srv InventoryServer)

Types

type AmendRequest

type AmendRequest struct {
	ID       string  `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Location string  `protobuf:"bytes,2,opt,name=Location,proto3" json:"Location,omitempty"`
	Amount   int64   `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount,omitempty"`
	Name     string  `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"`
	Price    float64 `protobuf:"fixed64,5,opt,name=Price,proto3" json:"Price,omitempty"`
	// contains filtered or unexported fields
}

func (*AmendRequest) Descriptor deprecated

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

Deprecated: Use AmendRequest.ProtoReflect.Descriptor instead.

func (*AmendRequest) GetAmount

func (x *AmendRequest) GetAmount() int64

func (*AmendRequest) GetID

func (x *AmendRequest) GetID() string

func (*AmendRequest) GetLocation

func (x *AmendRequest) GetLocation() string

func (*AmendRequest) GetName

func (x *AmendRequest) GetName() string

func (*AmendRequest) GetPrice

func (x *AmendRequest) GetPrice() float64

func (*AmendRequest) ProtoMessage

func (*AmendRequest) ProtoMessage()

func (*AmendRequest) ProtoReflect

func (x *AmendRequest) ProtoReflect() protoreflect.Message

func (*AmendRequest) Reset

func (x *AmendRequest) Reset()

func (*AmendRequest) String

func (x *AmendRequest) String() string

type AmendResponse

type AmendResponse struct {
	Response string `protobuf:"bytes,1,opt,name=Response,proto3" json:"Response,omitempty"`
	// contains filtered or unexported fields
}

func (*AmendResponse) Descriptor deprecated

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

Deprecated: Use AmendResponse.ProtoReflect.Descriptor instead.

func (*AmendResponse) GetResponse

func (x *AmendResponse) GetResponse() string

func (*AmendResponse) ProtoMessage

func (*AmendResponse) ProtoMessage()

func (*AmendResponse) ProtoReflect

func (x *AmendResponse) ProtoReflect() protoreflect.Message

func (*AmendResponse) Reset

func (x *AmendResponse) Reset()

func (*AmendResponse) String

func (x *AmendResponse) String() string

type InventoryClient

type InventoryClient interface {
	GetStock(ctx context.Context, in *LevelRequest, opts ...grpc.CallOption) (*StockItem, error)
	ChangeStock(ctx context.Context, in *AmendRequest, opts ...grpc.CallOption) (*AmendResponse, error)
	CheckShort(ctx context.Context, in *ShortRequest, opts ...grpc.CallOption) (*ShortList, error)
	GetStore(ctx context.Context, in *ShortRequest, opts ...grpc.CallOption) (*ShortList, error)
}

InventoryClient is the client API for Inventory service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewInventoryClient

func NewInventoryClient(cc grpc.ClientConnInterface) InventoryClient

type InventoryServer

type InventoryServer interface {
	GetStock(context.Context, *LevelRequest) (*StockItem, error)
	ChangeStock(context.Context, *AmendRequest) (*AmendResponse, error)
	CheckShort(context.Context, *ShortRequest) (*ShortList, error)
	GetStore(context.Context, *ShortRequest) (*ShortList, error)
}

InventoryServer is the server API for Inventory service. All implementations should embed UnimplementedInventoryServer for forward compatibility

type LevelRequest

type LevelRequest struct {
	ID       string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Location string `protobuf:"bytes,2,opt,name=Location,proto3" json:"Location,omitempty"`
	// contains filtered or unexported fields
}

func (*LevelRequest) Descriptor deprecated

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

Deprecated: Use LevelRequest.ProtoReflect.Descriptor instead.

func (*LevelRequest) GetID

func (x *LevelRequest) GetID() string

func (*LevelRequest) GetLocation

func (x *LevelRequest) GetLocation() string

func (*LevelRequest) ProtoMessage

func (*LevelRequest) ProtoMessage()

func (*LevelRequest) ProtoReflect

func (x *LevelRequest) ProtoReflect() protoreflect.Message

func (*LevelRequest) Reset

func (x *LevelRequest) Reset()

func (*LevelRequest) String

func (x *LevelRequest) String() string

type ShortList

type ShortList struct {
	SList []*StockItem `protobuf:"bytes,1,rep,name=SList,proto3" json:"SList,omitempty"`
	// contains filtered or unexported fields
}

func (*ShortList) Descriptor deprecated

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

Deprecated: Use ShortList.ProtoReflect.Descriptor instead.

func (*ShortList) GetSList

func (x *ShortList) GetSList() []*StockItem

func (*ShortList) ProtoMessage

func (*ShortList) ProtoMessage()

func (*ShortList) ProtoReflect

func (x *ShortList) ProtoReflect() protoreflect.Message

func (*ShortList) Reset

func (x *ShortList) Reset()

func (*ShortList) String

func (x *ShortList) String() string

type ShortRequest

type ShortRequest struct {
	Location string `protobuf:"bytes,1,opt,name=Location,proto3" json:"Location,omitempty"`
	// contains filtered or unexported fields
}

func (*ShortRequest) Descriptor deprecated

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

Deprecated: Use ShortRequest.ProtoReflect.Descriptor instead.

func (*ShortRequest) GetLocation

func (x *ShortRequest) GetLocation() string

func (*ShortRequest) ProtoMessage

func (*ShortRequest) ProtoMessage()

func (*ShortRequest) ProtoReflect

func (x *ShortRequest) ProtoReflect() protoreflect.Message

func (*ShortRequest) Reset

func (x *ShortRequest) Reset()

func (*ShortRequest) String

func (x *ShortRequest) String() string

type StockItem

type StockItem struct {
	ID         string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Location   string `protobuf:"bytes,2,opt,name=Location,proto3" json:"Location,omitempty"`
	Name       string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	StockCount int64  `protobuf:"varint,4,opt,name=StockCount,proto3" json:"StockCount,omitempty"`
	// contains filtered or unexported fields
}

func (*StockItem) Descriptor deprecated

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

Deprecated: Use StockItem.ProtoReflect.Descriptor instead.

func (*StockItem) GetID

func (x *StockItem) GetID() string

func (*StockItem) GetLocation

func (x *StockItem) GetLocation() string

func (*StockItem) GetName

func (x *StockItem) GetName() string

func (*StockItem) GetStockCount

func (x *StockItem) GetStockCount() int64

func (*StockItem) ProtoMessage

func (*StockItem) ProtoMessage()

func (*StockItem) ProtoReflect

func (x *StockItem) ProtoReflect() protoreflect.Message

func (*StockItem) Reset

func (x *StockItem) Reset()

func (*StockItem) String

func (x *StockItem) String() string

type UnimplementedInventoryServer

type UnimplementedInventoryServer struct {
}

UnimplementedInventoryServer should be embedded to have forward compatible implementations.

func (UnimplementedInventoryServer) ChangeStock

func (UnimplementedInventoryServer) CheckShort

func (UnimplementedInventoryServer) GetStock

func (UnimplementedInventoryServer) GetStore

type UnsafeInventoryServer

type UnsafeInventoryServer interface {
	// contains filtered or unexported methods
}

UnsafeInventoryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InventoryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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