Documentation ¶
Index ¶
- Variables
- func RegisterInventoryServer(s grpc.ServiceRegistrar, srv InventoryServer)
- type AmendRequest
- func (*AmendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AmendRequest) GetAmount() int64
- func (x *AmendRequest) GetID() string
- func (x *AmendRequest) GetLocation() string
- func (x *AmendRequest) GetName() string
- func (x *AmendRequest) GetPrice() float64
- func (*AmendRequest) ProtoMessage()
- func (x *AmendRequest) ProtoReflect() protoreflect.Message
- func (x *AmendRequest) Reset()
- func (x *AmendRequest) String() string
- type AmendResponse
- type InventoryClient
- type InventoryServer
- type LevelRequest
- func (*LevelRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LevelRequest) GetID() string
- func (x *LevelRequest) GetLocation() string
- func (*LevelRequest) ProtoMessage()
- func (x *LevelRequest) ProtoReflect() protoreflect.Message
- func (x *LevelRequest) Reset()
- func (x *LevelRequest) String() string
- type ShortList
- type ShortRequest
- type StockItem
- func (*StockItem) Descriptor() ([]byte, []int)deprecated
- func (x *StockItem) GetID() string
- func (x *StockItem) GetLocation() string
- func (x *StockItem) GetName() string
- func (x *StockItem) GetStockCount() int64
- func (*StockItem) ProtoMessage()
- func (x *StockItem) ProtoReflect() protoreflect.Message
- func (x *StockItem) Reset()
- func (x *StockItem) String() string
- type UnimplementedInventoryServer
- func (UnimplementedInventoryServer) ChangeStock(context.Context, *AmendRequest) (*AmendResponse, error)
- func (UnimplementedInventoryServer) CheckShort(context.Context, *ShortRequest) (*ShortList, error)
- func (UnimplementedInventoryServer) GetStock(context.Context, *LevelRequest) (*StockItem, error)
- func (UnimplementedInventoryServer) GetStore(context.Context, *ShortRequest) (*ShortList, error)
- type UnsafeInventoryServer
Constants ¶
This section is empty.
Variables ¶
var File_inventory_proto protoreflect.FileDescriptor
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) ProtoMessage ¶
func (*ShortList) ProtoMessage()
func (*ShortList) ProtoReflect ¶
func (x *ShortList) ProtoReflect() protoreflect.Message
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) GetLocation ¶
func (*StockItem) GetStockCount ¶
func (*StockItem) ProtoMessage ¶
func (*StockItem) ProtoMessage()
func (*StockItem) ProtoReflect ¶
func (x *StockItem) ProtoReflect() protoreflect.Message
type UnimplementedInventoryServer ¶
type UnimplementedInventoryServer struct { }
UnimplementedInventoryServer should be embedded to have forward compatible implementations.
func (UnimplementedInventoryServer) ChangeStock ¶
func (UnimplementedInventoryServer) ChangeStock(context.Context, *AmendRequest) (*AmendResponse, error)
func (UnimplementedInventoryServer) CheckShort ¶
func (UnimplementedInventoryServer) CheckShort(context.Context, *ShortRequest) (*ShortList, error)
func (UnimplementedInventoryServer) GetStock ¶
func (UnimplementedInventoryServer) GetStock(context.Context, *LevelRequest) (*StockItem, error)
func (UnimplementedInventoryServer) GetStore ¶
func (UnimplementedInventoryServer) GetStore(context.Context, *ShortRequest) (*ShortList, error)
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.