Documentation ¶
Index ¶
- Variables
- func RegisterBizGoodsServiceServer(s grpc.ServiceRegistrar, srv BizGoodsServiceServer)
- type BizGoodsServiceClient
- type BizGoodsServiceServer
- type UnimplementedBizGoodsServiceServer
- type UnsafeBizGoodsServiceServer
- type UpdateInventoryRequest
- func (*UpdateInventoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateInventoryRequest) GetGoodsID() int64
- func (x *UpdateInventoryRequest) GetGoodsNumber() int32
- func (x *UpdateInventoryRequest) GetRequestID() string
- func (*UpdateInventoryRequest) ProtoMessage()
- func (x *UpdateInventoryRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateInventoryRequest) Reset()
- func (x *UpdateInventoryRequest) String() string
- func (m *UpdateInventoryRequest) Validate() error
- func (m *UpdateInventoryRequest) ValidateAll() error
- type UpdateInventoryRequestMultiError
- type UpdateInventoryRequestValidationError
- func (e UpdateInventoryRequestValidationError) Cause() error
- func (e UpdateInventoryRequestValidationError) Error() string
- func (e UpdateInventoryRequestValidationError) ErrorName() string
- func (e UpdateInventoryRequestValidationError) Field() string
- func (e UpdateInventoryRequestValidationError) Key() bool
- func (e UpdateInventoryRequestValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var BizGoodsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "biz_goods.v1.BizGoodsService", HandlerType: (*BizGoodsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpdateInventory", Handler: _BizGoodsService_UpdateInventory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "biz_goods/v1/biz_goods.proto", }
BizGoodsService_ServiceDesc is the grpc.ServiceDesc for BizGoodsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_biz_goods_v1_biz_goods_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBizGoodsServiceServer ¶
func RegisterBizGoodsServiceServer(s grpc.ServiceRegistrar, srv BizGoodsServiceServer)
Types ¶
type BizGoodsServiceClient ¶
type BizGoodsServiceClient interface { // 更新库存 UpdateInventory(ctx context.Context, in *UpdateInventoryRequest, opts ...grpc.CallOption) (*base.OperateReply, error) }
BizGoodsServiceClient is the client API for BizGoodsService 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 NewBizGoodsServiceClient ¶
func NewBizGoodsServiceClient(cc grpc.ClientConnInterface) BizGoodsServiceClient
type BizGoodsServiceServer ¶
type BizGoodsServiceServer interface { // 更新库存 UpdateInventory(context.Context, *UpdateInventoryRequest) (*base.OperateReply, error) // contains filtered or unexported methods }
BizGoodsServiceServer is the server API for BizGoodsService service. All implementations must embed UnimplementedBizGoodsServiceServer for forward compatibility
type UnimplementedBizGoodsServiceServer ¶
type UnimplementedBizGoodsServiceServer struct { }
UnimplementedBizGoodsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBizGoodsServiceServer) UpdateInventory ¶
func (UnimplementedBizGoodsServiceServer) UpdateInventory(context.Context, *UpdateInventoryRequest) (*base.OperateReply, error)
type UnsafeBizGoodsServiceServer ¶
type UnsafeBizGoodsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBizGoodsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BizGoodsServiceServer will result in compilation errors.
type UpdateInventoryRequest ¶
type UpdateInventoryRequest struct { RequestID string `protobuf:"bytes,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"` GoodsNumber int32 `protobuf:"varint,2,opt,name=GoodsNumber,proto3" json:"GoodsNumber,omitempty"` //购买的商品数量 GoodsID int64 `protobuf:"varint,3,opt,name=GoodsID,proto3" json:"GoodsID,omitempty"` //商品ID // contains filtered or unexported fields }
func (*UpdateInventoryRequest) Descriptor
deprecated
func (*UpdateInventoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateInventoryRequest.ProtoReflect.Descriptor instead.
func (*UpdateInventoryRequest) GetGoodsID ¶ added in v1.0.7
func (x *UpdateInventoryRequest) GetGoodsID() int64
func (*UpdateInventoryRequest) GetGoodsNumber ¶
func (x *UpdateInventoryRequest) GetGoodsNumber() int32
func (*UpdateInventoryRequest) GetRequestID ¶
func (x *UpdateInventoryRequest) GetRequestID() string
func (*UpdateInventoryRequest) ProtoMessage ¶
func (*UpdateInventoryRequest) ProtoMessage()
func (*UpdateInventoryRequest) ProtoReflect ¶
func (x *UpdateInventoryRequest) ProtoReflect() protoreflect.Message
func (*UpdateInventoryRequest) Reset ¶
func (x *UpdateInventoryRequest) Reset()
func (*UpdateInventoryRequest) String ¶
func (x *UpdateInventoryRequest) String() string
func (*UpdateInventoryRequest) Validate ¶
func (m *UpdateInventoryRequest) Validate() error
Validate checks the field values on UpdateInventoryRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UpdateInventoryRequest) ValidateAll ¶
func (m *UpdateInventoryRequest) ValidateAll() error
ValidateAll checks the field values on UpdateInventoryRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateInventoryRequestMultiError, or nil if none found.
type UpdateInventoryRequestMultiError ¶
type UpdateInventoryRequestMultiError []error
UpdateInventoryRequestMultiError is an error wrapping multiple validation errors returned by UpdateInventoryRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateInventoryRequestMultiError) AllErrors ¶
func (m UpdateInventoryRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateInventoryRequestMultiError) Error ¶
func (m UpdateInventoryRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateInventoryRequestValidationError ¶
type UpdateInventoryRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateInventoryRequestValidationError is the validation error returned by UpdateInventoryRequest.Validate if the designated constraints aren't met.
func (UpdateInventoryRequestValidationError) Cause ¶
func (e UpdateInventoryRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateInventoryRequestValidationError) Error ¶
func (e UpdateInventoryRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateInventoryRequestValidationError) ErrorName ¶
func (e UpdateInventoryRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateInventoryRequestValidationError) Field ¶
func (e UpdateInventoryRequestValidationError) Field() string
Field function returns field value.
func (UpdateInventoryRequestValidationError) Key ¶
func (e UpdateInventoryRequestValidationError) Key() bool
Key function returns key value.
func (UpdateInventoryRequestValidationError) Reason ¶
func (e UpdateInventoryRequestValidationError) Reason() string
Reason function returns reason value.