Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGoodsServiceHTTPServer(s *http.Server, srv GoodsServiceHTTPServer)
- func RegisterGoodsServiceServer(s grpc.ServiceRegistrar, srv GoodsServiceServer)
- type BuyGoodsReply
- func (*BuyGoodsReply) Descriptor() ([]byte, []int)deprecated
- func (x *BuyGoodsReply) GetResponse() *BuyGoodsResponse
- func (*BuyGoodsReply) ProtoMessage()
- func (x *BuyGoodsReply) ProtoReflect() protoreflect.Message
- func (x *BuyGoodsReply) Reset()
- func (x *BuyGoodsReply) String() string
- func (m *BuyGoodsReply) Validate() error
- func (m *BuyGoodsReply) ValidateAll() error
- type BuyGoodsReplyMultiError
- type BuyGoodsReplyValidationError
- func (e BuyGoodsReplyValidationError) Cause() error
- func (e BuyGoodsReplyValidationError) Error() string
- func (e BuyGoodsReplyValidationError) ErrorName() string
- func (e BuyGoodsReplyValidationError) Field() string
- func (e BuyGoodsReplyValidationError) Key() bool
- func (e BuyGoodsReplyValidationError) Reason() string
- 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 BuyGoodsResponse
- func (*BuyGoodsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BuyGoodsResponse) GetError() *base.Error
- func (x *BuyGoodsResponse) GetOrderNo() string
- func (x *BuyGoodsResponse) GetRequestID() string
- func (*BuyGoodsResponse) ProtoMessage()
- func (x *BuyGoodsResponse) ProtoReflect() protoreflect.Message
- func (x *BuyGoodsResponse) Reset()
- func (x *BuyGoodsResponse) String() string
- func (m *BuyGoodsResponse) Validate() error
- func (m *BuyGoodsResponse) ValidateAll() error
- type BuyGoodsResponseMultiError
- type BuyGoodsResponseValidationError
- func (e BuyGoodsResponseValidationError) Cause() error
- func (e BuyGoodsResponseValidationError) Error() string
- func (e BuyGoodsResponseValidationError) ErrorName() string
- func (e BuyGoodsResponseValidationError) Field() string
- func (e BuyGoodsResponseValidationError) Key() bool
- func (e BuyGoodsResponseValidationError) Reason() string
- type GoodsServiceClient
- type GoodsServiceHTTPClient
- type GoodsServiceHTTPClientImpl
- type GoodsServiceHTTPServer
- type GoodsServiceServer
- type UnimplementedGoodsServiceServer
- type UnsafeGoodsServiceServer
Constants ¶
const OperationGoodsServiceBuyGoods = "/client_web.v1.goods.GoodsService/BuyGoods"
Variables ¶
var File_client_web_v1_goods_client_goods_proto protoreflect.FileDescriptor
var GoodsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "client_web.v1.goods.GoodsService", HandlerType: (*GoodsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "BuyGoods", Handler: _GoodsService_BuyGoods_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "client-web/v1/goods/client-goods.proto", }
GoodsService_ServiceDesc is the grpc.ServiceDesc for GoodsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGoodsServiceHTTPServer ¶ added in v1.0.2
func RegisterGoodsServiceHTTPServer(s *http.Server, srv GoodsServiceHTTPServer)
func RegisterGoodsServiceServer ¶ added in v1.0.2
func RegisterGoodsServiceServer(s grpc.ServiceRegistrar, srv GoodsServiceServer)
Types ¶
type BuyGoodsReply ¶ added in v1.0.9
type BuyGoodsReply struct { Response *BuyGoodsResponse `protobuf:"bytes,1,opt,name=Response,proto3" json:"Response,omitempty"` // contains filtered or unexported fields }
func (*BuyGoodsReply) Descriptor
deprecated
added in
v1.0.9
func (*BuyGoodsReply) Descriptor() ([]byte, []int)
Deprecated: Use BuyGoodsReply.ProtoReflect.Descriptor instead.
func (*BuyGoodsReply) GetResponse ¶ added in v1.0.9
func (x *BuyGoodsReply) GetResponse() *BuyGoodsResponse
func (*BuyGoodsReply) ProtoMessage ¶ added in v1.0.9
func (*BuyGoodsReply) ProtoMessage()
func (*BuyGoodsReply) ProtoReflect ¶ added in v1.0.9
func (x *BuyGoodsReply) ProtoReflect() protoreflect.Message
func (*BuyGoodsReply) Reset ¶ added in v1.0.9
func (x *BuyGoodsReply) Reset()
func (*BuyGoodsReply) String ¶ added in v1.0.9
func (x *BuyGoodsReply) String() string
func (*BuyGoodsReply) Validate ¶ added in v1.0.9
func (m *BuyGoodsReply) Validate() error
Validate checks the field values on BuyGoodsReply 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 (*BuyGoodsReply) ValidateAll ¶ added in v1.0.9
func (m *BuyGoodsReply) ValidateAll() error
ValidateAll checks the field values on BuyGoodsReply 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 BuyGoodsReplyMultiError, or nil if none found.
type BuyGoodsReplyMultiError ¶ added in v1.0.9
type BuyGoodsReplyMultiError []error
BuyGoodsReplyMultiError is an error wrapping multiple validation errors returned by BuyGoodsReply.ValidateAll() if the designated constraints aren't met.
func (BuyGoodsReplyMultiError) AllErrors ¶ added in v1.0.9
func (m BuyGoodsReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BuyGoodsReplyMultiError) Error ¶ added in v1.0.9
func (m BuyGoodsReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BuyGoodsReplyValidationError ¶ added in v1.0.9
type BuyGoodsReplyValidationError struct {
// contains filtered or unexported fields
}
BuyGoodsReplyValidationError is the validation error returned by BuyGoodsReply.Validate if the designated constraints aren't met.
func (BuyGoodsReplyValidationError) Cause ¶ added in v1.0.9
func (e BuyGoodsReplyValidationError) Cause() error
Cause function returns cause value.
func (BuyGoodsReplyValidationError) Error ¶ added in v1.0.9
func (e BuyGoodsReplyValidationError) Error() string
Error satisfies the builtin error interface
func (BuyGoodsReplyValidationError) ErrorName ¶ added in v1.0.9
func (e BuyGoodsReplyValidationError) ErrorName() string
ErrorName returns error name.
func (BuyGoodsReplyValidationError) Field ¶ added in v1.0.9
func (e BuyGoodsReplyValidationError) Field() string
Field function returns field value.
func (BuyGoodsReplyValidationError) Key ¶ added in v1.0.9
func (e BuyGoodsReplyValidationError) Key() bool
Key function returns key value.
func (BuyGoodsReplyValidationError) Reason ¶ added in v1.0.9
func (e BuyGoodsReplyValidationError) Reason() string
Reason function returns reason value.
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 BuyGoodsResponse ¶ added in v1.0.9
type BuyGoodsResponse struct { RequestID string `protobuf:"bytes,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"` Error *base.Error `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` OrderNo string `protobuf:"bytes,3,opt,name=OrderNo,proto3" json:"OrderNo,omitempty"` //订单编号 // contains filtered or unexported fields }
func (*BuyGoodsResponse) Descriptor
deprecated
added in
v1.0.9
func (*BuyGoodsResponse) Descriptor() ([]byte, []int)
Deprecated: Use BuyGoodsResponse.ProtoReflect.Descriptor instead.
func (*BuyGoodsResponse) GetError ¶ added in v1.0.9
func (x *BuyGoodsResponse) GetError() *base.Error
func (*BuyGoodsResponse) GetOrderNo ¶ added in v1.0.9
func (x *BuyGoodsResponse) GetOrderNo() string
func (*BuyGoodsResponse) GetRequestID ¶ added in v1.0.9
func (x *BuyGoodsResponse) GetRequestID() string
func (*BuyGoodsResponse) ProtoMessage ¶ added in v1.0.9
func (*BuyGoodsResponse) ProtoMessage()
func (*BuyGoodsResponse) ProtoReflect ¶ added in v1.0.9
func (x *BuyGoodsResponse) ProtoReflect() protoreflect.Message
func (*BuyGoodsResponse) Reset ¶ added in v1.0.9
func (x *BuyGoodsResponse) Reset()
func (*BuyGoodsResponse) String ¶ added in v1.0.9
func (x *BuyGoodsResponse) String() string
func (*BuyGoodsResponse) Validate ¶ added in v1.0.9
func (m *BuyGoodsResponse) Validate() error
Validate checks the field values on BuyGoodsResponse 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 (*BuyGoodsResponse) ValidateAll ¶ added in v1.0.9
func (m *BuyGoodsResponse) ValidateAll() error
ValidateAll checks the field values on BuyGoodsResponse 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 BuyGoodsResponseMultiError, or nil if none found.
type BuyGoodsResponseMultiError ¶ added in v1.0.9
type BuyGoodsResponseMultiError []error
BuyGoodsResponseMultiError is an error wrapping multiple validation errors returned by BuyGoodsResponse.ValidateAll() if the designated constraints aren't met.
func (BuyGoodsResponseMultiError) AllErrors ¶ added in v1.0.9
func (m BuyGoodsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BuyGoodsResponseMultiError) Error ¶ added in v1.0.9
func (m BuyGoodsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BuyGoodsResponseValidationError ¶ added in v1.0.9
type BuyGoodsResponseValidationError struct {
// contains filtered or unexported fields
}
BuyGoodsResponseValidationError is the validation error returned by BuyGoodsResponse.Validate if the designated constraints aren't met.
func (BuyGoodsResponseValidationError) Cause ¶ added in v1.0.9
func (e BuyGoodsResponseValidationError) Cause() error
Cause function returns cause value.
func (BuyGoodsResponseValidationError) Error ¶ added in v1.0.9
func (e BuyGoodsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (BuyGoodsResponseValidationError) ErrorName ¶ added in v1.0.9
func (e BuyGoodsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (BuyGoodsResponseValidationError) Field ¶ added in v1.0.9
func (e BuyGoodsResponseValidationError) Field() string
Field function returns field value.
func (BuyGoodsResponseValidationError) Key ¶ added in v1.0.9
func (e BuyGoodsResponseValidationError) Key() bool
Key function returns key value.
func (BuyGoodsResponseValidationError) Reason ¶ added in v1.0.9
func (e BuyGoodsResponseValidationError) Reason() string
Reason function returns reason value.
type GoodsServiceClient ¶ added in v1.0.2
type GoodsServiceClient interface { //购买商品 BuyGoods(ctx context.Context, in *BuyGoodsRequest, opts ...grpc.CallOption) (*BuyGoodsReply, error) }
GoodsServiceClient is the client API for GoodsService 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 NewGoodsServiceClient ¶ added in v1.0.2
func NewGoodsServiceClient(cc grpc.ClientConnInterface) GoodsServiceClient
type GoodsServiceHTTPClient ¶ added in v1.0.2
type GoodsServiceHTTPClient interface {
BuyGoods(ctx context.Context, req *BuyGoodsRequest, opts ...http.CallOption) (rsp *BuyGoodsReply, err error)
}
func NewGoodsServiceHTTPClient ¶ added in v1.0.2
func NewGoodsServiceHTTPClient(client *http.Client) GoodsServiceHTTPClient
type GoodsServiceHTTPClientImpl ¶ added in v1.0.2
type GoodsServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*GoodsServiceHTTPClientImpl) BuyGoods ¶ added in v1.0.2
func (c *GoodsServiceHTTPClientImpl) BuyGoods(ctx context.Context, in *BuyGoodsRequest, opts ...http.CallOption) (*BuyGoodsReply, error)
type GoodsServiceHTTPServer ¶ added in v1.0.2
type GoodsServiceHTTPServer interface {
BuyGoods(context.Context, *BuyGoodsRequest) (*BuyGoodsReply, error)
}
type GoodsServiceServer ¶ added in v1.0.2
type GoodsServiceServer interface { //购买商品 BuyGoods(context.Context, *BuyGoodsRequest) (*BuyGoodsReply, error) // contains filtered or unexported methods }
GoodsServiceServer is the server API for GoodsService service. All implementations must embed UnimplementedGoodsServiceServer for forward compatibility
type UnimplementedGoodsServiceServer ¶ added in v1.0.2
type UnimplementedGoodsServiceServer struct { }
UnimplementedGoodsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGoodsServiceServer) BuyGoods ¶ added in v1.0.2
func (UnimplementedGoodsServiceServer) BuyGoods(context.Context, *BuyGoodsRequest) (*BuyGoodsReply, error)
type UnsafeGoodsServiceServer ¶ added in v1.0.2
type UnsafeGoodsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGoodsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GoodsServiceServer will result in compilation errors.