goods

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const OperationGoodsClientServiceBuyGoods = "/client_web.v1.goodsPb.GoodsClientService/BuyGoods"

Variables

View Source
var File_client_web_v1_goods_client_goods_proto protoreflect.FileDescriptor
View Source
var GoodsClientService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "client_web.v1.goodsPb.GoodsClientService",
	HandlerType: (*GoodsClientServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BuyGoods",
			Handler:    _GoodsClientService_BuyGoods_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "client-web/v1/goods/client-goods.proto",
}

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

Functions

func RegisterGoodsClientServiceHTTPServer

func RegisterGoodsClientServiceHTTPServer(s *http.Server, srv GoodsClientServiceHTTPServer)

func RegisterGoodsClientServiceServer

func RegisterGoodsClientServiceServer(s grpc.ServiceRegistrar, srv GoodsClientServiceServer)

Types

type BuyGoodsRequest

type BuyGoodsRequest struct {
	RequestID string `protobuf:"bytes,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"`
	GoodsID   int64  `protobuf:"varint,2,opt,name=GoodsID,proto3" json:"GoodsID,omitempty"` //购买的商品ID
	// contains filtered or unexported fields
}

func (*BuyGoodsRequest) Descriptor deprecated

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

Deprecated: Use BuyGoodsRequest.ProtoReflect.Descriptor instead.

func (*BuyGoodsRequest) GetGoodsID

func (x *BuyGoodsRequest) GetGoodsID() int64

func (*BuyGoodsRequest) GetRequestID

func (x *BuyGoodsRequest) GetRequestID() string

func (*BuyGoodsRequest) ProtoMessage

func (*BuyGoodsRequest) ProtoMessage()

func (*BuyGoodsRequest) ProtoReflect

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

func (*BuyGoodsRequest) Reset

func (x *BuyGoodsRequest) Reset()

func (*BuyGoodsRequest) String

func (x *BuyGoodsRequest) String() string

func (*BuyGoodsRequest) Validate

func (m *BuyGoodsRequest) Validate() error

Validate checks the field values on BuyGoodsRequest 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 (*BuyGoodsRequest) ValidateAll

func (m *BuyGoodsRequest) ValidateAll() error

ValidateAll checks the field values on BuyGoodsRequest 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 BuyGoodsRequestMultiError, or nil if none found.

type BuyGoodsRequestMultiError

type BuyGoodsRequestMultiError []error

BuyGoodsRequestMultiError is an error wrapping multiple validation errors returned by BuyGoodsRequest.ValidateAll() if the designated constraints aren't met.

func (BuyGoodsRequestMultiError) AllErrors

func (m BuyGoodsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BuyGoodsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type BuyGoodsRequestValidationError

type BuyGoodsRequestValidationError struct {
	// contains filtered or unexported fields
}

BuyGoodsRequestValidationError is the validation error returned by BuyGoodsRequest.Validate if the designated constraints aren't met.

func (BuyGoodsRequestValidationError) Cause

Cause function returns cause value.

func (BuyGoodsRequestValidationError) Error

Error satisfies the builtin error interface

func (BuyGoodsRequestValidationError) ErrorName

func (e BuyGoodsRequestValidationError) ErrorName() string

ErrorName returns error name.

func (BuyGoodsRequestValidationError) Field

Field function returns field value.

func (BuyGoodsRequestValidationError) Key

Key function returns key value.

func (BuyGoodsRequestValidationError) Reason

Reason function returns reason value.

type GoodsClientServiceClient

type GoodsClientServiceClient interface {
	//购买商品
	BuyGoods(ctx context.Context, in *BuyGoodsRequest, opts ...grpc.CallOption) (*base.OperateReply, error)
}

GoodsClientServiceClient is the client API for GoodsClientService 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 GoodsClientServiceHTTPClient

type GoodsClientServiceHTTPClient interface {
	BuyGoods(ctx context.Context, req *BuyGoodsRequest, opts ...http.CallOption) (rsp *base.OperateReply, err error)
}

func NewGoodsClientServiceHTTPClient

func NewGoodsClientServiceHTTPClient(client *http.Client) GoodsClientServiceHTTPClient

type GoodsClientServiceHTTPClientImpl

type GoodsClientServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*GoodsClientServiceHTTPClientImpl) BuyGoods

type GoodsClientServiceHTTPServer

type GoodsClientServiceHTTPServer interface {
	BuyGoods(context.Context, *BuyGoodsRequest) (*base.OperateReply, error)
}

type GoodsClientServiceServer

type GoodsClientServiceServer interface {
	//购买商品
	BuyGoods(context.Context, *BuyGoodsRequest) (*base.OperateReply, error)
	// contains filtered or unexported methods
}

GoodsClientServiceServer is the server API for GoodsClientService service. All implementations must embed UnimplementedGoodsClientServiceServer for forward compatibility

type UnimplementedGoodsClientServiceServer

type UnimplementedGoodsClientServiceServer struct {
}

UnimplementedGoodsClientServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGoodsClientServiceServer) BuyGoods

type UnsafeGoodsClientServiceServer

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

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

Jump to

Keyboard shortcuts

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