Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGoodsClientServiceHTTPServer(s *http.Server, srv GoodsClientServiceHTTPServer)
- func RegisterGoodsClientServiceServer(s grpc.ServiceRegistrar, srv GoodsClientServiceServer)
- type BuyGoodsRequest
- func (*BuyGoodsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BuyGoodsRequest) GetGoodsID() int64
- func (x *BuyGoodsRequest) GetRequestID() string
- func (*BuyGoodsRequest) ProtoMessage()
- func (x *BuyGoodsRequest) ProtoReflect() protoreflect.Message
- func (x *BuyGoodsRequest) Reset()
- func (x *BuyGoodsRequest) String() string
- func (m *BuyGoodsRequest) Validate() error
- func (m *BuyGoodsRequest) ValidateAll() error
- type BuyGoodsRequestMultiError
- type BuyGoodsRequestValidationError
- func (e BuyGoodsRequestValidationError) Cause() error
- func (e BuyGoodsRequestValidationError) Error() string
- func (e BuyGoodsRequestValidationError) ErrorName() string
- func (e BuyGoodsRequestValidationError) Field() string
- func (e BuyGoodsRequestValidationError) Key() bool
- func (e BuyGoodsRequestValidationError) Reason() string
- type GoodsClientServiceClient
- type GoodsClientServiceHTTPClient
- type GoodsClientServiceHTTPClientImpl
- type GoodsClientServiceHTTPServer
- type GoodsClientServiceServer
- type UnimplementedGoodsClientServiceServer
- type UnsafeGoodsClientServiceServer
Constants ¶
const OperationGoodsClientServiceBuyGoods = "/client_web.v1.goodsPb.GoodsClientService/BuyGoods"
Variables ¶
var File_client_web_v1_goods_client_goods_proto protoreflect.FileDescriptor
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 ¶
func (m BuyGoodsRequestMultiError) Error() string
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 ¶
func (e BuyGoodsRequestValidationError) Cause() error
Cause function returns cause value.
func (BuyGoodsRequestValidationError) Error ¶
func (e BuyGoodsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (BuyGoodsRequestValidationError) ErrorName ¶
func (e BuyGoodsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (BuyGoodsRequestValidationError) Field ¶
func (e BuyGoodsRequestValidationError) Field() string
Field function returns field value.
func (BuyGoodsRequestValidationError) Key ¶
func (e BuyGoodsRequestValidationError) Key() bool
Key function returns key value.
func (BuyGoodsRequestValidationError) Reason ¶
func (e BuyGoodsRequestValidationError) Reason() string
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.
func NewGoodsClientServiceClient ¶
func NewGoodsClientServiceClient(cc grpc.ClientConnInterface) GoodsClientServiceClient
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 ¶
func (c *GoodsClientServiceHTTPClientImpl) BuyGoods(ctx context.Context, in *BuyGoodsRequest, opts ...http.CallOption) (*base.OperateReply, error)
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 ¶
func (UnimplementedGoodsClientServiceServer) BuyGoods(context.Context, *BuyGoodsRequest) (*base.OperateReply, error)
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.