Documentation ¶
Index ¶
- Variables
- func RegisterBizUserServiceServer(s grpc.ServiceRegistrar, srv BizUserServiceServer)
- type BizUserServiceClient
- type BizUserServiceServer
- type DeductBalanceRequest
- func (*DeductBalanceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeductBalanceRequest) GetPrice() int64
- func (x *DeductBalanceRequest) GetRequestID() string
- func (x *DeductBalanceRequest) GetUserID() int64
- func (*DeductBalanceRequest) ProtoMessage()
- func (x *DeductBalanceRequest) ProtoReflect() protoreflect.Message
- func (x *DeductBalanceRequest) Reset()
- func (x *DeductBalanceRequest) String() string
- func (m *DeductBalanceRequest) Validate() error
- func (m *DeductBalanceRequest) ValidateAll() error
- type DeductBalanceRequestMultiError
- type DeductBalanceRequestValidationError
- func (e DeductBalanceRequestValidationError) Cause() error
- func (e DeductBalanceRequestValidationError) Error() string
- func (e DeductBalanceRequestValidationError) ErrorName() string
- func (e DeductBalanceRequestValidationError) Field() string
- func (e DeductBalanceRequestValidationError) Key() bool
- func (e DeductBalanceRequestValidationError) Reason() string
- type UnimplementedBizUserServiceServer
- type UnsafeBizUserServiceServer
Constants ¶
This section is empty.
Variables ¶
var BizUserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "biz_user.v1.BizUserService", HandlerType: (*BizUserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DeductBalance", Handler: _BizUserService_DeductBalance_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "biz_user/v1/biz_user.proto", }
BizUserService_ServiceDesc is the grpc.ServiceDesc for BizUserService 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_user_v1_biz_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBizUserServiceServer ¶
func RegisterBizUserServiceServer(s grpc.ServiceRegistrar, srv BizUserServiceServer)
Types ¶
type BizUserServiceClient ¶
type BizUserServiceClient interface { // 扣除余额 DeductBalance(ctx context.Context, in *DeductBalanceRequest, opts ...grpc.CallOption) (*base.OperateReply, error) }
BizUserServiceClient is the client API for BizUserService 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 NewBizUserServiceClient ¶
func NewBizUserServiceClient(cc grpc.ClientConnInterface) BizUserServiceClient
type BizUserServiceServer ¶
type BizUserServiceServer interface { // 扣除余额 DeductBalance(context.Context, *DeductBalanceRequest) (*base.OperateReply, error) // contains filtered or unexported methods }
BizUserServiceServer is the server API for BizUserService service. All implementations must embed UnimplementedBizUserServiceServer for forward compatibility
type DeductBalanceRequest ¶ added in v1.0.4
type DeductBalanceRequest struct { RequestID string `protobuf:"bytes,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"` UserID int64 `protobuf:"varint,2,opt,name=UserID,proto3" json:"UserID,omitempty"` //用户ID Price int64 `protobuf:"varint,3,opt,name=Price,proto3" json:"Price,omitempty"` //购买的商品的价格 单位分 // contains filtered or unexported fields }
func (*DeductBalanceRequest) Descriptor
deprecated
added in
v1.0.4
func (*DeductBalanceRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeductBalanceRequest.ProtoReflect.Descriptor instead.
func (*DeductBalanceRequest) GetPrice ¶ added in v1.0.4
func (x *DeductBalanceRequest) GetPrice() int64
func (*DeductBalanceRequest) GetRequestID ¶ added in v1.0.4
func (x *DeductBalanceRequest) GetRequestID() string
func (*DeductBalanceRequest) GetUserID ¶ added in v1.0.4
func (x *DeductBalanceRequest) GetUserID() int64
func (*DeductBalanceRequest) ProtoMessage ¶ added in v1.0.4
func (*DeductBalanceRequest) ProtoMessage()
func (*DeductBalanceRequest) ProtoReflect ¶ added in v1.0.4
func (x *DeductBalanceRequest) ProtoReflect() protoreflect.Message
func (*DeductBalanceRequest) Reset ¶ added in v1.0.4
func (x *DeductBalanceRequest) Reset()
func (*DeductBalanceRequest) String ¶ added in v1.0.4
func (x *DeductBalanceRequest) String() string
func (*DeductBalanceRequest) Validate ¶ added in v1.0.4
func (m *DeductBalanceRequest) Validate() error
Validate checks the field values on DeductBalanceRequest 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 (*DeductBalanceRequest) ValidateAll ¶ added in v1.0.4
func (m *DeductBalanceRequest) ValidateAll() error
ValidateAll checks the field values on DeductBalanceRequest 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 DeductBalanceRequestMultiError, or nil if none found.
type DeductBalanceRequestMultiError ¶ added in v1.0.4
type DeductBalanceRequestMultiError []error
DeductBalanceRequestMultiError is an error wrapping multiple validation errors returned by DeductBalanceRequest.ValidateAll() if the designated constraints aren't met.
func (DeductBalanceRequestMultiError) AllErrors ¶ added in v1.0.4
func (m DeductBalanceRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeductBalanceRequestMultiError) Error ¶ added in v1.0.4
func (m DeductBalanceRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeductBalanceRequestValidationError ¶ added in v1.0.4
type DeductBalanceRequestValidationError struct {
// contains filtered or unexported fields
}
DeductBalanceRequestValidationError is the validation error returned by DeductBalanceRequest.Validate if the designated constraints aren't met.
func (DeductBalanceRequestValidationError) Cause ¶ added in v1.0.4
func (e DeductBalanceRequestValidationError) Cause() error
Cause function returns cause value.
func (DeductBalanceRequestValidationError) Error ¶ added in v1.0.4
func (e DeductBalanceRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeductBalanceRequestValidationError) ErrorName ¶ added in v1.0.4
func (e DeductBalanceRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeductBalanceRequestValidationError) Field ¶ added in v1.0.4
func (e DeductBalanceRequestValidationError) Field() string
Field function returns field value.
func (DeductBalanceRequestValidationError) Key ¶ added in v1.0.4
func (e DeductBalanceRequestValidationError) Key() bool
Key function returns key value.
func (DeductBalanceRequestValidationError) Reason ¶ added in v1.0.4
func (e DeductBalanceRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedBizUserServiceServer ¶
type UnimplementedBizUserServiceServer struct { }
UnimplementedBizUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBizUserServiceServer) DeductBalance ¶ added in v1.0.4
func (UnimplementedBizUserServiceServer) DeductBalance(context.Context, *DeductBalanceRequest) (*base.OperateReply, error)
type UnsafeBizUserServiceServer ¶
type UnsafeBizUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBizUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BizUserServiceServer will result in compilation errors.