Documentation ¶
Overview ¶
Package order is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterOrderServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOrderServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderServiceClient) error
- func RegisterOrderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOrderServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderServiceServer) error
- func RegisterOrderServiceServer(s *grpc.Server, srv OrderServiceServer)
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetOrder() *Order
- 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) GetOrder() *Order
- 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) GetName() 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 GetOrderRequest
- func (*GetOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderRequest) GetName() 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 ListOrdersRequest
- func (*ListOrdersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrdersRequest) GetPageNumber() int32
- func (x *ListOrdersRequest) GetPageSize() int32
- func (*ListOrdersRequest) ProtoMessage()
- func (x *ListOrdersRequest) ProtoReflect() protoreflect.Message
- func (x *ListOrdersRequest) Reset()
- func (x *ListOrdersRequest) String() string
- func (m *ListOrdersRequest) Validate() error
- func (m *ListOrdersRequest) ValidateAll() error
- type ListOrdersRequestMultiError
- type ListOrdersRequestValidationError
- func (e ListOrdersRequestValidationError) Cause() error
- func (e ListOrdersRequestValidationError) Error() string
- func (e ListOrdersRequestValidationError) ErrorName() string
- func (e ListOrdersRequestValidationError) Field() string
- func (e ListOrdersRequestValidationError) Key() bool
- func (e ListOrdersRequestValidationError) Reason() string
- type ListOrdersResponse
- func (*ListOrdersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrdersResponse) GetCount() int32
- func (x *ListOrdersResponse) GetOrders() []*Order
- func (*ListOrdersResponse) ProtoMessage()
- func (x *ListOrdersResponse) ProtoReflect() protoreflect.Message
- func (x *ListOrdersResponse) Reset()
- func (x *ListOrdersResponse) String() string
- func (m *ListOrdersResponse) Validate() error
- func (m *ListOrdersResponse) ValidateAll() error
- type ListOrdersResponseMultiError
- type ListOrdersResponseValidationError
- func (e ListOrdersResponseValidationError) Cause() error
- func (e ListOrdersResponseValidationError) Error() string
- func (e ListOrdersResponseValidationError) ErrorName() string
- func (e ListOrdersResponseValidationError) Field() string
- func (e ListOrdersResponseValidationError) Key() bool
- func (e ListOrdersResponseValidationError) Reason() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetCreateTime() *timestamppb.Timestamp
- func (x *Order) GetId() int64
- func (x *Order) GetName() string
- func (x *Order) GetPrice() float32
- func (x *Order) GetUpdateTime() *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 OrderServiceClient
- type OrderServiceServer
- type OrderValidationError
- type UnimplementedOrderServiceServer
- func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
- func (UnimplementedOrderServiceServer) DeleteOrder(context.Context, *DeleteOrderRequest) (*emptypb.Empty, error)
- func (UnimplementedOrderServiceServer) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error)
- func (UnimplementedOrderServiceServer) ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, error)
- func (UnimplementedOrderServiceServer) UpdateOrder(context.Context, *UpdateOrderRequest) (*emptypb.Empty, error)
- type UnsafeOrderServiceServer
- type UpdateOrderRequest
- func (*UpdateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateOrderRequest) GetOrder() *Order
- func (x *UpdateOrderRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- 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
Constants ¶
This section is empty.
Variables ¶
var File_idl_order_order_proto protoreflect.FileDescriptor
Functions ¶
func RegisterOrderServiceHandler ¶
func RegisterOrderServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOrderServiceHandler registers the http handlers for service OrderService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOrderServiceHandlerClient ¶
func RegisterOrderServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderServiceClient) error
RegisterOrderServiceHandlerClient registers the http handlers for service OrderService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OrderServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OrderServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OrderServiceClient" to call the correct interceptors.
func RegisterOrderServiceHandlerFromEndpoint ¶
func RegisterOrderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOrderServiceHandlerFromEndpoint is same as RegisterOrderServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOrderServiceHandlerServer ¶
func RegisterOrderServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderServiceServer) error
RegisterOrderServiceHandlerServer registers the http handlers for service OrderService to "mux". UnaryRPC :call OrderServiceServer 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 RegisterOrderServiceHandlerFromEndpoint instead.
func RegisterOrderServiceServer ¶
func RegisterOrderServiceServer(s *grpc.Server, srv OrderServiceServer)
Types ¶
type CreateOrderRequest ¶
type CreateOrderRequest struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetOrder ¶
func (x *CreateOrderRequest) GetOrder() *Order
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (m CreateOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateOrderRequestMultiError) Error ¶ added in v0.7.2
func (m CreateOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateOrderRequestValidationError ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (e CreateOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateOrderRequestValidationError) Error ¶ added in v0.7.2
func (e CreateOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateOrderRequestValidationError) ErrorName ¶ added in v0.7.2
func (e CreateOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateOrderRequestValidationError) Field ¶ added in v0.7.2
func (e CreateOrderRequestValidationError) Field() string
Field function returns field value.
func (CreateOrderRequestValidationError) Key ¶ added in v0.7.2
func (e CreateOrderRequestValidationError) Key() bool
Key function returns key value.
func (CreateOrderRequestValidationError) Reason ¶ added in v0.7.2
func (e CreateOrderRequestValidationError) Reason() string
Reason function returns reason value.
type CreateOrderResponse ¶ added in v0.7.2
type CreateOrderResponse struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderResponse) Descriptor
deprecated
added in
v0.7.2
func (*CreateOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.
func (*CreateOrderResponse) GetOrder ¶ added in v0.7.2
func (x *CreateOrderResponse) GetOrder() *Order
func (*CreateOrderResponse) ProtoMessage ¶ added in v0.7.2
func (*CreateOrderResponse) ProtoMessage()
func (*CreateOrderResponse) ProtoReflect ¶ added in v0.7.2
func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
func (*CreateOrderResponse) Reset ¶ added in v0.7.2
func (x *CreateOrderResponse) Reset()
func (*CreateOrderResponse) String ¶ added in v0.7.2
func (x *CreateOrderResponse) String() string
func (*CreateOrderResponse) Validate ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (m CreateOrderResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateOrderResponseMultiError) Error ¶ added in v0.7.2
func (m CreateOrderResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateOrderResponseValidationError ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (e CreateOrderResponseValidationError) Cause() error
Cause function returns cause value.
func (CreateOrderResponseValidationError) Error ¶ added in v0.7.2
func (e CreateOrderResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreateOrderResponseValidationError) ErrorName ¶ added in v0.7.2
func (e CreateOrderResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreateOrderResponseValidationError) Field ¶ added in v0.7.2
func (e CreateOrderResponseValidationError) Field() string
Field function returns field value.
func (CreateOrderResponseValidationError) Key ¶ added in v0.7.2
func (e CreateOrderResponseValidationError) Key() bool
Key function returns key value.
func (CreateOrderResponseValidationError) Reason ¶ added in v0.7.2
func (e CreateOrderResponseValidationError) Reason() string
Reason function returns reason value.
type DeleteOrderRequest ¶ added in v0.5.2
type DeleteOrderRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*DeleteOrderRequest) Descriptor
deprecated
added in
v0.5.2
func (*DeleteOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOrderRequest.ProtoReflect.Descriptor instead.
func (*DeleteOrderRequest) GetName ¶ added in v0.5.2
func (x *DeleteOrderRequest) GetName() string
func (*DeleteOrderRequest) ProtoMessage ¶ added in v0.5.2
func (*DeleteOrderRequest) ProtoMessage()
func (*DeleteOrderRequest) ProtoReflect ¶ added in v0.5.2
func (x *DeleteOrderRequest) ProtoReflect() protoreflect.Message
func (*DeleteOrderRequest) Reset ¶ added in v0.5.2
func (x *DeleteOrderRequest) Reset()
func (*DeleteOrderRequest) String ¶ added in v0.5.2
func (x *DeleteOrderRequest) String() string
func (*DeleteOrderRequest) Validate ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (m DeleteOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteOrderRequestMultiError) Error ¶ added in v0.7.2
func (m DeleteOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteOrderRequestValidationError ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (e DeleteOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteOrderRequestValidationError) Error ¶ added in v0.7.2
func (e DeleteOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteOrderRequestValidationError) ErrorName ¶ added in v0.7.2
func (e DeleteOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteOrderRequestValidationError) Field ¶ added in v0.7.2
func (e DeleteOrderRequestValidationError) Field() string
Field function returns field value.
func (DeleteOrderRequestValidationError) Key ¶ added in v0.7.2
func (e DeleteOrderRequestValidationError) Key() bool
Key function returns key value.
func (DeleteOrderRequestValidationError) Reason ¶ added in v0.7.2
func (e DeleteOrderRequestValidationError) Reason() string
Reason function returns reason value.
type GetOrderRequest ¶
type GetOrderRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*GetOrderRequest) Descriptor
deprecated
func (*GetOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderRequest.ProtoReflect.Descriptor instead.
func (*GetOrderRequest) GetName ¶
func (x *GetOrderRequest) GetName() 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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (m GetOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetOrderRequestMultiError) Error ¶ added in v0.7.2
func (m GetOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetOrderRequestValidationError ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (e GetOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (GetOrderRequestValidationError) Error ¶ added in v0.7.2
func (e GetOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetOrderRequestValidationError) ErrorName ¶ added in v0.7.2
func (e GetOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetOrderRequestValidationError) Field ¶ added in v0.7.2
func (e GetOrderRequestValidationError) Field() string
Field function returns field value.
func (GetOrderRequestValidationError) Key ¶ added in v0.7.2
func (e GetOrderRequestValidationError) Key() bool
Key function returns key value.
func (GetOrderRequestValidationError) Reason ¶ added in v0.7.2
func (e GetOrderRequestValidationError) Reason() string
Reason function returns reason value.
type GetOrderResponse ¶ added in v0.7.2
type GetOrderResponse struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
func (*GetOrderResponse) Descriptor
deprecated
added in
v0.7.2
func (*GetOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderResponse.ProtoReflect.Descriptor instead.
func (*GetOrderResponse) GetOrder ¶ added in v0.7.2
func (x *GetOrderResponse) GetOrder() *Order
func (*GetOrderResponse) ProtoMessage ¶ added in v0.7.2
func (*GetOrderResponse) ProtoMessage()
func (*GetOrderResponse) ProtoReflect ¶ added in v0.7.2
func (x *GetOrderResponse) ProtoReflect() protoreflect.Message
func (*GetOrderResponse) Reset ¶ added in v0.7.2
func (x *GetOrderResponse) Reset()
func (*GetOrderResponse) String ¶ added in v0.7.2
func (x *GetOrderResponse) String() string
func (*GetOrderResponse) Validate ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (m GetOrderResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetOrderResponseMultiError) Error ¶ added in v0.7.2
func (m GetOrderResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetOrderResponseValidationError ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (e GetOrderResponseValidationError) Cause() error
Cause function returns cause value.
func (GetOrderResponseValidationError) Error ¶ added in v0.7.2
func (e GetOrderResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetOrderResponseValidationError) ErrorName ¶ added in v0.7.2
func (e GetOrderResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetOrderResponseValidationError) Field ¶ added in v0.7.2
func (e GetOrderResponseValidationError) Field() string
Field function returns field value.
func (GetOrderResponseValidationError) Key ¶ added in v0.7.2
func (e GetOrderResponseValidationError) Key() bool
Key function returns key value.
func (GetOrderResponseValidationError) Reason ¶ added in v0.7.2
func (e GetOrderResponseValidationError) Reason() string
Reason function returns reason value.
type ListOrdersRequest ¶
type ListOrdersRequest struct { PageNumber int32 `protobuf:"varint,1,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*ListOrdersRequest) Descriptor
deprecated
func (*ListOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListOrdersRequest.ProtoReflect.Descriptor instead.
func (*ListOrdersRequest) GetPageNumber ¶
func (x *ListOrdersRequest) GetPageNumber() int32
func (*ListOrdersRequest) GetPageSize ¶
func (x *ListOrdersRequest) GetPageSize() int32
func (*ListOrdersRequest) ProtoMessage ¶
func (*ListOrdersRequest) ProtoMessage()
func (*ListOrdersRequest) ProtoReflect ¶
func (x *ListOrdersRequest) ProtoReflect() protoreflect.Message
func (*ListOrdersRequest) Reset ¶
func (x *ListOrdersRequest) Reset()
func (*ListOrdersRequest) String ¶
func (x *ListOrdersRequest) String() string
func (*ListOrdersRequest) Validate ¶ added in v0.7.2
func (m *ListOrdersRequest) Validate() error
Validate checks the field values on ListOrdersRequest 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 (*ListOrdersRequest) ValidateAll ¶ added in v0.7.2
func (m *ListOrdersRequest) ValidateAll() error
ValidateAll checks the field values on ListOrdersRequest 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 ListOrdersRequestMultiError, or nil if none found.
type ListOrdersRequestMultiError ¶ added in v0.7.2
type ListOrdersRequestMultiError []error
ListOrdersRequestMultiError is an error wrapping multiple validation errors returned by ListOrdersRequest.ValidateAll() if the designated constraints aren't met.
func (ListOrdersRequestMultiError) AllErrors ¶ added in v0.7.2
func (m ListOrdersRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListOrdersRequestMultiError) Error ¶ added in v0.7.2
func (m ListOrdersRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListOrdersRequestValidationError ¶ added in v0.7.2
type ListOrdersRequestValidationError struct {
// contains filtered or unexported fields
}
ListOrdersRequestValidationError is the validation error returned by ListOrdersRequest.Validate if the designated constraints aren't met.
func (ListOrdersRequestValidationError) Cause ¶ added in v0.7.2
func (e ListOrdersRequestValidationError) Cause() error
Cause function returns cause value.
func (ListOrdersRequestValidationError) Error ¶ added in v0.7.2
func (e ListOrdersRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListOrdersRequestValidationError) ErrorName ¶ added in v0.7.2
func (e ListOrdersRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListOrdersRequestValidationError) Field ¶ added in v0.7.2
func (e ListOrdersRequestValidationError) Field() string
Field function returns field value.
func (ListOrdersRequestValidationError) Key ¶ added in v0.7.2
func (e ListOrdersRequestValidationError) Key() bool
Key function returns key value.
func (ListOrdersRequestValidationError) Reason ¶ added in v0.7.2
func (e ListOrdersRequestValidationError) Reason() string
Reason function returns reason value.
type ListOrdersResponse ¶
type ListOrdersResponse struct { Orders []*Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*ListOrdersResponse) Descriptor
deprecated
func (*ListOrdersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListOrdersResponse.ProtoReflect.Descriptor instead.
func (*ListOrdersResponse) GetCount ¶
func (x *ListOrdersResponse) GetCount() int32
func (*ListOrdersResponse) GetOrders ¶
func (x *ListOrdersResponse) GetOrders() []*Order
func (*ListOrdersResponse) ProtoMessage ¶
func (*ListOrdersResponse) ProtoMessage()
func (*ListOrdersResponse) ProtoReflect ¶
func (x *ListOrdersResponse) ProtoReflect() protoreflect.Message
func (*ListOrdersResponse) Reset ¶
func (x *ListOrdersResponse) Reset()
func (*ListOrdersResponse) String ¶
func (x *ListOrdersResponse) String() string
func (*ListOrdersResponse) Validate ¶ added in v0.7.2
func (m *ListOrdersResponse) Validate() error
Validate checks the field values on ListOrdersResponse 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 (*ListOrdersResponse) ValidateAll ¶ added in v0.7.2
func (m *ListOrdersResponse) ValidateAll() error
ValidateAll checks the field values on ListOrdersResponse 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 ListOrdersResponseMultiError, or nil if none found.
type ListOrdersResponseMultiError ¶ added in v0.7.2
type ListOrdersResponseMultiError []error
ListOrdersResponseMultiError is an error wrapping multiple validation errors returned by ListOrdersResponse.ValidateAll() if the designated constraints aren't met.
func (ListOrdersResponseMultiError) AllErrors ¶ added in v0.7.2
func (m ListOrdersResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListOrdersResponseMultiError) Error ¶ added in v0.7.2
func (m ListOrdersResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListOrdersResponseValidationError ¶ added in v0.7.2
type ListOrdersResponseValidationError struct {
// contains filtered or unexported fields
}
ListOrdersResponseValidationError is the validation error returned by ListOrdersResponse.Validate if the designated constraints aren't met.
func (ListOrdersResponseValidationError) Cause ¶ added in v0.7.2
func (e ListOrdersResponseValidationError) Cause() error
Cause function returns cause value.
func (ListOrdersResponseValidationError) Error ¶ added in v0.7.2
func (e ListOrdersResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListOrdersResponseValidationError) ErrorName ¶ added in v0.7.2
func (e ListOrdersResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListOrdersResponseValidationError) Field ¶ added in v0.7.2
func (e ListOrdersResponseValidationError) Field() string
Field function returns field value.
func (ListOrdersResponseValidationError) Key ¶ added in v0.7.2
func (e ListOrdersResponseValidationError) Key() bool
Key function returns key value.
func (ListOrdersResponseValidationError) Reason ¶ added in v0.7.2
func (e ListOrdersResponseValidationError) Reason() string
Reason function returns reason value.
type Order ¶
type Order struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetCreateTime ¶ added in v0.5.2
func (x *Order) GetCreateTime() *timestamppb.Timestamp
func (*Order) GetUpdateTime ¶ added in v0.5.2
func (x *Order) GetUpdateTime() *timestamppb.Timestamp
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
func (*Order) Validate ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (m OrderMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OrderMultiError) Error ¶ added in v0.7.2
func (m OrderMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OrderServiceClient ¶
type OrderServiceClient interface { ListOrders(ctx context.Context, in *ListOrdersRequest, opts ...grpc.CallOption) (*ListOrdersResponse, error) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error) UpdateOrder(ctx context.Context, in *UpdateOrderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetOrder(ctx context.Context, in *GetOrderRequest, opts ...grpc.CallOption) (*GetOrderResponse, error) DeleteOrder(ctx context.Context, in *DeleteOrderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
OrderServiceClient is the client API for OrderService 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 NewOrderServiceClient ¶
func NewOrderServiceClient(cc grpc.ClientConnInterface) OrderServiceClient
type OrderServiceServer ¶
type OrderServiceServer interface { ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, error) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error) UpdateOrder(context.Context, *UpdateOrderRequest) (*emptypb.Empty, error) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error) DeleteOrder(context.Context, *DeleteOrderRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
OrderServiceServer is the server API for OrderService service. All implementations must embed UnimplementedOrderServiceServer for forward compatibility
type OrderValidationError ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (e OrderValidationError) Cause() error
Cause function returns cause value.
func (OrderValidationError) Error ¶ added in v0.7.2
func (e OrderValidationError) Error() string
Error satisfies the builtin error interface
func (OrderValidationError) ErrorName ¶ added in v0.7.2
func (e OrderValidationError) ErrorName() string
ErrorName returns error name.
func (OrderValidationError) Field ¶ added in v0.7.2
func (e OrderValidationError) Field() string
Field function returns field value.
func (OrderValidationError) Key ¶ added in v0.7.2
func (e OrderValidationError) Key() bool
Key function returns key value.
func (OrderValidationError) Reason ¶ added in v0.7.2
func (e OrderValidationError) Reason() string
Reason function returns reason value.
type UnimplementedOrderServiceServer ¶
type UnimplementedOrderServiceServer struct { }
UnimplementedOrderServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOrderServiceServer) CreateOrder ¶
func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
func (UnimplementedOrderServiceServer) DeleteOrder ¶ added in v0.7.2
func (UnimplementedOrderServiceServer) DeleteOrder(context.Context, *DeleteOrderRequest) (*emptypb.Empty, error)
func (UnimplementedOrderServiceServer) GetOrder ¶
func (UnimplementedOrderServiceServer) GetOrder(context.Context, *GetOrderRequest) (*GetOrderResponse, error)
func (UnimplementedOrderServiceServer) ListOrders ¶
func (UnimplementedOrderServiceServer) ListOrders(context.Context, *ListOrdersRequest) (*ListOrdersResponse, error)
func (UnimplementedOrderServiceServer) UpdateOrder ¶
func (UnimplementedOrderServiceServer) UpdateOrder(context.Context, *UpdateOrderRequest) (*emptypb.Empty, error)
type UnsafeOrderServiceServer ¶
type UnsafeOrderServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOrderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderServiceServer will result in compilation errors.
type UpdateOrderRequest ¶
type UpdateOrderRequest struct { Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // contains filtered or unexported fields }
func (*UpdateOrderRequest) Descriptor
deprecated
func (*UpdateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrderRequest.ProtoReflect.Descriptor instead.
func (*UpdateOrderRequest) GetOrder ¶
func (x *UpdateOrderRequest) GetOrder() *Order
func (*UpdateOrderRequest) GetUpdateMask ¶
func (x *UpdateOrderRequest) GetUpdateMask() *fieldmaskpb.FieldMask
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (m UpdateOrderRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateOrderRequestMultiError) Error ¶ added in v0.7.2
func (m UpdateOrderRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateOrderRequestValidationError ¶ added in v0.7.2
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 ¶ added in v0.7.2
func (e UpdateOrderRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateOrderRequestValidationError) Error ¶ added in v0.7.2
func (e UpdateOrderRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateOrderRequestValidationError) ErrorName ¶ added in v0.7.2
func (e UpdateOrderRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateOrderRequestValidationError) Field ¶ added in v0.7.2
func (e UpdateOrderRequestValidationError) Field() string
Field function returns field value.
func (UpdateOrderRequestValidationError) Key ¶ added in v0.7.2
func (e UpdateOrderRequestValidationError) Key() bool
Key function returns key value.
func (UpdateOrderRequestValidationError) Reason ¶ added in v0.7.2
func (e UpdateOrderRequestValidationError) Reason() string
Reason function returns reason value.