order

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package order is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

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

Cause function returns cause value.

func (CreateOrderRequestValidationError) Error added in v0.7.2

Error satisfies the builtin error interface

func (CreateOrderRequestValidationError) ErrorName added in v0.7.2

ErrorName returns error name.

func (CreateOrderRequestValidationError) Field added in v0.7.2

Field function returns field value.

func (CreateOrderRequestValidationError) Key added in v0.7.2

Key function returns key value.

func (CreateOrderRequestValidationError) Reason added in v0.7.2

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

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

Cause function returns cause value.

func (CreateOrderResponseValidationError) Error added in v0.7.2

Error satisfies the builtin error interface

func (CreateOrderResponseValidationError) ErrorName added in v0.7.2

ErrorName returns error name.

func (CreateOrderResponseValidationError) Field added in v0.7.2

Field function returns field value.

func (CreateOrderResponseValidationError) Key added in v0.7.2

Key function returns key value.

func (CreateOrderResponseValidationError) Reason added in v0.7.2

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

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

Cause function returns cause value.

func (DeleteOrderRequestValidationError) Error added in v0.7.2

Error satisfies the builtin error interface

func (DeleteOrderRequestValidationError) ErrorName added in v0.7.2

ErrorName returns error name.

func (DeleteOrderRequestValidationError) Field added in v0.7.2

Field function returns field value.

func (DeleteOrderRequestValidationError) Key added in v0.7.2

Key function returns key value.

func (DeleteOrderRequestValidationError) Reason added in v0.7.2

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

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

Cause function returns cause value.

func (GetOrderRequestValidationError) Error added in v0.7.2

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

Field function returns field value.

func (GetOrderRequestValidationError) Key added in v0.7.2

Key function returns key value.

func (GetOrderRequestValidationError) Reason added in v0.7.2

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

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

Cause function returns cause value.

func (GetOrderResponseValidationError) Error added in v0.7.2

Error satisfies the builtin error interface

func (GetOrderResponseValidationError) ErrorName added in v0.7.2

ErrorName returns error name.

func (GetOrderResponseValidationError) Field added in v0.7.2

Field function returns field value.

func (GetOrderResponseValidationError) Key added in v0.7.2

Key function returns key value.

func (GetOrderResponseValidationError) Reason added in v0.7.2

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

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

Cause function returns cause value.

func (ListOrdersRequestValidationError) Error added in v0.7.2

Error satisfies the builtin error interface

func (ListOrdersRequestValidationError) ErrorName added in v0.7.2

ErrorName returns error name.

func (ListOrdersRequestValidationError) Field added in v0.7.2

Field function returns field value.

func (ListOrdersRequestValidationError) Key added in v0.7.2

Key function returns key value.

func (ListOrdersRequestValidationError) Reason added in v0.7.2

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

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

Cause function returns cause value.

func (ListOrdersResponseValidationError) Error added in v0.7.2

Error satisfies the builtin error interface

func (ListOrdersResponseValidationError) ErrorName added in v0.7.2

ErrorName returns error name.

func (ListOrdersResponseValidationError) Field added in v0.7.2

Field function returns field value.

func (ListOrdersResponseValidationError) Key added in v0.7.2

Key function returns key value.

func (ListOrdersResponseValidationError) Reason added in v0.7.2

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) Descriptor() ([]byte, []int)

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetCreateTime added in v0.5.2

func (x *Order) GetCreateTime() *timestamppb.Timestamp

func (*Order) GetId

func (x *Order) GetId() int64

func (*Order) GetName

func (x *Order) GetName() string

func (*Order) GetPrice

func (x *Order) GetPrice() float32

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

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

func (*Order) Validate added in v0.7.2

func (m *Order) Validate() error

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

func (m *Order) ValidateAll() error

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.

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) DeleteOrder added in v0.7.2

func (UnimplementedOrderServiceServer) GetOrder

func (UnimplementedOrderServiceServer) ListOrders

func (UnimplementedOrderServiceServer) UpdateOrder

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

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

Cause function returns cause value.

func (UpdateOrderRequestValidationError) Error added in v0.7.2

Error satisfies the builtin error interface

func (UpdateOrderRequestValidationError) ErrorName added in v0.7.2

ErrorName returns error name.

func (UpdateOrderRequestValidationError) Field added in v0.7.2

Field function returns field value.

func (UpdateOrderRequestValidationError) Key added in v0.7.2

Key function returns key value.

func (UpdateOrderRequestValidationError) Reason added in v0.7.2

Reason function returns reason value.

Jump to

Keyboard shortcuts

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