client_goods

package
v1.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const OperationGoodsServiceBuyGoods = "/client_web.v1.goods.GoodsService/BuyGoods"

Variables

View Source
var File_client_web_v1_goods_client_goods_proto protoreflect.FileDescriptor
View Source
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

Cause function returns cause value.

func (BuyGoodsReplyValidationError) Error added in v1.0.9

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

Field function returns field value.

func (BuyGoodsReplyValidationError) Key added in v1.0.9

Key function returns key value.

func (BuyGoodsReplyValidationError) Reason added in v1.0.9

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

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

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

Cause function returns cause value.

func (BuyGoodsResponseValidationError) Error added in v1.0.9

Error satisfies the builtin error interface

func (BuyGoodsResponseValidationError) ErrorName added in v1.0.9

ErrorName returns error name.

func (BuyGoodsResponseValidationError) Field added in v1.0.9

Field function returns field value.

func (BuyGoodsResponseValidationError) Key added in v1.0.9

Key function returns key value.

func (BuyGoodsResponseValidationError) Reason added in v1.0.9

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

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

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.

Jump to

Keyboard shortcuts

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