Documentation ¶
Overview ¶
Package example is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterExampleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterExampleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExampleServiceClient) error
- func RegisterExampleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterExampleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExampleServiceServer) error
- func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetExample() *Example
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- func (m *CreateRequest) Validate() error
- func (m *CreateRequest) ValidateAll() error
- type CreateRequestMultiError
- type CreateRequestValidationError
- func (e CreateRequestValidationError) Cause() error
- func (e CreateRequestValidationError) Error() string
- func (e CreateRequestValidationError) ErrorName() string
- func (e CreateRequestValidationError) Field() string
- func (e CreateRequestValidationError) Key() bool
- func (e CreateRequestValidationError) Reason() string
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateResponse) GetRequestId() string
- func (x *CreateResponse) GetStatus() *status.Status
- func (*CreateResponse) ProtoMessage()
- func (x *CreateResponse) ProtoReflect() protoreflect.Message
- func (x *CreateResponse) Reset()
- func (x *CreateResponse) String() string
- func (m *CreateResponse) Validate() error
- func (m *CreateResponse) ValidateAll() error
- type CreateResponseMultiError
- type CreateResponseValidationError
- func (e CreateResponseValidationError) Cause() error
- func (e CreateResponseValidationError) Error() string
- func (e CreateResponseValidationError) ErrorName() string
- func (e CreateResponseValidationError) Field() string
- func (e CreateResponseValidationError) Key() bool
- func (e CreateResponseValidationError) Reason() string
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetId() string
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- func (m *DeleteRequest) Validate() error
- func (m *DeleteRequest) ValidateAll() error
- type DeleteRequestMultiError
- type DeleteRequestValidationError
- func (e DeleteRequestValidationError) Cause() error
- func (e DeleteRequestValidationError) Error() string
- func (e DeleteRequestValidationError) ErrorName() string
- func (e DeleteRequestValidationError) Field() string
- func (e DeleteRequestValidationError) Key() bool
- func (e DeleteRequestValidationError) Reason() string
- type DeleteResponse
- func (*DeleteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteResponse) GetRequestId() string
- func (x *DeleteResponse) GetStatus() *status.Status
- func (*DeleteResponse) ProtoMessage()
- func (x *DeleteResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteResponse) Reset()
- func (x *DeleteResponse) String() string
- func (m *DeleteResponse) Validate() error
- func (m *DeleteResponse) ValidateAll() error
- type DeleteResponseMultiError
- type DeleteResponseValidationError
- func (e DeleteResponseValidationError) Cause() error
- func (e DeleteResponseValidationError) Error() string
- func (e DeleteResponseValidationError) ErrorName() string
- func (e DeleteResponseValidationError) Field() string
- func (e DeleteResponseValidationError) Key() bool
- func (e DeleteResponseValidationError) Reason() string
- type Example
- func (*Example) Descriptor() ([]byte, []int)deprecated
- func (x *Example) GetCreatedAt() *timestamppb.Timestamp
- func (x *Example) GetDescription() string
- func (x *Example) GetId() string
- func (x *Example) GetName() string
- func (x *Example) GetType() enumeration.ExampleType
- func (x *Example) GetUpdatedAt() *timestamppb.Timestamp
- func (*Example) ProtoMessage()
- func (x *Example) ProtoReflect() protoreflect.Message
- func (x *Example) Reset()
- func (x *Example) String() string
- func (m *Example) Validate() error
- func (m *Example) ValidateAll() error
- type ExampleMultiError
- type ExampleServiceClient
- type ExampleServiceServer
- type ExampleValidationError
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetId() string
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- func (m *GetRequest) Validate() error
- func (m *GetRequest) ValidateAll() error
- type GetRequestMultiError
- type GetRequestValidationError
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetExample() *Example
- func (x *GetResponse) GetRequestId() string
- func (x *GetResponse) GetStatus() *status.Status
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- func (m *GetResponse) Validate() error
- func (m *GetResponse) ValidateAll() error
- type GetResponseMultiError
- type GetResponseValidationError
- func (e GetResponseValidationError) Cause() error
- func (e GetResponseValidationError) Error() string
- func (e GetResponseValidationError) ErrorName() string
- func (e GetResponseValidationError) Field() string
- func (e GetResponseValidationError) Key() bool
- func (e GetResponseValidationError) Reason() string
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetId() string
- func (x *ListRequest) GetName() string
- func (x *ListRequest) GetPaging() *paging.Paging
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (m *ListRequest) Validate() error
- func (m *ListRequest) ValidateAll() error
- type ListRequestMultiError
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetExamples() []*Example
- func (x *ListResponse) GetPaging() *paging.Paging
- func (x *ListResponse) GetRequestId() string
- func (x *ListResponse) GetStatus() *status.Status
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- func (m *ListResponse) Validate() error
- func (m *ListResponse) ValidateAll() error
- type ListResponseMultiError
- type ListResponseValidationError
- func (e ListResponseValidationError) Cause() error
- func (e ListResponseValidationError) Error() string
- func (e ListResponseValidationError) ErrorName() string
- func (e ListResponseValidationError) Field() string
- func (e ListResponseValidationError) Key() bool
- func (e ListResponseValidationError) Reason() string
- type TestCustomHttpRequest
- func (*TestCustomHttpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TestCustomHttpRequest) GetCode() string
- func (*TestCustomHttpRequest) ProtoMessage()
- func (x *TestCustomHttpRequest) ProtoReflect() protoreflect.Message
- func (x *TestCustomHttpRequest) Reset()
- func (x *TestCustomHttpRequest) String() string
- func (m *TestCustomHttpRequest) Validate() error
- func (m *TestCustomHttpRequest) ValidateAll() error
- type TestCustomHttpRequestMultiError
- type TestCustomHttpRequestValidationError
- func (e TestCustomHttpRequestValidationError) Cause() error
- func (e TestCustomHttpRequestValidationError) Error() string
- func (e TestCustomHttpRequestValidationError) ErrorName() string
- func (e TestCustomHttpRequestValidationError) Field() string
- func (e TestCustomHttpRequestValidationError) Key() bool
- func (e TestCustomHttpRequestValidationError) Reason() string
- type TestErrorRequest
- func (*TestErrorRequest) Descriptor() ([]byte, []int)deprecated
- func (*TestErrorRequest) ProtoMessage()
- func (x *TestErrorRequest) ProtoReflect() protoreflect.Message
- func (x *TestErrorRequest) Reset()
- func (x *TestErrorRequest) String() string
- func (m *TestErrorRequest) Validate() error
- func (m *TestErrorRequest) ValidateAll() error
- type TestErrorRequestMultiError
- type TestErrorRequestValidationError
- func (e TestErrorRequestValidationError) Cause() error
- func (e TestErrorRequestValidationError) Error() string
- func (e TestErrorRequestValidationError) ErrorName() string
- func (e TestErrorRequestValidationError) Field() string
- func (e TestErrorRequestValidationError) Key() bool
- func (e TestErrorRequestValidationError) Reason() string
- type TestErrorResponse
- func (*TestErrorResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TestErrorResponse) GetExample() *Example
- func (x *TestErrorResponse) GetRequestId() string
- func (x *TestErrorResponse) GetStatus() *status.Status
- func (*TestErrorResponse) ProtoMessage()
- func (x *TestErrorResponse) ProtoReflect() protoreflect.Message
- func (x *TestErrorResponse) Reset()
- func (x *TestErrorResponse) String() string
- func (m *TestErrorResponse) Validate() error
- func (m *TestErrorResponse) ValidateAll() error
- type TestErrorResponseMultiError
- type TestErrorResponseValidationError
- func (e TestErrorResponseValidationError) Cause() error
- func (e TestErrorResponseValidationError) Error() string
- func (e TestErrorResponseValidationError) ErrorName() string
- func (e TestErrorResponseValidationError) Field() string
- func (e TestErrorResponseValidationError) Key() bool
- func (e TestErrorResponseValidationError) Reason() string
- type UnimplementedExampleServiceServer
- func (UnimplementedExampleServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedExampleServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedExampleServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedExampleServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedExampleServiceServer) TestCustomHttp(context.Context, *TestCustomHttpRequest) (*emptypb.Empty, error)
- func (UnimplementedExampleServiceServer) TestError(context.Context, *TestErrorRequest) (*TestErrorResponse, error)
- func (UnimplementedExampleServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeExampleServiceServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetExample() *Example
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- func (m *UpdateRequest) Validate() error
- func (m *UpdateRequest) ValidateAll() error
- type UpdateRequestMultiError
- type UpdateRequestValidationError
- func (e UpdateRequestValidationError) Cause() error
- func (e UpdateRequestValidationError) Error() string
- func (e UpdateRequestValidationError) ErrorName() string
- func (e UpdateRequestValidationError) Field() string
- func (e UpdateRequestValidationError) Key() bool
- func (e UpdateRequestValidationError) Reason() string
- type UpdateResponse
- func (*UpdateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateResponse) GetRequestId() string
- func (x *UpdateResponse) GetStatus() *status.Status
- func (*UpdateResponse) ProtoMessage()
- func (x *UpdateResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateResponse) Reset()
- func (x *UpdateResponse) String() string
- func (m *UpdateResponse) Validate() error
- func (m *UpdateResponse) ValidateAll() error
- type UpdateResponseMultiError
- type UpdateResponseValidationError
- func (e UpdateResponseValidationError) Cause() error
- func (e UpdateResponseValidationError) Error() string
- func (e UpdateResponseValidationError) ErrorName() string
- func (e UpdateResponseValidationError) Field() string
- func (e UpdateResponseValidationError) Key() bool
- func (e UpdateResponseValidationError) Reason() string
Constants ¶
const ( ExampleService_List_FullMethodName = "/flamefatex.grpc_gateway_example.api.v1.example.ExampleService/List" ExampleService_Get_FullMethodName = "/flamefatex.grpc_gateway_example.api.v1.example.ExampleService/Get" ExampleService_Create_FullMethodName = "/flamefatex.grpc_gateway_example.api.v1.example.ExampleService/Create" ExampleService_Update_FullMethodName = "/flamefatex.grpc_gateway_example.api.v1.example.ExampleService/Update" ExampleService_Delete_FullMethodName = "/flamefatex.grpc_gateway_example.api.v1.example.ExampleService/Delete" ExampleService_TestCustomHttp_FullMethodName = "/flamefatex.grpc_gateway_example.api.v1.example.ExampleService/TestCustomHttp" ExampleService_TestError_FullMethodName = "/flamefatex.grpc_gateway_example.api.v1.example.ExampleService/TestError" )
Variables ¶
var ExampleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "flamefatex.grpc_gateway_example.api.v1.example.ExampleService", HandlerType: (*ExampleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _ExampleService_List_Handler, }, { MethodName: "Get", Handler: _ExampleService_Get_Handler, }, { MethodName: "Create", Handler: _ExampleService_Create_Handler, }, { MethodName: "Update", Handler: _ExampleService_Update_Handler, }, { MethodName: "Delete", Handler: _ExampleService_Delete_Handler, }, { MethodName: "TestCustomHttp", Handler: _ExampleService_TestCustomHttp_Handler, }, { MethodName: "TestError", Handler: _ExampleService_TestError_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/example/example.proto", }
ExampleService_ServiceDesc is the grpc.ServiceDesc for ExampleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_v1_example_example_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServiceHandler ¶
func RegisterExampleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterExampleServiceHandler registers the http handlers for service ExampleService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterExampleServiceHandlerClient ¶
func RegisterExampleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExampleServiceClient) error
RegisterExampleServiceHandlerClient registers the http handlers for service ExampleService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExampleServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExampleServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ExampleServiceClient" to call the correct interceptors.
func RegisterExampleServiceHandlerFromEndpoint ¶
func RegisterExampleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterExampleServiceHandlerFromEndpoint is same as RegisterExampleServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterExampleServiceHandlerServer ¶
func RegisterExampleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExampleServiceServer) error
RegisterExampleServiceHandlerServer registers the http handlers for service ExampleService to "mux". UnaryRPC :call ExampleServiceServer 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 RegisterExampleServiceHandlerFromEndpoint instead.
func RegisterExampleServiceServer ¶
func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { // 示例 Example *Example `protobuf:"bytes,1,opt,name=example,proto3" json:"example,omitempty"` // contains filtered or unexported fields }
CreateRequest 创建示例请求
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetExample ¶
func (x *CreateRequest) GetExample() *Example
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
func (*CreateRequest) Validate ¶
func (m *CreateRequest) Validate() error
Validate checks the field values on CreateRequest 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 (*CreateRequest) ValidateAll ¶
func (m *CreateRequest) ValidateAll() error
ValidateAll checks the field values on CreateRequest 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 CreateRequestMultiError, or nil if none found.
type CreateRequestMultiError ¶
type CreateRequestMultiError []error
CreateRequestMultiError is an error wrapping multiple validation errors returned by CreateRequest.ValidateAll() if the designated constraints aren't met.
func (CreateRequestMultiError) AllErrors ¶
func (m CreateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateRequestMultiError) Error ¶
func (m CreateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateRequestValidationError ¶
type CreateRequestValidationError struct {
// contains filtered or unexported fields
}
CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.
func (CreateRequestValidationError) Cause ¶
func (e CreateRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateRequestValidationError) Error ¶
func (e CreateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateRequestValidationError) ErrorName ¶
func (e CreateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateRequestValidationError) Field ¶
func (e CreateRequestValidationError) Field() string
Field function returns field value.
func (CreateRequestValidationError) Key ¶
func (e CreateRequestValidationError) Key() bool
Key function returns key value.
func (CreateRequestValidationError) Reason ¶
func (e CreateRequestValidationError) Reason() string
Reason function returns reason value.
type CreateResponse ¶
type CreateResponse struct { // 请求id RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 请求状态 Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
CreateResponse 创建示例响应
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetRequestId ¶
func (x *CreateResponse) GetRequestId() string
func (*CreateResponse) GetStatus ¶
func (x *CreateResponse) GetStatus() *status.Status
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
func (*CreateResponse) Validate ¶
func (m *CreateResponse) Validate() error
Validate checks the field values on CreateResponse 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 (*CreateResponse) ValidateAll ¶
func (m *CreateResponse) ValidateAll() error
ValidateAll checks the field values on CreateResponse 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 CreateResponseMultiError, or nil if none found.
type CreateResponseMultiError ¶
type CreateResponseMultiError []error
CreateResponseMultiError is an error wrapping multiple validation errors returned by CreateResponse.ValidateAll() if the designated constraints aren't met.
func (CreateResponseMultiError) AllErrors ¶
func (m CreateResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateResponseMultiError) Error ¶
func (m CreateResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateResponseValidationError ¶
type CreateResponseValidationError struct {
// contains filtered or unexported fields
}
CreateResponseValidationError is the validation error returned by CreateResponse.Validate if the designated constraints aren't met.
func (CreateResponseValidationError) Cause ¶
func (e CreateResponseValidationError) Cause() error
Cause function returns cause value.
func (CreateResponseValidationError) Error ¶
func (e CreateResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreateResponseValidationError) ErrorName ¶
func (e CreateResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreateResponseValidationError) Field ¶
func (e CreateResponseValidationError) Field() string
Field function returns field value.
func (CreateResponseValidationError) Key ¶
func (e CreateResponseValidationError) Key() bool
Key function returns key value.
func (CreateResponseValidationError) Reason ¶
func (e CreateResponseValidationError) Reason() string
Reason function returns reason value.
type DeleteRequest ¶
type DeleteRequest struct { // id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
DeleteRequest 删除示例请求
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
func (*DeleteRequest) Validate ¶
func (m *DeleteRequest) Validate() error
Validate checks the field values on DeleteRequest 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 (*DeleteRequest) ValidateAll ¶
func (m *DeleteRequest) ValidateAll() error
ValidateAll checks the field values on DeleteRequest 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 DeleteRequestMultiError, or nil if none found.
type DeleteRequestMultiError ¶
type DeleteRequestMultiError []error
DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteRequestMultiError) AllErrors ¶
func (m DeleteRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteRequestMultiError) Error ¶
func (m DeleteRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteRequestValidationError ¶
type DeleteRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.
func (DeleteRequestValidationError) Cause ¶
func (e DeleteRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteRequestValidationError) Error ¶
func (e DeleteRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteRequestValidationError) ErrorName ¶
func (e DeleteRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteRequestValidationError) Field ¶
func (e DeleteRequestValidationError) Field() string
Field function returns field value.
func (DeleteRequestValidationError) Key ¶
func (e DeleteRequestValidationError) Key() bool
Key function returns key value.
func (DeleteRequestValidationError) Reason ¶
func (e DeleteRequestValidationError) Reason() string
Reason function returns reason value.
type DeleteResponse ¶
type DeleteResponse struct { // 请求id RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 请求状态 Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
DeleteResponse 删除示例响应
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) GetRequestId ¶
func (x *DeleteResponse) GetRequestId() string
func (*DeleteResponse) GetStatus ¶
func (x *DeleteResponse) GetStatus() *status.Status
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
func (*DeleteResponse) Validate ¶
func (m *DeleteResponse) Validate() error
Validate checks the field values on DeleteResponse 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 (*DeleteResponse) ValidateAll ¶
func (m *DeleteResponse) ValidateAll() error
ValidateAll checks the field values on DeleteResponse 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 DeleteResponseMultiError, or nil if none found.
type DeleteResponseMultiError ¶
type DeleteResponseMultiError []error
DeleteResponseMultiError is an error wrapping multiple validation errors returned by DeleteResponse.ValidateAll() if the designated constraints aren't met.
func (DeleteResponseMultiError) AllErrors ¶
func (m DeleteResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteResponseMultiError) Error ¶
func (m DeleteResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteResponseValidationError ¶
type DeleteResponseValidationError struct {
// contains filtered or unexported fields
}
DeleteResponseValidationError is the validation error returned by DeleteResponse.Validate if the designated constraints aren't met.
func (DeleteResponseValidationError) Cause ¶
func (e DeleteResponseValidationError) Cause() error
Cause function returns cause value.
func (DeleteResponseValidationError) Error ¶
func (e DeleteResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteResponseValidationError) ErrorName ¶
func (e DeleteResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteResponseValidationError) Field ¶
func (e DeleteResponseValidationError) Field() string
Field function returns field value.
func (DeleteResponseValidationError) Key ¶
func (e DeleteResponseValidationError) Key() bool
Key function returns key value.
func (DeleteResponseValidationError) Reason ¶
func (e DeleteResponseValidationError) Reason() string
Reason function returns reason value.
type Example ¶
type Example struct { // id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 类型 Type enumeration.ExampleType `protobuf:"varint,3,opt,name=type,proto3,enum=flamefatex.grpc_gateway_example.enumeration.ExampleType" json:"type,omitempty"` // 描述 Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 创建时间 CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 更新时间 UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
Example 示例
func (*Example) Descriptor
deprecated
func (*Example) GetCreatedAt ¶
func (x *Example) GetCreatedAt() *timestamppb.Timestamp
func (*Example) GetDescription ¶
func (*Example) GetType ¶
func (x *Example) GetType() enumeration.ExampleType
func (*Example) GetUpdatedAt ¶
func (x *Example) GetUpdatedAt() *timestamppb.Timestamp
func (*Example) ProtoMessage ¶
func (*Example) ProtoMessage()
func (*Example) ProtoReflect ¶
func (x *Example) ProtoReflect() protoreflect.Message
func (*Example) Validate ¶
Validate checks the field values on Example 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 (*Example) ValidateAll ¶
ValidateAll checks the field values on Example 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 ExampleMultiError, or nil if none found.
type ExampleMultiError ¶
type ExampleMultiError []error
ExampleMultiError is an error wrapping multiple validation errors returned by Example.ValidateAll() if the designated constraints aren't met.
func (ExampleMultiError) AllErrors ¶
func (m ExampleMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExampleMultiError) Error ¶
func (m ExampleMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExampleServiceClient ¶
type ExampleServiceClient interface { // List 查询示例列表 List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // Get 查询单个示例 Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) // Create 创建示例 Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // Update 更新示例 Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) // Delete 删除示例 Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) // TestCustomHttp 测试自定义http TestCustomHttp(ctx context.Context, in *TestCustomHttpRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // TestError 测试错误 TestError(ctx context.Context, in *TestErrorRequest, opts ...grpc.CallOption) (*TestErrorResponse, error) }
ExampleServiceClient is the client API for ExampleService 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 NewExampleServiceClient ¶
func NewExampleServiceClient(cc grpc.ClientConnInterface) ExampleServiceClient
type ExampleServiceServer ¶
type ExampleServiceServer interface { // List 查询示例列表 List(context.Context, *ListRequest) (*ListResponse, error) // Get 查询单个示例 Get(context.Context, *GetRequest) (*GetResponse, error) // Create 创建示例 Create(context.Context, *CreateRequest) (*CreateResponse, error) // Update 更新示例 Update(context.Context, *UpdateRequest) (*UpdateResponse, error) // Delete 删除示例 Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) // TestCustomHttp 测试自定义http TestCustomHttp(context.Context, *TestCustomHttpRequest) (*emptypb.Empty, error) // TestError 测试错误 TestError(context.Context, *TestErrorRequest) (*TestErrorResponse, error) // contains filtered or unexported methods }
ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility
type ExampleValidationError ¶
type ExampleValidationError struct {
// contains filtered or unexported fields
}
ExampleValidationError is the validation error returned by Example.Validate if the designated constraints aren't met.
func (ExampleValidationError) Cause ¶
func (e ExampleValidationError) Cause() error
Cause function returns cause value.
func (ExampleValidationError) Error ¶
func (e ExampleValidationError) Error() string
Error satisfies the builtin error interface
func (ExampleValidationError) ErrorName ¶
func (e ExampleValidationError) ErrorName() string
ErrorName returns error name.
func (ExampleValidationError) Field ¶
func (e ExampleValidationError) Field() string
Field function returns field value.
func (ExampleValidationError) Key ¶
func (e ExampleValidationError) Key() bool
Key function returns key value.
func (ExampleValidationError) Reason ¶
func (e ExampleValidationError) Reason() string
Reason function returns reason value.
type GetRequest ¶
type GetRequest struct { // id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
GetRequest 查询单个示例请求
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
func (*GetRequest) Validate ¶
func (m *GetRequest) Validate() error
Validate checks the field values on GetRequest 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 (*GetRequest) ValidateAll ¶
func (m *GetRequest) ValidateAll() error
ValidateAll checks the field values on GetRequest 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 GetRequestMultiError, or nil if none found.
type GetRequestMultiError ¶
type GetRequestMultiError []error
GetRequestMultiError is an error wrapping multiple validation errors returned by GetRequest.ValidateAll() if the designated constraints aren't met.
func (GetRequestMultiError) AllErrors ¶
func (m GetRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetRequestMultiError) Error ¶
func (m GetRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetRequestValidationError ¶
type GetRequestValidationError struct {
// contains filtered or unexported fields
}
GetRequestValidationError is the validation error returned by GetRequest.Validate if the designated constraints aren't met.
func (GetRequestValidationError) Cause ¶
func (e GetRequestValidationError) Cause() error
Cause function returns cause value.
func (GetRequestValidationError) Error ¶
func (e GetRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetRequestValidationError) ErrorName ¶
func (e GetRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetRequestValidationError) Field ¶
func (e GetRequestValidationError) Field() string
Field function returns field value.
func (GetRequestValidationError) Key ¶
func (e GetRequestValidationError) Key() bool
Key function returns key value.
func (GetRequestValidationError) Reason ¶
func (e GetRequestValidationError) Reason() string
Reason function returns reason value.
type GetResponse ¶
type GetResponse struct { // 请求id RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 请求状态 Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // 示例 Example *Example `protobuf:"bytes,3,opt,name=example,proto3" json:"example,omitempty"` // contains filtered or unexported fields }
GetResponse 查询单个示例响应
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetExample ¶
func (x *GetResponse) GetExample() *Example
func (*GetResponse) GetRequestId ¶
func (x *GetResponse) GetRequestId() string
func (*GetResponse) GetStatus ¶
func (x *GetResponse) GetStatus() *status.Status
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
func (*GetResponse) Validate ¶
func (m *GetResponse) Validate() error
Validate checks the field values on GetResponse 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 (*GetResponse) ValidateAll ¶
func (m *GetResponse) ValidateAll() error
ValidateAll checks the field values on GetResponse 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 GetResponseMultiError, or nil if none found.
type GetResponseMultiError ¶
type GetResponseMultiError []error
GetResponseMultiError is an error wrapping multiple validation errors returned by GetResponse.ValidateAll() if the designated constraints aren't met.
func (GetResponseMultiError) AllErrors ¶
func (m GetResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetResponseMultiError) Error ¶
func (m GetResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetResponseValidationError ¶
type GetResponseValidationError struct {
// contains filtered or unexported fields
}
GetResponseValidationError is the validation error returned by GetResponse.Validate if the designated constraints aren't met.
func (GetResponseValidationError) Cause ¶
func (e GetResponseValidationError) Cause() error
Cause function returns cause value.
func (GetResponseValidationError) Error ¶
func (e GetResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetResponseValidationError) ErrorName ¶
func (e GetResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetResponseValidationError) Field ¶
func (e GetResponseValidationError) Field() string
Field function returns field value.
func (GetResponseValidationError) Key ¶
func (e GetResponseValidationError) Key() bool
Key function returns key value.
func (GetResponseValidationError) Reason ¶
func (e GetResponseValidationError) Reason() string
Reason function returns reason value.
type ListRequest ¶
type ListRequest struct { // 分页 Paging *paging.Paging `protobuf:"bytes,1,opt,name=paging,proto3" json:"paging,omitempty"` // id Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // 名称 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
ListRequest 查询示例列表请求
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetId ¶
func (x *ListRequest) GetId() string
func (*ListRequest) GetName ¶
func (x *ListRequest) GetName() string
func (*ListRequest) GetPaging ¶
func (x *ListRequest) GetPaging() *paging.Paging
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest 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 (*ListRequest) ValidateAll ¶
func (m *ListRequest) ValidateAll() error
ValidateAll checks the field values on ListRequest 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 ListRequestMultiError, or nil if none found.
type ListRequestMultiError ¶
type ListRequestMultiError []error
ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.
func (ListRequestMultiError) AllErrors ¶
func (m ListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListRequestMultiError) Error ¶
func (m ListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type ListResponse ¶
type ListResponse struct { // 请求id RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 请求状态 Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // 分页 Paging *paging.Paging `protobuf:"bytes,3,opt,name=paging,proto3" json:"paging,omitempty"` // 示例列表 Examples []*Example `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty"` // contains filtered or unexported fields }
ListResponse 查询示例列表响应
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetExamples ¶
func (x *ListResponse) GetExamples() []*Example
func (*ListResponse) GetPaging ¶
func (x *ListResponse) GetPaging() *paging.Paging
func (*ListResponse) GetRequestId ¶
func (x *ListResponse) GetRequestId() string
func (*ListResponse) GetStatus ¶
func (x *ListResponse) GetStatus() *status.Status
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
func (*ListResponse) Validate ¶
func (m *ListResponse) Validate() error
Validate checks the field values on ListResponse 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 (*ListResponse) ValidateAll ¶
func (m *ListResponse) ValidateAll() error
ValidateAll checks the field values on ListResponse 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 ListResponseMultiError, or nil if none found.
type ListResponseMultiError ¶
type ListResponseMultiError []error
ListResponseMultiError is an error wrapping multiple validation errors returned by ListResponse.ValidateAll() if the designated constraints aren't met.
func (ListResponseMultiError) AllErrors ¶
func (m ListResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListResponseMultiError) Error ¶
func (m ListResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListResponseValidationError ¶
type ListResponseValidationError struct {
// contains filtered or unexported fields
}
ListResponseValidationError is the validation error returned by ListResponse.Validate if the designated constraints aren't met.
func (ListResponseValidationError) Cause ¶
func (e ListResponseValidationError) Cause() error
Cause function returns cause value.
func (ListResponseValidationError) Error ¶
func (e ListResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListResponseValidationError) ErrorName ¶
func (e ListResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListResponseValidationError) Field ¶
func (e ListResponseValidationError) Field() string
Field function returns field value.
func (ListResponseValidationError) Key ¶
func (e ListResponseValidationError) Key() bool
Key function returns key value.
func (ListResponseValidationError) Reason ¶
func (e ListResponseValidationError) Reason() string
Reason function returns reason value.
type TestCustomHttpRequest ¶
type TestCustomHttpRequest struct { // http status code Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
TestCustomHttpRequest 测试自定义http
func (*TestCustomHttpRequest) Descriptor
deprecated
func (*TestCustomHttpRequest) Descriptor() ([]byte, []int)
Deprecated: Use TestCustomHttpRequest.ProtoReflect.Descriptor instead.
func (*TestCustomHttpRequest) GetCode ¶
func (x *TestCustomHttpRequest) GetCode() string
func (*TestCustomHttpRequest) ProtoMessage ¶
func (*TestCustomHttpRequest) ProtoMessage()
func (*TestCustomHttpRequest) ProtoReflect ¶
func (x *TestCustomHttpRequest) ProtoReflect() protoreflect.Message
func (*TestCustomHttpRequest) Reset ¶
func (x *TestCustomHttpRequest) Reset()
func (*TestCustomHttpRequest) String ¶
func (x *TestCustomHttpRequest) String() string
func (*TestCustomHttpRequest) Validate ¶
func (m *TestCustomHttpRequest) Validate() error
Validate checks the field values on TestCustomHttpRequest 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 (*TestCustomHttpRequest) ValidateAll ¶
func (m *TestCustomHttpRequest) ValidateAll() error
ValidateAll checks the field values on TestCustomHttpRequest 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 TestCustomHttpRequestMultiError, or nil if none found.
type TestCustomHttpRequestMultiError ¶
type TestCustomHttpRequestMultiError []error
TestCustomHttpRequestMultiError is an error wrapping multiple validation errors returned by TestCustomHttpRequest.ValidateAll() if the designated constraints aren't met.
func (TestCustomHttpRequestMultiError) AllErrors ¶
func (m TestCustomHttpRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TestCustomHttpRequestMultiError) Error ¶
func (m TestCustomHttpRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TestCustomHttpRequestValidationError ¶
type TestCustomHttpRequestValidationError struct {
// contains filtered or unexported fields
}
TestCustomHttpRequestValidationError is the validation error returned by TestCustomHttpRequest.Validate if the designated constraints aren't met.
func (TestCustomHttpRequestValidationError) Cause ¶
func (e TestCustomHttpRequestValidationError) Cause() error
Cause function returns cause value.
func (TestCustomHttpRequestValidationError) Error ¶
func (e TestCustomHttpRequestValidationError) Error() string
Error satisfies the builtin error interface
func (TestCustomHttpRequestValidationError) ErrorName ¶
func (e TestCustomHttpRequestValidationError) ErrorName() string
ErrorName returns error name.
func (TestCustomHttpRequestValidationError) Field ¶
func (e TestCustomHttpRequestValidationError) Field() string
Field function returns field value.
func (TestCustomHttpRequestValidationError) Key ¶
func (e TestCustomHttpRequestValidationError) Key() bool
Key function returns key value.
func (TestCustomHttpRequestValidationError) Reason ¶
func (e TestCustomHttpRequestValidationError) Reason() string
Reason function returns reason value.
type TestErrorRequest ¶
type TestErrorRequest struct {
// contains filtered or unexported fields
}
TestErrorRequest 测试错误单个示例请求
func (*TestErrorRequest) Descriptor
deprecated
func (*TestErrorRequest) Descriptor() ([]byte, []int)
Deprecated: Use TestErrorRequest.ProtoReflect.Descriptor instead.
func (*TestErrorRequest) ProtoMessage ¶
func (*TestErrorRequest) ProtoMessage()
func (*TestErrorRequest) ProtoReflect ¶
func (x *TestErrorRequest) ProtoReflect() protoreflect.Message
func (*TestErrorRequest) Reset ¶
func (x *TestErrorRequest) Reset()
func (*TestErrorRequest) String ¶
func (x *TestErrorRequest) String() string
func (*TestErrorRequest) Validate ¶
func (m *TestErrorRequest) Validate() error
Validate checks the field values on TestErrorRequest 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 (*TestErrorRequest) ValidateAll ¶
func (m *TestErrorRequest) ValidateAll() error
ValidateAll checks the field values on TestErrorRequest 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 TestErrorRequestMultiError, or nil if none found.
type TestErrorRequestMultiError ¶
type TestErrorRequestMultiError []error
TestErrorRequestMultiError is an error wrapping multiple validation errors returned by TestErrorRequest.ValidateAll() if the designated constraints aren't met.
func (TestErrorRequestMultiError) AllErrors ¶
func (m TestErrorRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TestErrorRequestMultiError) Error ¶
func (m TestErrorRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TestErrorRequestValidationError ¶
type TestErrorRequestValidationError struct {
// contains filtered or unexported fields
}
TestErrorRequestValidationError is the validation error returned by TestErrorRequest.Validate if the designated constraints aren't met.
func (TestErrorRequestValidationError) Cause ¶
func (e TestErrorRequestValidationError) Cause() error
Cause function returns cause value.
func (TestErrorRequestValidationError) Error ¶
func (e TestErrorRequestValidationError) Error() string
Error satisfies the builtin error interface
func (TestErrorRequestValidationError) ErrorName ¶
func (e TestErrorRequestValidationError) ErrorName() string
ErrorName returns error name.
func (TestErrorRequestValidationError) Field ¶
func (e TestErrorRequestValidationError) Field() string
Field function returns field value.
func (TestErrorRequestValidationError) Key ¶
func (e TestErrorRequestValidationError) Key() bool
Key function returns key value.
func (TestErrorRequestValidationError) Reason ¶
func (e TestErrorRequestValidationError) Reason() string
Reason function returns reason value.
type TestErrorResponse ¶
type TestErrorResponse struct { // 请求id RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 请求状态 Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // 示例 Example *Example `protobuf:"bytes,3,opt,name=example,proto3" json:"example,omitempty"` // contains filtered or unexported fields }
TestErrorResponse 测试错误单个示例响应
func (*TestErrorResponse) Descriptor
deprecated
func (*TestErrorResponse) Descriptor() ([]byte, []int)
Deprecated: Use TestErrorResponse.ProtoReflect.Descriptor instead.
func (*TestErrorResponse) GetExample ¶
func (x *TestErrorResponse) GetExample() *Example
func (*TestErrorResponse) GetRequestId ¶
func (x *TestErrorResponse) GetRequestId() string
func (*TestErrorResponse) GetStatus ¶
func (x *TestErrorResponse) GetStatus() *status.Status
func (*TestErrorResponse) ProtoMessage ¶
func (*TestErrorResponse) ProtoMessage()
func (*TestErrorResponse) ProtoReflect ¶
func (x *TestErrorResponse) ProtoReflect() protoreflect.Message
func (*TestErrorResponse) Reset ¶
func (x *TestErrorResponse) Reset()
func (*TestErrorResponse) String ¶
func (x *TestErrorResponse) String() string
func (*TestErrorResponse) Validate ¶
func (m *TestErrorResponse) Validate() error
Validate checks the field values on TestErrorResponse 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 (*TestErrorResponse) ValidateAll ¶
func (m *TestErrorResponse) ValidateAll() error
ValidateAll checks the field values on TestErrorResponse 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 TestErrorResponseMultiError, or nil if none found.
type TestErrorResponseMultiError ¶
type TestErrorResponseMultiError []error
TestErrorResponseMultiError is an error wrapping multiple validation errors returned by TestErrorResponse.ValidateAll() if the designated constraints aren't met.
func (TestErrorResponseMultiError) AllErrors ¶
func (m TestErrorResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TestErrorResponseMultiError) Error ¶
func (m TestErrorResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TestErrorResponseValidationError ¶
type TestErrorResponseValidationError struct {
// contains filtered or unexported fields
}
TestErrorResponseValidationError is the validation error returned by TestErrorResponse.Validate if the designated constraints aren't met.
func (TestErrorResponseValidationError) Cause ¶
func (e TestErrorResponseValidationError) Cause() error
Cause function returns cause value.
func (TestErrorResponseValidationError) Error ¶
func (e TestErrorResponseValidationError) Error() string
Error satisfies the builtin error interface
func (TestErrorResponseValidationError) ErrorName ¶
func (e TestErrorResponseValidationError) ErrorName() string
ErrorName returns error name.
func (TestErrorResponseValidationError) Field ¶
func (e TestErrorResponseValidationError) Field() string
Field function returns field value.
func (TestErrorResponseValidationError) Key ¶
func (e TestErrorResponseValidationError) Key() bool
Key function returns key value.
func (TestErrorResponseValidationError) Reason ¶
func (e TestErrorResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedExampleServiceServer ¶
type UnimplementedExampleServiceServer struct { }
UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedExampleServiceServer) Create ¶
func (UnimplementedExampleServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedExampleServiceServer) Delete ¶
func (UnimplementedExampleServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedExampleServiceServer) Get ¶
func (UnimplementedExampleServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedExampleServiceServer) List ¶
func (UnimplementedExampleServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedExampleServiceServer) TestCustomHttp ¶
func (UnimplementedExampleServiceServer) TestCustomHttp(context.Context, *TestCustomHttpRequest) (*emptypb.Empty, error)
func (UnimplementedExampleServiceServer) TestError ¶
func (UnimplementedExampleServiceServer) TestError(context.Context, *TestErrorRequest) (*TestErrorResponse, error)
func (UnimplementedExampleServiceServer) Update ¶
func (UnimplementedExampleServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeExampleServiceServer ¶
type UnsafeExampleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServiceServer will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { // 示例 Example *Example `protobuf:"bytes,1,opt,name=example,proto3" json:"example,omitempty"` // contains filtered or unexported fields }
UpdateRequest 更新示例请求
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetExample ¶
func (x *UpdateRequest) GetExample() *Example
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
func (*UpdateRequest) Validate ¶
func (m *UpdateRequest) Validate() error
Validate checks the field values on UpdateRequest 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 (*UpdateRequest) ValidateAll ¶
func (m *UpdateRequest) ValidateAll() error
ValidateAll checks the field values on UpdateRequest 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 UpdateRequestMultiError, or nil if none found.
type UpdateRequestMultiError ¶
type UpdateRequestMultiError []error
UpdateRequestMultiError is an error wrapping multiple validation errors returned by UpdateRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateRequestMultiError) AllErrors ¶
func (m UpdateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateRequestMultiError) Error ¶
func (m UpdateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateRequestValidationError ¶
type UpdateRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.
func (UpdateRequestValidationError) Cause ¶
func (e UpdateRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateRequestValidationError) Error ¶
func (e UpdateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateRequestValidationError) ErrorName ¶
func (e UpdateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateRequestValidationError) Field ¶
func (e UpdateRequestValidationError) Field() string
Field function returns field value.
func (UpdateRequestValidationError) Key ¶
func (e UpdateRequestValidationError) Key() bool
Key function returns key value.
func (UpdateRequestValidationError) Reason ¶
func (e UpdateRequestValidationError) Reason() string
Reason function returns reason value.
type UpdateResponse ¶
type UpdateResponse struct { // 请求id RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 请求状态 Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
UpdateResponse 更新示例响应
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) GetRequestId ¶
func (x *UpdateResponse) GetRequestId() string
func (*UpdateResponse) GetStatus ¶
func (x *UpdateResponse) GetStatus() *status.Status
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string
func (*UpdateResponse) Validate ¶
func (m *UpdateResponse) Validate() error
Validate checks the field values on UpdateResponse 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 (*UpdateResponse) ValidateAll ¶
func (m *UpdateResponse) ValidateAll() error
ValidateAll checks the field values on UpdateResponse 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 UpdateResponseMultiError, or nil if none found.
type UpdateResponseMultiError ¶
type UpdateResponseMultiError []error
UpdateResponseMultiError is an error wrapping multiple validation errors returned by UpdateResponse.ValidateAll() if the designated constraints aren't met.
func (UpdateResponseMultiError) AllErrors ¶
func (m UpdateResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateResponseMultiError) Error ¶
func (m UpdateResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateResponseValidationError ¶
type UpdateResponseValidationError struct {
// contains filtered or unexported fields
}
UpdateResponseValidationError is the validation error returned by UpdateResponse.Validate if the designated constraints aren't met.
func (UpdateResponseValidationError) Cause ¶
func (e UpdateResponseValidationError) Cause() error
Cause function returns cause value.
func (UpdateResponseValidationError) Error ¶
func (e UpdateResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateResponseValidationError) ErrorName ¶
func (e UpdateResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateResponseValidationError) Field ¶
func (e UpdateResponseValidationError) Field() string
Field function returns field value.
func (UpdateResponseValidationError) Key ¶
func (e UpdateResponseValidationError) Key() bool
Key function returns key value.
func (UpdateResponseValidationError) Reason ¶
func (e UpdateResponseValidationError) Reason() string
Reason function returns reason value.