Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ErrorOrderAlreadyExists(format string, args ...interface{}) *errors.Error
- func ErrorOrderCreateFailed(format string, args ...interface{}) *errors.Error
- func ErrorOrderNotFound(format string, args ...interface{}) *errors.Error
- func IsOrderAlreadyExists(err error) bool
- func IsOrderCreateFailed(err error) bool
- func IsOrderNotFound(err error) bool
- func RegisterFakeServerHTTPServer(s *http.Server, srv FakeServerHTTPServer)
- func RegisterFakeServerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFakeServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FakeServerClient) error
- func RegisterFakeServerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFakeServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FakeServerServer) error
- func RegisterFakeServerServer(s grpc.ServiceRegistrar, srv FakeServerServer)
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetCustomer() string
- func (x *CreateOrderRequest) GetProduct() string
- func (x *CreateOrderRequest) GetQuantity() int64
- func (*CreateOrderRequest) ProtoMessage()
- func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CreateOrderRequest) Reset()
- func (x *CreateOrderRequest) String() string
- func (m *CreateOrderRequest) Validate() error
- func (m *CreateOrderRequest) ValidateAll() error
- type CreateOrderRequestMultiError
- type CreateOrderRequestValidationError
- func (e CreateOrderRequestValidationError) Cause() error
- func (e CreateOrderRequestValidationError) Error() string
- func (e CreateOrderRequestValidationError) ErrorName() string
- func (e CreateOrderRequestValidationError) Field() string
- func (e CreateOrderRequestValidationError) Key() bool
- func (e CreateOrderRequestValidationError) Reason() string
- type CreateOrderResponse
- func (*CreateOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderResponse) GetOrderID() string
- func (*CreateOrderResponse) ProtoMessage()
- func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
- func (x *CreateOrderResponse) Reset()
- func (x *CreateOrderResponse) String() string
- func (m *CreateOrderResponse) Validate() error
- func (m *CreateOrderResponse) ValidateAll() error
- type CreateOrderResponseMultiError
- type CreateOrderResponseValidationError
- func (e CreateOrderResponseValidationError) Cause() error
- func (e CreateOrderResponseValidationError) Error() string
- func (e CreateOrderResponseValidationError) ErrorName() string
- func (e CreateOrderResponseValidationError) Field() string
- func (e CreateOrderResponseValidationError) Key() bool
- func (e CreateOrderResponseValidationError) Reason() string
- type DeleteOrderRequest
- func (*DeleteOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteOrderRequest) GetOrderID() string
- func (*DeleteOrderRequest) ProtoMessage()
- func (x *DeleteOrderRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteOrderRequest) Reset()
- func (x *DeleteOrderRequest) String() string
- func (m *DeleteOrderRequest) Validate() error
- func (m *DeleteOrderRequest) ValidateAll() error
- type DeleteOrderRequestMultiError
- type DeleteOrderRequestValidationError
- func (e DeleteOrderRequestValidationError) Cause() error
- func (e DeleteOrderRequestValidationError) Error() string
- func (e DeleteOrderRequestValidationError) ErrorName() string
- func (e DeleteOrderRequestValidationError) Field() string
- func (e DeleteOrderRequestValidationError) Key() bool
- func (e DeleteOrderRequestValidationError) Reason() string
- type DeleteOrderResponse
- func (*DeleteOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (*DeleteOrderResponse) ProtoMessage()
- func (x *DeleteOrderResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteOrderResponse) Reset()
- func (x *DeleteOrderResponse) String() string
- func (m *DeleteOrderResponse) Validate() error
- func (m *DeleteOrderResponse) ValidateAll() error
- type DeleteOrderResponseMultiError
- type DeleteOrderResponseValidationError
- func (e DeleteOrderResponseValidationError) Cause() error
- func (e DeleteOrderResponseValidationError) Error() string
- func (e DeleteOrderResponseValidationError) ErrorName() string
- func (e DeleteOrderResponseValidationError) Field() string
- func (e DeleteOrderResponseValidationError) Key() bool
- func (e DeleteOrderResponseValidationError) Reason() string
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type FakeServerClient
- type FakeServerHTTPClient
- type FakeServerHTTPClientImpl
- func (c *FakeServerHTTPClientImpl) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...http.CallOption) (*CreateOrderResponse, error)
- func (c *FakeServerHTTPClientImpl) DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...http.CallOption) (*DeleteOrderResponse, error)
- func (c *FakeServerHTTPClientImpl) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...http.CallOption) (*GetOrderResponse, error)
- func (c *FakeServerHTTPClientImpl) ListOrder(ctx context.Context, in *ListOrderRequest, opts ...http.CallOption) (*ListOrderResponse, error)
- func (c *FakeServerHTTPClientImpl) UpdateOrder(ctx context.Context, in *UpdateOrderRequest, opts ...http.CallOption) (*UpdateOrderResponse, error)
- type FakeServerHTTPServer
- type FakeServerServer
- type GetOrderRequest
- func (*GetOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderRequest) GetOrderID() string
- func (*GetOrderRequest) ProtoMessage()
- func (x *GetOrderRequest) ProtoReflect() protoreflect.Message
- func (x *GetOrderRequest) Reset()
- func (x *GetOrderRequest) String() string
- func (m *GetOrderRequest) Validate() error
- func (m *GetOrderRequest) ValidateAll() error
- type GetOrderRequestMultiError
- type GetOrderRequestValidationError
- func (e GetOrderRequestValidationError) Cause() error
- func (e GetOrderRequestValidationError) Error() string
- func (e GetOrderRequestValidationError) ErrorName() string
- func (e GetOrderRequestValidationError) Field() string
- func (e GetOrderRequestValidationError) Key() bool
- func (e GetOrderRequestValidationError) Reason() string
- type GetOrderResponse
- func (*GetOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderResponse) GetOrder() *Order
- func (*GetOrderResponse) ProtoMessage()
- func (x *GetOrderResponse) ProtoReflect() protoreflect.Message
- func (x *GetOrderResponse) Reset()
- func (x *GetOrderResponse) String() string
- func (m *GetOrderResponse) Validate() error
- func (m *GetOrderResponse) ValidateAll() error
- type GetOrderResponseMultiError
- type GetOrderResponseValidationError
- func (e GetOrderResponseValidationError) Cause() error
- func (e GetOrderResponseValidationError) Error() string
- func (e GetOrderResponseValidationError) ErrorName() string
- func (e GetOrderResponseValidationError) Field() string
- func (e GetOrderResponseValidationError) Key() bool
- func (e GetOrderResponseValidationError) Reason() string
- type ListOrderRequest
- func (*ListOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrderRequest) GetLimit() int64
- func (x *ListOrderRequest) GetOffset() int64
- func (*ListOrderRequest) ProtoMessage()
- func (x *ListOrderRequest) ProtoReflect() protoreflect.Message
- func (x *ListOrderRequest) Reset()
- func (x *ListOrderRequest) String() string
- func (m *ListOrderRequest) Validate() error
- func (m *ListOrderRequest) ValidateAll() error
- type ListOrderRequestMultiError
- type ListOrderRequestValidationError
- func (e ListOrderRequestValidationError) Cause() error
- func (e ListOrderRequestValidationError) Error() string
- func (e ListOrderRequestValidationError) ErrorName() string
- func (e ListOrderRequestValidationError) Field() string
- func (e ListOrderRequestValidationError) Key() bool
- func (e ListOrderRequestValidationError) Reason() string
- type ListOrderResponse
- func (*ListOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrderResponse) GetOrders() []*Order
- func (x *ListOrderResponse) GetTotalCount() int64
- func (*ListOrderResponse) ProtoMessage()
- func (x *ListOrderResponse) ProtoReflect() protoreflect.Message
- func (x *ListOrderResponse) Reset()
- func (x *ListOrderResponse) String() string
- func (m *ListOrderResponse) Validate() error
- func (m *ListOrderResponse) ValidateAll() error
- type ListOrderResponseMultiError
- type ListOrderResponseValidationError
- func (e ListOrderResponseValidationError) Cause() error
- func (e ListOrderResponseValidationError) Error() string
- func (e ListOrderResponseValidationError) ErrorName() string
- func (e ListOrderResponseValidationError) Field() string
- func (e ListOrderResponseValidationError) Key() bool
- func (e ListOrderResponseValidationError) Reason() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetCreatedAt() *timestamppb.Timestamp
- func (x *Order) GetCustomer() string
- func (x *Order) GetOrderID() string
- func (x *Order) GetProduct() string
- func (x *Order) GetQuantity() int64
- func (x *Order) GetUpdatedAt() *timestamppb.Timestamp
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- func (m *Order) Validate() error
- func (m *Order) ValidateAll() error
- type OrderMultiError
- type OrderValidationError
- type UnimplementedFakeServerServer
- func (UnimplementedFakeServerServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
- func (UnimplementedFakeServerServer) DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, error)
- func (UnimplementedFakeServerServer) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error)
- func (UnimplementedFakeServerServer) ListOrder(context.Context, *ListOrderRequest) (*ListOrderResponse, error)
- func (UnimplementedFakeServerServer) UpdateOrder(context.Context, *UpdateOrderRequest) (*UpdateOrderResponse, error)
- type UnsafeFakeServerServer
- type UpdateOrderRequest
- func (*UpdateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateOrderRequest) GetCustomer() string
- func (x *UpdateOrderRequest) GetOrderID() string
- func (x *UpdateOrderRequest) GetProduct() string
- func (x *UpdateOrderRequest) GetQuantity() int64
- func (*UpdateOrderRequest) ProtoMessage()
- func (x *UpdateOrderRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateOrderRequest) Reset()
- func (x *UpdateOrderRequest) String() string
- func (m *UpdateOrderRequest) Validate() error
- func (m *UpdateOrderRequest) ValidateAll() error
- type UpdateOrderRequestMultiError
- type UpdateOrderRequestValidationError
- func (e UpdateOrderRequestValidationError) Cause() error
- func (e UpdateOrderRequestValidationError) Error() string
- func (e UpdateOrderRequestValidationError) ErrorName() string
- func (e UpdateOrderRequestValidationError) Field() string
- func (e UpdateOrderRequestValidationError) Key() bool
- func (e UpdateOrderRequestValidationError) Reason() string
- type UpdateOrderResponse
- func (*UpdateOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (*UpdateOrderResponse) ProtoMessage()
- func (x *UpdateOrderResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateOrderResponse) Reset()
- func (x *UpdateOrderResponse) String() string
- func (m *UpdateOrderResponse) Validate() error
- func (m *UpdateOrderResponse) ValidateAll() error
- type UpdateOrderResponseMultiError
- type UpdateOrderResponseValidationError
- func (e UpdateOrderResponseValidationError) Cause() error
- func (e UpdateOrderResponseValidationError) Error() string
- func (e UpdateOrderResponseValidationError) ErrorName() string
- func (e UpdateOrderResponseValidationError) Field() string
- func (e UpdateOrderResponseValidationError) Key() bool
- func (e UpdateOrderResponseValidationError) Reason() string
Constants ¶
const ( FakeServer_CreateOrder_FullMethodName = "/fakeserver.v1.FakeServer/CreateOrder" FakeServer_UpdateOrder_FullMethodName = "/fakeserver.v1.FakeServer/UpdateOrder" FakeServer_DeleteOrder_FullMethodName = "/fakeserver.v1.FakeServer/DeleteOrder" FakeServer_GetOrder_FullMethodName = "/fakeserver.v1.FakeServer/GetOrder" FakeServer_ListOrder_FullMethodName = "/fakeserver.v1.FakeServer/ListOrder" )
const OperationFakeServerCreateOrder = "/fakeserver.v1.FakeServer/CreateOrder"
const OperationFakeServerDeleteOrder = "/fakeserver.v1.FakeServer/DeleteOrder"
const OperationFakeServerGetOrder = "/fakeserver.v1.FakeServer/GetOrder"
const OperationFakeServerListOrder = "/fakeserver.v1.FakeServer/ListOrder"
const OperationFakeServerUpdateOrder = "/fakeserver.v1.FakeServer/UpdateOrder"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "OrderNotFound", 1: "OrderAlreadyExists", 2: "OrderCreateFailed", } ErrorReason_value = map[string]int32{ "OrderNotFound": 0, "OrderAlreadyExists": 1, "OrderCreateFailed": 2, } )
Enum value maps for ErrorReason.
var FakeServer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "fakeserver.v1.FakeServer", HandlerType: (*FakeServerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateOrder", Handler: _FakeServer_CreateOrder_Handler, }, { MethodName: "UpdateOrder", Handler: _FakeServer_UpdateOrder_Handler, }, { MethodName: "DeleteOrder", Handler: _FakeServer_DeleteOrder_Handler, }, { MethodName: "GetOrder", Handler: _FakeServer_GetOrder_Handler, }, { MethodName: "ListOrder", Handler: _FakeServer_ListOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "fakeserver/v1/fakeserver.proto", }
FakeServer_ServiceDesc is the grpc.ServiceDesc for FakeServer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_fakeserver_v1_errors_proto protoreflect.FileDescriptor
var File_fakeserver_v1_fakeserver_proto protoreflect.FileDescriptor
Functions ¶
func ErrorOrderAlreadyExists ¶
订单已存在,无法创建用户
func ErrorOrderCreateFailed ¶
创建订单失败,可能是由于服务器或其他问题导致的创建过程中的错误
func ErrorOrderNotFound ¶
订单找不到 ,可能是订单不存在或输入的订单标识有误
func RegisterFakeServerHTTPServer ¶
func RegisterFakeServerHTTPServer(s *http.Server, srv FakeServerHTTPServer)
func RegisterFakeServerHandler ¶
func RegisterFakeServerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterFakeServerHandler registers the http handlers for service FakeServer to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFakeServerHandlerClient ¶
func RegisterFakeServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FakeServerClient) error
RegisterFakeServerHandlerClient registers the http handlers for service FakeServer to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FakeServerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FakeServerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FakeServerClient" to call the correct interceptors.
func RegisterFakeServerHandlerFromEndpoint ¶
func RegisterFakeServerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFakeServerHandlerFromEndpoint is same as RegisterFakeServerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFakeServerHandlerServer ¶
func RegisterFakeServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FakeServerServer) error
RegisterFakeServerHandlerServer registers the http handlers for service FakeServer to "mux". UnaryRPC :call FakeServerServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFakeServerHandlerFromEndpoint instead.
func RegisterFakeServerServer ¶
func RegisterFakeServerServer(s grpc.ServiceRegistrar, srv FakeServerServer)
Types ¶
type CreateOrderRequest ¶
type CreateOrderRequest struct { Customer string `protobuf:"bytes,1,opt,name=customer,proto3" json:"customer,omitempty"` Product string `protobuf:"bytes,2,opt,name=product,proto3" json:"product,omitempty"` Quantity int64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetCustomer ¶
func (x *CreateOrderRequest) GetCustomer() string
func (*CreateOrderRequest) GetProduct ¶
func (x *CreateOrderRequest) GetProduct() string
func (*CreateOrderRequest) GetQuantity ¶
func (x *CreateOrderRequest) GetQuantity() int64
func (*CreateOrderRequest) ProtoMessage ¶
func (*CreateOrderRequest) ProtoMessage()
func (*CreateOrderRequest) ProtoReflect ¶
func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
func (*CreateOrderRequest) Reset ¶
func (x *CreateOrderRequest) Reset()
func (*CreateOrderRequest) String ¶
func (x *CreateOrderRequest) String() string
func (*CreateOrderRequest) Validate ¶
func (m *CreateOrderRequest) Validate() error
Validate checks the field values on CreateOrderRequest 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 (*CreateOrderRequest) ValidateAll ¶
func (m *CreateOrderRequest) ValidateAll() error
ValidateAll checks the field values on CreateOrderRequest 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 CreateOrderRequestMultiError, or nil if none found.
type CreateOrderRequestMultiError ¶
type CreateOrderRequestMultiError []error
CreateOrderRequestMultiError is an error wrapping multiple validation errors returned by CreateOrderRequest.ValidateAll() if the designated constraints aren't met.
func (CreateOrderRequestMultiError) AllErrors ¶
func (m CreateOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateOrderRequestMultiError) Error ¶
func (m CreateOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateOrderRequestValidationError ¶
type CreateOrderRequestValidationError struct {
// contains filtered or unexported fields
}
CreateOrderRequestValidationError is the validation error returned by CreateOrderRequest.Validate if the designated constraints aren't met.
func (CreateOrderRequestValidationError) Cause ¶
func (e CreateOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateOrderRequestValidationError) Error ¶
func (e CreateOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateOrderRequestValidationError) ErrorName ¶
func (e CreateOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateOrderRequestValidationError) Field ¶
func (e CreateOrderRequestValidationError) Field() string
Field function returns field value.
func (CreateOrderRequestValidationError) Key ¶
func (e CreateOrderRequestValidationError) Key() bool
Key function returns key value.
func (CreateOrderRequestValidationError) Reason ¶
func (e CreateOrderRequestValidationError) Reason() string
Reason function returns reason value.
type CreateOrderResponse ¶
type CreateOrderResponse struct { OrderID string `protobuf:"bytes,1,opt,name=orderID,proto3" json:"orderID,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderResponse) Descriptor
deprecated
func (*CreateOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.
func (*CreateOrderResponse) GetOrderID ¶
func (x *CreateOrderResponse) GetOrderID() string
func (*CreateOrderResponse) ProtoMessage ¶
func (*CreateOrderResponse) ProtoMessage()
func (*CreateOrderResponse) ProtoReflect ¶
func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
func (*CreateOrderResponse) Reset ¶
func (x *CreateOrderResponse) Reset()
func (*CreateOrderResponse) String ¶
func (x *CreateOrderResponse) String() string
func (*CreateOrderResponse) Validate ¶
func (m *CreateOrderResponse) Validate() error
Validate checks the field values on CreateOrderResponse 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 (*CreateOrderResponse) ValidateAll ¶
func (m *CreateOrderResponse) ValidateAll() error
ValidateAll checks the field values on CreateOrderResponse 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 CreateOrderResponseMultiError, or nil if none found.
type CreateOrderResponseMultiError ¶
type CreateOrderResponseMultiError []error
CreateOrderResponseMultiError is an error wrapping multiple validation errors returned by CreateOrderResponse.ValidateAll() if the designated constraints aren't met.
func (CreateOrderResponseMultiError) AllErrors ¶
func (m CreateOrderResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateOrderResponseMultiError) Error ¶
func (m CreateOrderResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateOrderResponseValidationError ¶
type CreateOrderResponseValidationError struct {
// contains filtered or unexported fields
}
CreateOrderResponseValidationError is the validation error returned by CreateOrderResponse.Validate if the designated constraints aren't met.
func (CreateOrderResponseValidationError) Cause ¶
func (e CreateOrderResponseValidationError) Cause() error
Cause function returns cause value.
func (CreateOrderResponseValidationError) Error ¶
func (e CreateOrderResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreateOrderResponseValidationError) ErrorName ¶
func (e CreateOrderResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreateOrderResponseValidationError) Field ¶
func (e CreateOrderResponseValidationError) Field() string
Field function returns field value.
func (CreateOrderResponseValidationError) Key ¶
func (e CreateOrderResponseValidationError) Key() bool
Key function returns key value.
func (CreateOrderResponseValidationError) Reason ¶
func (e CreateOrderResponseValidationError) Reason() string
Reason function returns reason value.
type DeleteOrderRequest ¶
type DeleteOrderRequest struct { OrderID string `protobuf:"bytes,1,opt,name=orderID,proto3" json:"orderID,omitempty"` // contains filtered or unexported fields }
func (*DeleteOrderRequest) Descriptor
deprecated
func (*DeleteOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOrderRequest.ProtoReflect.Descriptor instead.
func (*DeleteOrderRequest) GetOrderID ¶
func (x *DeleteOrderRequest) GetOrderID() string
func (*DeleteOrderRequest) ProtoMessage ¶
func (*DeleteOrderRequest) ProtoMessage()
func (*DeleteOrderRequest) ProtoReflect ¶
func (x *DeleteOrderRequest) ProtoReflect() protoreflect.Message
func (*DeleteOrderRequest) Reset ¶
func (x *DeleteOrderRequest) Reset()
func (*DeleteOrderRequest) String ¶
func (x *DeleteOrderRequest) String() string
func (*DeleteOrderRequest) Validate ¶
func (m *DeleteOrderRequest) Validate() error
Validate checks the field values on DeleteOrderRequest 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 (*DeleteOrderRequest) ValidateAll ¶
func (m *DeleteOrderRequest) ValidateAll() error
ValidateAll checks the field values on DeleteOrderRequest 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 DeleteOrderRequestMultiError, or nil if none found.
type DeleteOrderRequestMultiError ¶
type DeleteOrderRequestMultiError []error
DeleteOrderRequestMultiError is an error wrapping multiple validation errors returned by DeleteOrderRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteOrderRequestMultiError) AllErrors ¶
func (m DeleteOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteOrderRequestMultiError) Error ¶
func (m DeleteOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteOrderRequestValidationError ¶
type DeleteOrderRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteOrderRequestValidationError is the validation error returned by DeleteOrderRequest.Validate if the designated constraints aren't met.
func (DeleteOrderRequestValidationError) Cause ¶
func (e DeleteOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteOrderRequestValidationError) Error ¶
func (e DeleteOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteOrderRequestValidationError) ErrorName ¶
func (e DeleteOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteOrderRequestValidationError) Field ¶
func (e DeleteOrderRequestValidationError) Field() string
Field function returns field value.
func (DeleteOrderRequestValidationError) Key ¶
func (e DeleteOrderRequestValidationError) Key() bool
Key function returns key value.
func (DeleteOrderRequestValidationError) Reason ¶
func (e DeleteOrderRequestValidationError) Reason() string
Reason function returns reason value.
type DeleteOrderResponse ¶
type DeleteOrderResponse struct {
// contains filtered or unexported fields
}
func (*DeleteOrderResponse) Descriptor
deprecated
func (*DeleteOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOrderResponse.ProtoReflect.Descriptor instead.
func (*DeleteOrderResponse) ProtoMessage ¶
func (*DeleteOrderResponse) ProtoMessage()
func (*DeleteOrderResponse) ProtoReflect ¶
func (x *DeleteOrderResponse) ProtoReflect() protoreflect.Message
func (*DeleteOrderResponse) Reset ¶
func (x *DeleteOrderResponse) Reset()
func (*DeleteOrderResponse) String ¶
func (x *DeleteOrderResponse) String() string
func (*DeleteOrderResponse) Validate ¶
func (m *DeleteOrderResponse) Validate() error
Validate checks the field values on DeleteOrderResponse 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 (*DeleteOrderResponse) ValidateAll ¶
func (m *DeleteOrderResponse) ValidateAll() error
ValidateAll checks the field values on DeleteOrderResponse 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 DeleteOrderResponseMultiError, or nil if none found.
type DeleteOrderResponseMultiError ¶
type DeleteOrderResponseMultiError []error
DeleteOrderResponseMultiError is an error wrapping multiple validation errors returned by DeleteOrderResponse.ValidateAll() if the designated constraints aren't met.
func (DeleteOrderResponseMultiError) AllErrors ¶
func (m DeleteOrderResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteOrderResponseMultiError) Error ¶
func (m DeleteOrderResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteOrderResponseValidationError ¶
type DeleteOrderResponseValidationError struct {
// contains filtered or unexported fields
}
DeleteOrderResponseValidationError is the validation error returned by DeleteOrderResponse.Validate if the designated constraints aren't met.
func (DeleteOrderResponseValidationError) Cause ¶
func (e DeleteOrderResponseValidationError) Cause() error
Cause function returns cause value.
func (DeleteOrderResponseValidationError) Error ¶
func (e DeleteOrderResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteOrderResponseValidationError) ErrorName ¶
func (e DeleteOrderResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteOrderResponseValidationError) Field ¶
func (e DeleteOrderResponseValidationError) Field() string
Field function returns field value.
func (DeleteOrderResponseValidationError) Key ¶
func (e DeleteOrderResponseValidationError) Key() bool
Key function returns key value.
func (DeleteOrderResponseValidationError) Reason ¶
func (e DeleteOrderResponseValidationError) Reason() string
Reason function returns reason value.
type ErrorReason ¶
type ErrorReason int32
const ( // 订单找不到 ,可能是订单不存在或输入的订单标识有误 ErrorReason_OrderNotFound ErrorReason = 0 // 订单已存在,无法创建用户 ErrorReason_OrderAlreadyExists ErrorReason = 1 // 创建订单失败,可能是由于服务器或其他问题导致的创建过程中的错误 ErrorReason_OrderCreateFailed ErrorReason = 2 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type FakeServerClient ¶
type FakeServerClient interface { CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error) UpdateOrder(ctx context.Context, in *UpdateOrderRequest, opts ...grpc.CallOption) (*UpdateOrderResponse, error) DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...grpc.CallOption) (*DeleteOrderResponse, error) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*GetOrderResponse, error) ListOrder(ctx context.Context, in *ListOrderRequest, opts ...grpc.CallOption) (*ListOrderResponse, error) }
FakeServerClient is the client API for FakeServer 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 NewFakeServerClient ¶
func NewFakeServerClient(cc grpc.ClientConnInterface) FakeServerClient
type FakeServerHTTPClient ¶
type FakeServerHTTPClient interface { CreateOrder(ctx context.Context, req *CreateOrderRequest, opts ...http.CallOption) (rsp *CreateOrderResponse, err error) DeleteOrder(ctx context.Context, req *DeleteOrderRequest, opts ...http.CallOption) (rsp *DeleteOrderResponse, err error) GetOrder(ctx context.Context, req *GetOrderRequest, opts ...http.CallOption) (rsp *GetOrderResponse, err error) ListOrder(ctx context.Context, req *ListOrderRequest, opts ...http.CallOption) (rsp *ListOrderResponse, err error) UpdateOrder(ctx context.Context, req *UpdateOrderRequest, opts ...http.CallOption) (rsp *UpdateOrderResponse, err error) }
func NewFakeServerHTTPClient ¶
func NewFakeServerHTTPClient(client *http.Client) FakeServerHTTPClient
type FakeServerHTTPClientImpl ¶
type FakeServerHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*FakeServerHTTPClientImpl) CreateOrder ¶
func (c *FakeServerHTTPClientImpl) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...http.CallOption) (*CreateOrderResponse, error)
func (*FakeServerHTTPClientImpl) DeleteOrder ¶
func (c *FakeServerHTTPClientImpl) DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...http.CallOption) (*DeleteOrderResponse, error)
func (*FakeServerHTTPClientImpl) GetOrder ¶
func (c *FakeServerHTTPClientImpl) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...http.CallOption) (*GetOrderResponse, error)
func (*FakeServerHTTPClientImpl) ListOrder ¶
func (c *FakeServerHTTPClientImpl) ListOrder(ctx context.Context, in *ListOrderRequest, opts ...http.CallOption) (*ListOrderResponse, error)
func (*FakeServerHTTPClientImpl) UpdateOrder ¶
func (c *FakeServerHTTPClientImpl) UpdateOrder(ctx context.Context, in *UpdateOrderRequest, opts ...http.CallOption) (*UpdateOrderResponse, error)
type FakeServerHTTPServer ¶
type FakeServerHTTPServer interface { CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error) DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, error) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error) ListOrder(context.Context, *ListOrderRequest) (*ListOrderResponse, error) UpdateOrder(context.Context, *UpdateOrderRequest) (*UpdateOrderResponse, error) }
type FakeServerServer ¶
type FakeServerServer interface { CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error) UpdateOrder(context.Context, *UpdateOrderRequest) (*UpdateOrderResponse, error) DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, error) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error) ListOrder(context.Context, *ListOrderRequest) (*ListOrderResponse, error) // contains filtered or unexported methods }
FakeServerServer is the server API for FakeServer service. All implementations must embed UnimplementedFakeServerServer for forward compatibility.
type GetOrderRequest ¶
type GetOrderRequest struct { OrderID string `protobuf:"bytes,1,opt,name=orderID,proto3" json:"orderID,omitempty"` // contains filtered or unexported fields }
func (*GetOrderRequest) Descriptor
deprecated
func (*GetOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderRequest.ProtoReflect.Descriptor instead.
func (*GetOrderRequest) GetOrderID ¶
func (x *GetOrderRequest) GetOrderID() string
func (*GetOrderRequest) ProtoMessage ¶
func (*GetOrderRequest) ProtoMessage()
func (*GetOrderRequest) ProtoReflect ¶
func (x *GetOrderRequest) ProtoReflect() protoreflect.Message
func (*GetOrderRequest) Reset ¶
func (x *GetOrderRequest) Reset()
func (*GetOrderRequest) String ¶
func (x *GetOrderRequest) String() string
func (*GetOrderRequest) Validate ¶
func (m *GetOrderRequest) Validate() error
Validate checks the field values on GetOrderRequest 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 (*GetOrderRequest) ValidateAll ¶
func (m *GetOrderRequest) ValidateAll() error
ValidateAll checks the field values on GetOrderRequest 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 GetOrderRequestMultiError, or nil if none found.
type GetOrderRequestMultiError ¶
type GetOrderRequestMultiError []error
GetOrderRequestMultiError is an error wrapping multiple validation errors returned by GetOrderRequest.ValidateAll() if the designated constraints aren't met.
func (GetOrderRequestMultiError) AllErrors ¶
func (m GetOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetOrderRequestMultiError) Error ¶
func (m GetOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetOrderRequestValidationError ¶
type GetOrderRequestValidationError struct {
// contains filtered or unexported fields
}
GetOrderRequestValidationError is the validation error returned by GetOrderRequest.Validate if the designated constraints aren't met.
func (GetOrderRequestValidationError) Cause ¶
func (e GetOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (GetOrderRequestValidationError) Error ¶
func (e GetOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetOrderRequestValidationError) ErrorName ¶
func (e GetOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetOrderRequestValidationError) Field ¶
func (e GetOrderRequestValidationError) Field() string
Field function returns field value.
func (GetOrderRequestValidationError) Key ¶
func (e GetOrderRequestValidationError) Key() bool
Key function returns key value.
func (GetOrderRequestValidationError) Reason ¶
func (e GetOrderRequestValidationError) Reason() string
Reason function returns reason value.
type GetOrderResponse ¶
type GetOrderResponse struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*GetOrderResponse) Descriptor
deprecated
func (*GetOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderResponse.ProtoReflect.Descriptor instead.
func (*GetOrderResponse) GetOrder ¶
func (x *GetOrderResponse) GetOrder() *Order
func (*GetOrderResponse) ProtoMessage ¶
func (*GetOrderResponse) ProtoMessage()
func (*GetOrderResponse) ProtoReflect ¶
func (x *GetOrderResponse) ProtoReflect() protoreflect.Message
func (*GetOrderResponse) Reset ¶
func (x *GetOrderResponse) Reset()
func (*GetOrderResponse) String ¶
func (x *GetOrderResponse) String() string
func (*GetOrderResponse) Validate ¶
func (m *GetOrderResponse) Validate() error
Validate checks the field values on GetOrderResponse 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 (*GetOrderResponse) ValidateAll ¶
func (m *GetOrderResponse) ValidateAll() error
ValidateAll checks the field values on GetOrderResponse 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 GetOrderResponseMultiError, or nil if none found.
type GetOrderResponseMultiError ¶
type GetOrderResponseMultiError []error
GetOrderResponseMultiError is an error wrapping multiple validation errors returned by GetOrderResponse.ValidateAll() if the designated constraints aren't met.
func (GetOrderResponseMultiError) AllErrors ¶
func (m GetOrderResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetOrderResponseMultiError) Error ¶
func (m GetOrderResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetOrderResponseValidationError ¶
type GetOrderResponseValidationError struct {
// contains filtered or unexported fields
}
GetOrderResponseValidationError is the validation error returned by GetOrderResponse.Validate if the designated constraints aren't met.
func (GetOrderResponseValidationError) Cause ¶
func (e GetOrderResponseValidationError) Cause() error
Cause function returns cause value.
func (GetOrderResponseValidationError) Error ¶
func (e GetOrderResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetOrderResponseValidationError) ErrorName ¶
func (e GetOrderResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetOrderResponseValidationError) Field ¶
func (e GetOrderResponseValidationError) Field() string
Field function returns field value.
func (GetOrderResponseValidationError) Key ¶
func (e GetOrderResponseValidationError) Key() bool
Key function returns key value.
func (GetOrderResponseValidationError) Reason ¶
func (e GetOrderResponseValidationError) Reason() string
Reason function returns reason value.
type ListOrderRequest ¶
type ListOrderRequest struct { Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*ListOrderRequest) Descriptor
deprecated
func (*ListOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListOrderRequest.ProtoReflect.Descriptor instead.
func (*ListOrderRequest) GetLimit ¶
func (x *ListOrderRequest) GetLimit() int64
func (*ListOrderRequest) GetOffset ¶
func (x *ListOrderRequest) GetOffset() int64
func (*ListOrderRequest) ProtoMessage ¶
func (*ListOrderRequest) ProtoMessage()
func (*ListOrderRequest) ProtoReflect ¶
func (x *ListOrderRequest) ProtoReflect() protoreflect.Message
func (*ListOrderRequest) Reset ¶
func (x *ListOrderRequest) Reset()
func (*ListOrderRequest) String ¶
func (x *ListOrderRequest) String() string
func (*ListOrderRequest) Validate ¶
func (m *ListOrderRequest) Validate() error
Validate checks the field values on ListOrderRequest 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 (*ListOrderRequest) ValidateAll ¶
func (m *ListOrderRequest) ValidateAll() error
ValidateAll checks the field values on ListOrderRequest 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 ListOrderRequestMultiError, or nil if none found.
type ListOrderRequestMultiError ¶
type ListOrderRequestMultiError []error
ListOrderRequestMultiError is an error wrapping multiple validation errors returned by ListOrderRequest.ValidateAll() if the designated constraints aren't met.
func (ListOrderRequestMultiError) AllErrors ¶
func (m ListOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListOrderRequestMultiError) Error ¶
func (m ListOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListOrderRequestValidationError ¶
type ListOrderRequestValidationError struct {
// contains filtered or unexported fields
}
ListOrderRequestValidationError is the validation error returned by ListOrderRequest.Validate if the designated constraints aren't met.
func (ListOrderRequestValidationError) Cause ¶
func (e ListOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (ListOrderRequestValidationError) Error ¶
func (e ListOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListOrderRequestValidationError) ErrorName ¶
func (e ListOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListOrderRequestValidationError) Field ¶
func (e ListOrderRequestValidationError) Field() string
Field function returns field value.
func (ListOrderRequestValidationError) Key ¶
func (e ListOrderRequestValidationError) Key() bool
Key function returns key value.
func (ListOrderRequestValidationError) Reason ¶
func (e ListOrderRequestValidationError) Reason() string
Reason function returns reason value.
type ListOrderResponse ¶
type ListOrderResponse struct { TotalCount int64 `protobuf:"varint,1,opt,name=totalCount,proto3" json:"totalCount,omitempty"` Orders []*Order `protobuf:"bytes,2,rep,name=Orders,proto3" json:"Orders,omitempty"` // contains filtered or unexported fields }
func (*ListOrderResponse) Descriptor
deprecated
func (*ListOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListOrderResponse.ProtoReflect.Descriptor instead.
func (*ListOrderResponse) GetOrders ¶
func (x *ListOrderResponse) GetOrders() []*Order
func (*ListOrderResponse) GetTotalCount ¶
func (x *ListOrderResponse) GetTotalCount() int64
func (*ListOrderResponse) ProtoMessage ¶
func (*ListOrderResponse) ProtoMessage()
func (*ListOrderResponse) ProtoReflect ¶
func (x *ListOrderResponse) ProtoReflect() protoreflect.Message
func (*ListOrderResponse) Reset ¶
func (x *ListOrderResponse) Reset()
func (*ListOrderResponse) String ¶
func (x *ListOrderResponse) String() string
func (*ListOrderResponse) Validate ¶
func (m *ListOrderResponse) Validate() error
Validate checks the field values on ListOrderResponse 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 (*ListOrderResponse) ValidateAll ¶
func (m *ListOrderResponse) ValidateAll() error
ValidateAll checks the field values on ListOrderResponse 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 ListOrderResponseMultiError, or nil if none found.
type ListOrderResponseMultiError ¶
type ListOrderResponseMultiError []error
ListOrderResponseMultiError is an error wrapping multiple validation errors returned by ListOrderResponse.ValidateAll() if the designated constraints aren't met.
func (ListOrderResponseMultiError) AllErrors ¶
func (m ListOrderResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListOrderResponseMultiError) Error ¶
func (m ListOrderResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListOrderResponseValidationError ¶
type ListOrderResponseValidationError struct {
// contains filtered or unexported fields
}
ListOrderResponseValidationError is the validation error returned by ListOrderResponse.Validate if the designated constraints aren't met.
func (ListOrderResponseValidationError) Cause ¶
func (e ListOrderResponseValidationError) Cause() error
Cause function returns cause value.
func (ListOrderResponseValidationError) Error ¶
func (e ListOrderResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListOrderResponseValidationError) ErrorName ¶
func (e ListOrderResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListOrderResponseValidationError) Field ¶
func (e ListOrderResponseValidationError) Field() string
Field function returns field value.
func (ListOrderResponseValidationError) Key ¶
func (e ListOrderResponseValidationError) Key() bool
Key function returns key value.
func (ListOrderResponseValidationError) Reason ¶
func (e ListOrderResponseValidationError) Reason() string
Reason function returns reason value.
type Order ¶
type Order struct { OrderID string `protobuf:"bytes,1,opt,name=orderID,proto3" json:"orderID,omitempty"` // 订单 ID Customer string `protobuf:"bytes,2,opt,name=customer,proto3" json:"customer,omitempty"` // 顾客姓名 Product string `protobuf:"bytes,3,opt,name=product,proto3" json:"product,omitempty"` // 产品名称 Quantity int64 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` // 购买数量 CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间 UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // 更新时间 // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetCreatedAt ¶
func (x *Order) GetCreatedAt() *timestamppb.Timestamp
func (*Order) GetCustomer ¶
func (*Order) GetOrderID ¶
func (*Order) GetProduct ¶
func (*Order) GetQuantity ¶
func (*Order) GetUpdatedAt ¶
func (x *Order) GetUpdatedAt() *timestamppb.Timestamp
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
func (*Order) Validate ¶
Validate checks the field values on Order 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 (*Order) ValidateAll ¶
ValidateAll checks the field values on Order 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 OrderMultiError, or nil if none found.
type OrderMultiError ¶
type OrderMultiError []error
OrderMultiError is an error wrapping multiple validation errors returned by Order.ValidateAll() if the designated constraints aren't met.
func (OrderMultiError) AllErrors ¶
func (m OrderMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OrderMultiError) Error ¶
func (m OrderMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OrderValidationError ¶
type OrderValidationError struct {
// contains filtered or unexported fields
}
OrderValidationError is the validation error returned by Order.Validate if the designated constraints aren't met.
func (OrderValidationError) Cause ¶
func (e OrderValidationError) Cause() error
Cause function returns cause value.
func (OrderValidationError) Error ¶
func (e OrderValidationError) Error() string
Error satisfies the builtin error interface
func (OrderValidationError) ErrorName ¶
func (e OrderValidationError) ErrorName() string
ErrorName returns error name.
func (OrderValidationError) Field ¶
func (e OrderValidationError) Field() string
Field function returns field value.
func (OrderValidationError) Key ¶
func (e OrderValidationError) Key() bool
Key function returns key value.
func (OrderValidationError) Reason ¶
func (e OrderValidationError) Reason() string
Reason function returns reason value.
type UnimplementedFakeServerServer ¶
type UnimplementedFakeServerServer struct{}
UnimplementedFakeServerServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFakeServerServer) CreateOrder ¶
func (UnimplementedFakeServerServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
func (UnimplementedFakeServerServer) DeleteOrder ¶
func (UnimplementedFakeServerServer) DeleteOrder(context.Context, *DeleteOrderRequest) (*DeleteOrderResponse, error)
func (UnimplementedFakeServerServer) GetOrder ¶
func (UnimplementedFakeServerServer) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error)
func (UnimplementedFakeServerServer) ListOrder ¶
func (UnimplementedFakeServerServer) ListOrder(context.Context, *ListOrderRequest) (*ListOrderResponse, error)
func (UnimplementedFakeServerServer) UpdateOrder ¶
func (UnimplementedFakeServerServer) UpdateOrder(context.Context, *UpdateOrderRequest) (*UpdateOrderResponse, error)
type UnsafeFakeServerServer ¶
type UnsafeFakeServerServer interface {
// contains filtered or unexported methods
}
UnsafeFakeServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FakeServerServer will result in compilation errors.
type UpdateOrderRequest ¶
type UpdateOrderRequest struct { OrderID string `protobuf:"bytes,1,opt,name=orderID,proto3" json:"orderID,omitempty"` Customer *string `protobuf:"bytes,2,opt,name=customer,proto3,oneof" json:"customer,omitempty"` Product *string `protobuf:"bytes,3,opt,name=product,proto3,oneof" json:"product,omitempty"` Quantity *int64 `protobuf:"varint,4,opt,name=quantity,proto3,oneof" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*UpdateOrderRequest) Descriptor
deprecated
func (*UpdateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrderRequest.ProtoReflect.Descriptor instead.
func (*UpdateOrderRequest) GetCustomer ¶
func (x *UpdateOrderRequest) GetCustomer() string
func (*UpdateOrderRequest) GetOrderID ¶
func (x *UpdateOrderRequest) GetOrderID() string
func (*UpdateOrderRequest) GetProduct ¶
func (x *UpdateOrderRequest) GetProduct() string
func (*UpdateOrderRequest) GetQuantity ¶
func (x *UpdateOrderRequest) GetQuantity() int64
func (*UpdateOrderRequest) ProtoMessage ¶
func (*UpdateOrderRequest) ProtoMessage()
func (*UpdateOrderRequest) ProtoReflect ¶
func (x *UpdateOrderRequest) ProtoReflect() protoreflect.Message
func (*UpdateOrderRequest) Reset ¶
func (x *UpdateOrderRequest) Reset()
func (*UpdateOrderRequest) String ¶
func (x *UpdateOrderRequest) String() string
func (*UpdateOrderRequest) Validate ¶
func (m *UpdateOrderRequest) Validate() error
Validate checks the field values on UpdateOrderRequest 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 (*UpdateOrderRequest) ValidateAll ¶
func (m *UpdateOrderRequest) ValidateAll() error
ValidateAll checks the field values on UpdateOrderRequest 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 UpdateOrderRequestMultiError, or nil if none found.
type UpdateOrderRequestMultiError ¶
type UpdateOrderRequestMultiError []error
UpdateOrderRequestMultiError is an error wrapping multiple validation errors returned by UpdateOrderRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateOrderRequestMultiError) AllErrors ¶
func (m UpdateOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateOrderRequestMultiError) Error ¶
func (m UpdateOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateOrderRequestValidationError ¶
type UpdateOrderRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateOrderRequestValidationError is the validation error returned by UpdateOrderRequest.Validate if the designated constraints aren't met.
func (UpdateOrderRequestValidationError) Cause ¶
func (e UpdateOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateOrderRequestValidationError) Error ¶
func (e UpdateOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateOrderRequestValidationError) ErrorName ¶
func (e UpdateOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateOrderRequestValidationError) Field ¶
func (e UpdateOrderRequestValidationError) Field() string
Field function returns field value.
func (UpdateOrderRequestValidationError) Key ¶
func (e UpdateOrderRequestValidationError) Key() bool
Key function returns key value.
func (UpdateOrderRequestValidationError) Reason ¶
func (e UpdateOrderRequestValidationError) Reason() string
Reason function returns reason value.
type UpdateOrderResponse ¶
type UpdateOrderResponse struct {
// contains filtered or unexported fields
}
func (*UpdateOrderResponse) Descriptor
deprecated
func (*UpdateOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrderResponse.ProtoReflect.Descriptor instead.
func (*UpdateOrderResponse) ProtoMessage ¶
func (*UpdateOrderResponse) ProtoMessage()
func (*UpdateOrderResponse) ProtoReflect ¶
func (x *UpdateOrderResponse) ProtoReflect() protoreflect.Message
func (*UpdateOrderResponse) Reset ¶
func (x *UpdateOrderResponse) Reset()
func (*UpdateOrderResponse) String ¶
func (x *UpdateOrderResponse) String() string
func (*UpdateOrderResponse) Validate ¶
func (m *UpdateOrderResponse) Validate() error
Validate checks the field values on UpdateOrderResponse 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 (*UpdateOrderResponse) ValidateAll ¶
func (m *UpdateOrderResponse) ValidateAll() error
ValidateAll checks the field values on UpdateOrderResponse 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 UpdateOrderResponseMultiError, or nil if none found.
type UpdateOrderResponseMultiError ¶
type UpdateOrderResponseMultiError []error
UpdateOrderResponseMultiError is an error wrapping multiple validation errors returned by UpdateOrderResponse.ValidateAll() if the designated constraints aren't met.
func (UpdateOrderResponseMultiError) AllErrors ¶
func (m UpdateOrderResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateOrderResponseMultiError) Error ¶
func (m UpdateOrderResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateOrderResponseValidationError ¶
type UpdateOrderResponseValidationError struct {
// contains filtered or unexported fields
}
UpdateOrderResponseValidationError is the validation error returned by UpdateOrderResponse.Validate if the designated constraints aren't met.
func (UpdateOrderResponseValidationError) Cause ¶
func (e UpdateOrderResponseValidationError) Cause() error
Cause function returns cause value.
func (UpdateOrderResponseValidationError) Error ¶
func (e UpdateOrderResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateOrderResponseValidationError) ErrorName ¶
func (e UpdateOrderResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateOrderResponseValidationError) Field ¶
func (e UpdateOrderResponseValidationError) Field() string
Field function returns field value.
func (UpdateOrderResponseValidationError) Key ¶
func (e UpdateOrderResponseValidationError) Key() bool
Key function returns key value.
func (UpdateOrderResponseValidationError) Reason ¶
func (e UpdateOrderResponseValidationError) Reason() string
Reason function returns reason value.