v1

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

View Source
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.

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

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

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

Cause function returns cause value.

func (UpdateInventoryRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateInventoryRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateInventoryRequestValidationError) Field

Field function returns field value.

func (UpdateInventoryRequestValidationError) Key

Key function returns key value.

func (UpdateInventoryRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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