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

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

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

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

Cause function returns cause value.

func (DeductBalanceRequestValidationError) Error added in v1.0.4

Error satisfies the builtin error interface

func (DeductBalanceRequestValidationError) ErrorName added in v1.0.4

ErrorName returns error name.

func (DeductBalanceRequestValidationError) Field added in v1.0.4

Field function returns field value.

func (DeductBalanceRequestValidationError) Key added in v1.0.4

Key function returns key value.

func (DeductBalanceRequestValidationError) Reason added in v1.0.4

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

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.

Jump to

Keyboard shortcuts

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