proto

package
v0.0.0-...-859a59f Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StockService_CheckStock_FullMethodName  = "/stock.StockService/CheckStock"
	StockService_UpdateStock_FullMethodName = "/stock.StockService/UpdateStock"
	StockService_CreateStock_FullMethodName = "/stock.StockService/CreateStock"
	StockService_GetStock_FullMethodName    = "/stock.StockService/GetStock"
)

Variables

View Source
var File_proto_stock_proto protoreflect.FileDescriptor
View Source
var StockService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "stock.StockService",
	HandlerType: (*StockServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckStock",
			Handler:    _StockService_CheckStock_Handler,
		},
		{
			MethodName: "UpdateStock",
			Handler:    _StockService_UpdateStock_Handler,
		},
		{
			MethodName: "CreateStock",
			Handler:    _StockService_CreateStock_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetStock",
			Handler:       _StockService_GetStock_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/stock.proto",
}

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

Functions

func RegisterStockServiceServer

func RegisterStockServiceServer(s grpc.ServiceRegistrar, srv StockServiceServer)

Types

type CheckStockRequest

type CheckStockRequest struct {
	ItemId   string `protobuf:"bytes,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	Quantity int32  `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckStockRequest) Descriptor deprecated

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

Deprecated: Use CheckStockRequest.ProtoReflect.Descriptor instead.

func (*CheckStockRequest) GetItemId

func (x *CheckStockRequest) GetItemId() string

func (*CheckStockRequest) GetQuantity

func (x *CheckStockRequest) GetQuantity() int32

func (*CheckStockRequest) ProtoMessage

func (*CheckStockRequest) ProtoMessage()

func (*CheckStockRequest) ProtoReflect

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

func (*CheckStockRequest) Reset

func (x *CheckStockRequest) Reset()

func (*CheckStockRequest) String

func (x *CheckStockRequest) String() string

type CheckStockResponse

type CheckStockResponse struct {
	Available         bool  `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"`
	AvailableQuantity int32 `protobuf:"varint,2,opt,name=available_quantity,json=availableQuantity,proto3" json:"available_quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckStockResponse) Descriptor deprecated

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

Deprecated: Use CheckStockResponse.ProtoReflect.Descriptor instead.

func (*CheckStockResponse) GetAvailable

func (x *CheckStockResponse) GetAvailable() bool

func (*CheckStockResponse) GetAvailableQuantity

func (x *CheckStockResponse) GetAvailableQuantity() int32

func (*CheckStockResponse) ProtoMessage

func (*CheckStockResponse) ProtoMessage()

func (*CheckStockResponse) ProtoReflect

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

func (*CheckStockResponse) Reset

func (x *CheckStockResponse) Reset()

func (*CheckStockResponse) String

func (x *CheckStockResponse) String() string

type CreateStockRequest

type CreateStockRequest struct {
	ItemName        string `protobuf:"bytes,2,opt,name=item_name,json=itemName,proto3" json:"item_name,omitempty"`
	ItemDescription string `protobuf:"bytes,3,opt,name=item_description,json=itemDescription,proto3" json:"item_description,omitempty"`
	Quantity        int32  `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateStockRequest) Descriptor deprecated

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

Deprecated: Use CreateStockRequest.ProtoReflect.Descriptor instead.

func (*CreateStockRequest) GetItemDescription

func (x *CreateStockRequest) GetItemDescription() string

func (*CreateStockRequest) GetItemName

func (x *CreateStockRequest) GetItemName() string

func (*CreateStockRequest) GetQuantity

func (x *CreateStockRequest) GetQuantity() int32

func (*CreateStockRequest) ProtoMessage

func (*CreateStockRequest) ProtoMessage()

func (*CreateStockRequest) ProtoReflect

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

func (*CreateStockRequest) Reset

func (x *CreateStockRequest) Reset()

func (*CreateStockRequest) String

func (x *CreateStockRequest) String() string

type CreateStockResponse

type CreateStockResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateStockResponse) Descriptor deprecated

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

Deprecated: Use CreateStockResponse.ProtoReflect.Descriptor instead.

func (*CreateStockResponse) GetSuccess

func (x *CreateStockResponse) GetSuccess() bool

func (*CreateStockResponse) ProtoMessage

func (*CreateStockResponse) ProtoMessage()

func (*CreateStockResponse) ProtoReflect

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

func (*CreateStockResponse) Reset

func (x *CreateStockResponse) Reset()

func (*CreateStockResponse) String

func (x *CreateStockResponse) String() string

type GetStockResponse

type GetStockResponse struct {
	ItemId          string `protobuf:"bytes,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	ItemName        string `protobuf:"bytes,2,opt,name=item_name,json=itemName,proto3" json:"item_name,omitempty"`
	ItemDescription string `protobuf:"bytes,3,opt,name=item_description,json=itemDescription,proto3" json:"item_description,omitempty"`
	Quantity        int32  `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*GetStockResponse) Descriptor deprecated

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

Deprecated: Use GetStockResponse.ProtoReflect.Descriptor instead.

func (*GetStockResponse) GetItemDescription

func (x *GetStockResponse) GetItemDescription() string

func (*GetStockResponse) GetItemId

func (x *GetStockResponse) GetItemId() string

func (*GetStockResponse) GetItemName

func (x *GetStockResponse) GetItemName() string

func (*GetStockResponse) GetQuantity

func (x *GetStockResponse) GetQuantity() int32

func (*GetStockResponse) ProtoMessage

func (*GetStockResponse) ProtoMessage()

func (*GetStockResponse) ProtoReflect

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

func (*GetStockResponse) Reset

func (x *GetStockResponse) Reset()

func (*GetStockResponse) String

func (x *GetStockResponse) String() string

type StockServiceClient

type StockServiceClient interface {
	CheckStock(ctx context.Context, in *CheckStockRequest, opts ...grpc.CallOption) (*CheckStockResponse, error)
	UpdateStock(ctx context.Context, in *UpdateStockRequest, opts ...grpc.CallOption) (*UpdateStockResponse, error)
	CreateStock(ctx context.Context, in *CreateStockRequest, opts ...grpc.CallOption) (*CreateStockResponse, error)
	GetStock(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetStockResponse], error)
}

StockServiceClient is the client API for StockService 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.

type StockServiceServer

type StockServiceServer interface {
	CheckStock(context.Context, *CheckStockRequest) (*CheckStockResponse, error)
	UpdateStock(context.Context, *UpdateStockRequest) (*UpdateStockResponse, error)
	CreateStock(context.Context, *CreateStockRequest) (*CreateStockResponse, error)
	GetStock(*emptypb.Empty, grpc.ServerStreamingServer[GetStockResponse]) error
	// contains filtered or unexported methods
}

StockServiceServer is the server API for StockService service. All implementations must embed UnimplementedStockServiceServer for forward compatibility.

type StockService_GetStockClient

type StockService_GetStockClient = grpc.ServerStreamingClient[GetStockResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type StockService_GetStockServer

type StockService_GetStockServer = grpc.ServerStreamingServer[GetStockResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type UnimplementedStockServiceServer

type UnimplementedStockServiceServer struct{}

UnimplementedStockServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedStockServiceServer) CheckStock

func (UnimplementedStockServiceServer) CreateStock

func (UnimplementedStockServiceServer) GetStock

func (UnimplementedStockServiceServer) UpdateStock

type UnsafeStockServiceServer

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

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

type UpdateStockRequest

type UpdateStockRequest struct {
	ItemId         string `protobuf:"bytes,1,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	QuantityChange int32  `protobuf:"varint,2,opt,name=quantity_change,json=quantityChange,proto3" json:"quantity_change,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateStockRequest) Descriptor deprecated

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

Deprecated: Use UpdateStockRequest.ProtoReflect.Descriptor instead.

func (*UpdateStockRequest) GetItemId

func (x *UpdateStockRequest) GetItemId() string

func (*UpdateStockRequest) GetQuantityChange

func (x *UpdateStockRequest) GetQuantityChange() int32

func (*UpdateStockRequest) ProtoMessage

func (*UpdateStockRequest) ProtoMessage()

func (*UpdateStockRequest) ProtoReflect

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

func (*UpdateStockRequest) Reset

func (x *UpdateStockRequest) Reset()

func (*UpdateStockRequest) String

func (x *UpdateStockRequest) String() string

type UpdateStockResponse

type UpdateStockResponse struct {
	Success     bool  `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	NewQuantity int32 `protobuf:"varint,2,opt,name=new_quantity,json=newQuantity,proto3" json:"new_quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateStockResponse) Descriptor deprecated

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

Deprecated: Use UpdateStockResponse.ProtoReflect.Descriptor instead.

func (*UpdateStockResponse) GetNewQuantity

func (x *UpdateStockResponse) GetNewQuantity() int32

func (*UpdateStockResponse) GetSuccess

func (x *UpdateStockResponse) GetSuccess() bool

func (*UpdateStockResponse) ProtoMessage

func (*UpdateStockResponse) ProtoMessage()

func (*UpdateStockResponse) ProtoReflect

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

func (*UpdateStockResponse) Reset

func (x *UpdateStockResponse) Reset()

func (*UpdateStockResponse) String

func (x *UpdateStockResponse) String() string

Jump to

Keyboard shortcuts

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