Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorBadRequest(format string, args ...interface{}) *errors.Error
- func ErrorRecordAlreadyExists(format string, args ...interface{}) *errors.Error
- func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error
- func ErrorSystemError(format string, args ...interface{}) *errors.Error
- func IsBadRequest(err error) bool
- func IsRecordAlreadyExists(err error) bool
- func IsRecordNotFound(err error) bool
- func IsSystemError(err error) bool
- func RegisterExampleServiceHTTPServer(s *http.Server, srv ExampleServiceHTTPServer)
- func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
- type CreateExampleReq
- func (*CreateExampleReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateExampleReq) GetName() string
- func (x *CreateExampleReq) GetStatus() bool
- func (*CreateExampleReq) ProtoMessage()
- func (x *CreateExampleReq) ProtoReflect() protoreflect.Message
- func (x *CreateExampleReq) Reset()
- func (x *CreateExampleReq) String() string
- func (m *CreateExampleReq) Validate() error
- func (m *CreateExampleReq) ValidateAll() error
- type CreateExampleReqMultiError
- type CreateExampleReqValidationError
- func (e CreateExampleReqValidationError) Cause() error
- func (e CreateExampleReqValidationError) Error() string
- func (e CreateExampleReqValidationError) ErrorName() string
- func (e CreateExampleReqValidationError) Field() string
- func (e CreateExampleReqValidationError) Key() bool
- func (e CreateExampleReqValidationError) Reason() string
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type Example
- func (*Example) Descriptor() ([]byte, []int)deprecated
- func (x *Example) GetCreatedAt() string
- func (x *Example) GetDeletedAt() string
- func (x *Example) GetId() int64
- func (x *Example) GetName() string
- func (x *Example) GetStatus() bool
- func (x *Example) GetUpdatedAt() string
- 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 ExampleIdReq
- func (*ExampleIdReq) Descriptor() ([]byte, []int)deprecated
- func (x *ExampleIdReq) GetId() int64
- func (*ExampleIdReq) ProtoMessage()
- func (x *ExampleIdReq) ProtoReflect() protoreflect.Message
- func (x *ExampleIdReq) Reset()
- func (x *ExampleIdReq) String() string
- func (m *ExampleIdReq) Validate() error
- func (m *ExampleIdReq) ValidateAll() error
- type ExampleIdReqMultiError
- type ExampleIdReqValidationError
- func (e ExampleIdReqValidationError) Cause() error
- func (e ExampleIdReqValidationError) Error() string
- func (e ExampleIdReqValidationError) ErrorName() string
- func (e ExampleIdReqValidationError) Field() string
- func (e ExampleIdReqValidationError) Key() bool
- func (e ExampleIdReqValidationError) Reason() string
- type ExampleMultiError
- type ExampleServiceClient
- type ExampleServiceHTTPClient
- type ExampleServiceHTTPClientImpl
- func (c *ExampleServiceHTTPClientImpl) CreateExample(ctx context.Context, in *CreateExampleReq, opts ...http.CallOption) (*Example, error)
- func (c *ExampleServiceHTTPClientImpl) DeleteExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *ExampleServiceHTTPClientImpl) GetExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*Example, error)
- func (c *ExampleServiceHTTPClientImpl) GetExampleList(ctx context.Context, in *GetExampleListReq, opts ...http.CallOption) (*GetExampleListPageRes, error)
- func (c *ExampleServiceHTTPClientImpl) RecoverExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *ExampleServiceHTTPClientImpl) UpdateExample(ctx context.Context, in *UpdateExampleReq, opts ...http.CallOption) (*emptypb.Empty, error)
- type ExampleServiceHTTPServer
- type ExampleServiceServer
- type ExampleValidationError
- type GetExampleListPageRes
- func (*GetExampleListPageRes) Descriptor() ([]byte, []int)deprecated
- func (x *GetExampleListPageRes) GetList() []*Example
- func (x *GetExampleListPageRes) GetTotal() int64
- func (*GetExampleListPageRes) ProtoMessage()
- func (x *GetExampleListPageRes) ProtoReflect() protoreflect.Message
- func (x *GetExampleListPageRes) Reset()
- func (x *GetExampleListPageRes) String() string
- func (m *GetExampleListPageRes) Validate() error
- func (m *GetExampleListPageRes) ValidateAll() error
- type GetExampleListPageResMultiError
- type GetExampleListPageResValidationError
- func (e GetExampleListPageResValidationError) Cause() error
- func (e GetExampleListPageResValidationError) Error() string
- func (e GetExampleListPageResValidationError) ErrorName() string
- func (e GetExampleListPageResValidationError) Field() string
- func (e GetExampleListPageResValidationError) Key() bool
- func (e GetExampleListPageResValidationError) Reason() string
- type GetExampleListReq
- func (*GetExampleListReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetExampleListReq) GetCreatedAtEnd() string
- func (x *GetExampleListReq) GetCreatedAtStart() string
- func (x *GetExampleListReq) GetIsDeleted() *wrapperspb.BoolValue
- func (x *GetExampleListReq) GetName() string
- func (x *GetExampleListReq) GetPage() int64
- func (x *GetExampleListReq) GetPageSize() int64
- func (x *GetExampleListReq) GetStatus() *wrapperspb.BoolValue
- func (*GetExampleListReq) ProtoMessage()
- func (x *GetExampleListReq) ProtoReflect() protoreflect.Message
- func (x *GetExampleListReq) Reset()
- func (x *GetExampleListReq) String() string
- func (m *GetExampleListReq) Validate() error
- func (m *GetExampleListReq) ValidateAll() error
- type GetExampleListReqMultiError
- type GetExampleListReqValidationError
- func (e GetExampleListReqValidationError) Cause() error
- func (e GetExampleListReqValidationError) Error() string
- func (e GetExampleListReqValidationError) ErrorName() string
- func (e GetExampleListReqValidationError) Field() string
- func (e GetExampleListReqValidationError) Key() bool
- func (e GetExampleListReqValidationError) Reason() string
- type UnimplementedExampleServiceServer
- func (UnimplementedExampleServiceServer) CreateExample(context.Context, *CreateExampleReq) (*Example, error)
- func (UnimplementedExampleServiceServer) DeleteExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
- func (UnimplementedExampleServiceServer) GetExample(context.Context, *ExampleIdReq) (*Example, error)
- func (UnimplementedExampleServiceServer) GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error)
- func (UnimplementedExampleServiceServer) RecoverExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
- func (UnimplementedExampleServiceServer) UpdateExample(context.Context, *UpdateExampleReq) (*emptypb.Empty, error)
- type UnsafeExampleServiceServer
- type UpdateExampleReq
- func (*UpdateExampleReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateExampleReq) GetId() int64
- func (x *UpdateExampleReq) GetName() string
- func (x *UpdateExampleReq) GetStatus() bool
- func (*UpdateExampleReq) ProtoMessage()
- func (x *UpdateExampleReq) ProtoReflect() protoreflect.Message
- func (x *UpdateExampleReq) Reset()
- func (x *UpdateExampleReq) String() string
- func (m *UpdateExampleReq) Validate() error
- func (m *UpdateExampleReq) ValidateAll() error
- type UpdateExampleReqMultiError
- type UpdateExampleReqValidationError
- func (e UpdateExampleReqValidationError) Cause() error
- func (e UpdateExampleReqValidationError) Error() string
- func (e UpdateExampleReqValidationError) ErrorName() string
- func (e UpdateExampleReqValidationError) Field() string
- func (e UpdateExampleReqValidationError) Key() bool
- func (e UpdateExampleReqValidationError) Reason() string
Constants ¶
const ( ExampleService_GetExampleList_FullMethodName = "/example.v1.ExampleService/GetExampleList" ExampleService_GetExample_FullMethodName = "/example.v1.ExampleService/GetExample" ExampleService_CreateExample_FullMethodName = "/example.v1.ExampleService/CreateExample" ExampleService_UpdateExample_FullMethodName = "/example.v1.ExampleService/UpdateExample" ExampleService_DeleteExample_FullMethodName = "/example.v1.ExampleService/DeleteExample" ExampleService_RecoverExample_FullMethodName = "/example.v1.ExampleService/RecoverExample" )
const OperationExampleServiceCreateExample = "/example.v1.ExampleService/CreateExample"
const OperationExampleServiceDeleteExample = "/example.v1.ExampleService/DeleteExample"
const OperationExampleServiceGetExample = "/example.v1.ExampleService/GetExample"
const OperationExampleServiceGetExampleList = "/example.v1.ExampleService/GetExampleList"
const OperationExampleServiceRecoverExample = "/example.v1.ExampleService/RecoverExample"
const OperationExampleServiceUpdateExample = "/example.v1.ExampleService/UpdateExample"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "RECORD_NOT_FOUND", 1: "RECORD_ALREADY_EXISTS", 2: "BAD_REQUEST", 3: "SYSTEM_ERROR", } ErrorReason_value = map[string]int32{ "RECORD_NOT_FOUND": 0, "RECORD_ALREADY_EXISTS": 1, "BAD_REQUEST": 2, "SYSTEM_ERROR": 3, } )
Enum value maps for ErrorReason.
var ExampleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.v1.ExampleService", HandlerType: (*ExampleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetExampleList", Handler: _ExampleService_GetExampleList_Handler, }, { MethodName: "GetExample", Handler: _ExampleService_GetExample_Handler, }, { MethodName: "CreateExample", Handler: _ExampleService_CreateExample_Handler, }, { MethodName: "UpdateExample", Handler: _ExampleService_UpdateExample_Handler, }, { MethodName: "DeleteExample", Handler: _ExampleService_DeleteExample_Handler, }, { MethodName: "RecoverExample", Handler: _ExampleService_RecoverExample_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "example/v1/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_example_v1_error_reason_proto protoreflect.FileDescriptor
var File_example_v1_example_proto protoreflect.FileDescriptor
Functions ¶
func ErrorBadRequest ¶
func ErrorRecordNotFound ¶
func ErrorSystemError ¶
func IsBadRequest ¶
func IsRecordAlreadyExists ¶
func IsRecordNotFound ¶
func IsSystemError ¶
func RegisterExampleServiceHTTPServer ¶
func RegisterExampleServiceHTTPServer(s *http.Server, srv ExampleServiceHTTPServer)
func RegisterExampleServiceServer ¶
func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
Types ¶
type CreateExampleReq ¶
type CreateExampleReq struct { // name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
Request - Create
func (*CreateExampleReq) Descriptor
deprecated
func (*CreateExampleReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateExampleReq.ProtoReflect.Descriptor instead.
func (*CreateExampleReq) GetName ¶
func (x *CreateExampleReq) GetName() string
func (*CreateExampleReq) GetStatus ¶
func (x *CreateExampleReq) GetStatus() bool
func (*CreateExampleReq) ProtoMessage ¶
func (*CreateExampleReq) ProtoMessage()
func (*CreateExampleReq) ProtoReflect ¶
func (x *CreateExampleReq) ProtoReflect() protoreflect.Message
func (*CreateExampleReq) Reset ¶
func (x *CreateExampleReq) Reset()
func (*CreateExampleReq) String ¶
func (x *CreateExampleReq) String() string
func (*CreateExampleReq) Validate ¶
func (m *CreateExampleReq) Validate() error
Validate checks the field values on CreateExampleReq 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 (*CreateExampleReq) ValidateAll ¶
func (m *CreateExampleReq) ValidateAll() error
ValidateAll checks the field values on CreateExampleReq 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 CreateExampleReqMultiError, or nil if none found.
type CreateExampleReqMultiError ¶
type CreateExampleReqMultiError []error
CreateExampleReqMultiError is an error wrapping multiple validation errors returned by CreateExampleReq.ValidateAll() if the designated constraints aren't met.
func (CreateExampleReqMultiError) AllErrors ¶
func (m CreateExampleReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateExampleReqMultiError) Error ¶
func (m CreateExampleReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateExampleReqValidationError ¶
type CreateExampleReqValidationError struct {
// contains filtered or unexported fields
}
CreateExampleReqValidationError is the validation error returned by CreateExampleReq.Validate if the designated constraints aren't met.
func (CreateExampleReqValidationError) Cause ¶
func (e CreateExampleReqValidationError) Cause() error
Cause function returns cause value.
func (CreateExampleReqValidationError) Error ¶
func (e CreateExampleReqValidationError) Error() string
Error satisfies the builtin error interface
func (CreateExampleReqValidationError) ErrorName ¶
func (e CreateExampleReqValidationError) ErrorName() string
ErrorName returns error name.
func (CreateExampleReqValidationError) Field ¶
func (e CreateExampleReqValidationError) Field() string
Field function returns field value.
func (CreateExampleReqValidationError) Key ¶
func (e CreateExampleReqValidationError) Key() bool
Key function returns key value.
func (CreateExampleReqValidationError) Reason ¶
func (e CreateExampleReqValidationError) Reason() string
Reason function returns reason value.
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_RECORD_NOT_FOUND ErrorReason = 0 ErrorReason_RECORD_ALREADY_EXISTS ErrorReason = 1 ErrorReason_BAD_REQUEST ErrorReason = 2 ErrorReason_SYSTEM_ERROR ErrorReason = 3 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type Example ¶
type Example struct { // Primary key id Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // state Status bool `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` // Creation time CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Update time UpdatedAt string `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Delete time DeletedAt string `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // contains filtered or unexported fields }
Response - Sample message
func (*Example) Descriptor
deprecated
func (*Example) GetCreatedAt ¶
func (*Example) GetDeletedAt ¶
func (*Example) GetUpdatedAt ¶
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 ExampleIdReq ¶
type ExampleIdReq struct { // Primary key id Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Request - Primary key id
func (*ExampleIdReq) Descriptor
deprecated
func (*ExampleIdReq) Descriptor() ([]byte, []int)
Deprecated: Use ExampleIdReq.ProtoReflect.Descriptor instead.
func (*ExampleIdReq) GetId ¶
func (x *ExampleIdReq) GetId() int64
func (*ExampleIdReq) ProtoMessage ¶
func (*ExampleIdReq) ProtoMessage()
func (*ExampleIdReq) ProtoReflect ¶
func (x *ExampleIdReq) ProtoReflect() protoreflect.Message
func (*ExampleIdReq) Reset ¶
func (x *ExampleIdReq) Reset()
func (*ExampleIdReq) String ¶
func (x *ExampleIdReq) String() string
func (*ExampleIdReq) Validate ¶
func (m *ExampleIdReq) Validate() error
Validate checks the field values on ExampleIdReq 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 (*ExampleIdReq) ValidateAll ¶
func (m *ExampleIdReq) ValidateAll() error
ValidateAll checks the field values on ExampleIdReq 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 ExampleIdReqMultiError, or nil if none found.
type ExampleIdReqMultiError ¶
type ExampleIdReqMultiError []error
ExampleIdReqMultiError is an error wrapping multiple validation errors returned by ExampleIdReq.ValidateAll() if the designated constraints aren't met.
func (ExampleIdReqMultiError) AllErrors ¶
func (m ExampleIdReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExampleIdReqMultiError) Error ¶
func (m ExampleIdReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExampleIdReqValidationError ¶
type ExampleIdReqValidationError struct {
// contains filtered or unexported fields
}
ExampleIdReqValidationError is the validation error returned by ExampleIdReq.Validate if the designated constraints aren't met.
func (ExampleIdReqValidationError) Cause ¶
func (e ExampleIdReqValidationError) Cause() error
Cause function returns cause value.
func (ExampleIdReqValidationError) Error ¶
func (e ExampleIdReqValidationError) Error() string
Error satisfies the builtin error interface
func (ExampleIdReqValidationError) ErrorName ¶
func (e ExampleIdReqValidationError) ErrorName() string
ErrorName returns error name.
func (ExampleIdReqValidationError) Field ¶
func (e ExampleIdReqValidationError) Field() string
Field function returns field value.
func (ExampleIdReqValidationError) Key ¶
func (e ExampleIdReqValidationError) Key() bool
Key function returns key value.
func (ExampleIdReqValidationError) Reason ¶
func (e ExampleIdReqValidationError) Reason() string
Reason function returns reason value.
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 GetExampleList(ctx context.Context, in *GetExampleListReq, opts ...grpc.CallOption) (*GetExampleListPageRes, error) // Details GetExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*Example, error) // create CreateExample(ctx context.Context, in *CreateExampleReq, opts ...grpc.CallOption) (*Example, error) // renew UpdateExample(ctx context.Context, in *UpdateExampleReq, opts ...grpc.CallOption) (*emptypb.Empty, error) // delete DeleteExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*emptypb.Empty, error) // recover RecoverExample(ctx context.Context, in *ExampleIdReq, opts ...grpc.CallOption) (*emptypb.Empty, 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.
Sample Service
func NewExampleServiceClient ¶
func NewExampleServiceClient(cc grpc.ClientConnInterface) ExampleServiceClient
type ExampleServiceHTTPClient ¶
type ExampleServiceHTTPClient interface { CreateExample(ctx context.Context, req *CreateExampleReq, opts ...http.CallOption) (rsp *Example, err error) DeleteExample(ctx context.Context, req *ExampleIdReq, opts ...http.CallOption) (rsp *emptypb.Empty, err error) GetExample(ctx context.Context, req *ExampleIdReq, opts ...http.CallOption) (rsp *Example, err error) GetExampleList(ctx context.Context, req *GetExampleListReq, opts ...http.CallOption) (rsp *GetExampleListPageRes, err error) RecoverExample(ctx context.Context, req *ExampleIdReq, opts ...http.CallOption) (rsp *emptypb.Empty, err error) UpdateExample(ctx context.Context, req *UpdateExampleReq, opts ...http.CallOption) (rsp *emptypb.Empty, err error) }
func NewExampleServiceHTTPClient ¶
func NewExampleServiceHTTPClient(client *http.Client) ExampleServiceHTTPClient
type ExampleServiceHTTPClientImpl ¶
type ExampleServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ExampleServiceHTTPClientImpl) CreateExample ¶
func (c *ExampleServiceHTTPClientImpl) CreateExample(ctx context.Context, in *CreateExampleReq, opts ...http.CallOption) (*Example, error)
func (*ExampleServiceHTTPClientImpl) DeleteExample ¶
func (c *ExampleServiceHTTPClientImpl) DeleteExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*emptypb.Empty, error)
func (*ExampleServiceHTTPClientImpl) GetExample ¶
func (c *ExampleServiceHTTPClientImpl) GetExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*Example, error)
func (*ExampleServiceHTTPClientImpl) GetExampleList ¶
func (c *ExampleServiceHTTPClientImpl) GetExampleList(ctx context.Context, in *GetExampleListReq, opts ...http.CallOption) (*GetExampleListPageRes, error)
func (*ExampleServiceHTTPClientImpl) RecoverExample ¶
func (c *ExampleServiceHTTPClientImpl) RecoverExample(ctx context.Context, in *ExampleIdReq, opts ...http.CallOption) (*emptypb.Empty, error)
func (*ExampleServiceHTTPClientImpl) UpdateExample ¶
func (c *ExampleServiceHTTPClientImpl) UpdateExample(ctx context.Context, in *UpdateExampleReq, opts ...http.CallOption) (*emptypb.Empty, error)
type ExampleServiceHTTPServer ¶
type ExampleServiceHTTPServer interface { // CreateExample create CreateExample(context.Context, *CreateExampleReq) (*Example, error) // DeleteExample delete DeleteExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error) // GetExample Details GetExample(context.Context, *ExampleIdReq) (*Example, error) // GetExampleList List GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error) // RecoverExample recover RecoverExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error) // UpdateExample renew UpdateExample(context.Context, *UpdateExampleReq) (*emptypb.Empty, error) }
type ExampleServiceServer ¶
type ExampleServiceServer interface { // List GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error) // Details GetExample(context.Context, *ExampleIdReq) (*Example, error) // create CreateExample(context.Context, *CreateExampleReq) (*Example, error) // renew UpdateExample(context.Context, *UpdateExampleReq) (*emptypb.Empty, error) // delete DeleteExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error) // recover RecoverExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error) // contains filtered or unexported methods }
ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility.
Sample Service
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 GetExampleListPageRes ¶
type GetExampleListPageRes struct { // total Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // List List []*Example `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
Response - Pagination
func (*GetExampleListPageRes) Descriptor
deprecated
func (*GetExampleListPageRes) Descriptor() ([]byte, []int)
Deprecated: Use GetExampleListPageRes.ProtoReflect.Descriptor instead.
func (*GetExampleListPageRes) GetList ¶
func (x *GetExampleListPageRes) GetList() []*Example
func (*GetExampleListPageRes) GetTotal ¶
func (x *GetExampleListPageRes) GetTotal() int64
func (*GetExampleListPageRes) ProtoMessage ¶
func (*GetExampleListPageRes) ProtoMessage()
func (*GetExampleListPageRes) ProtoReflect ¶
func (x *GetExampleListPageRes) ProtoReflect() protoreflect.Message
func (*GetExampleListPageRes) Reset ¶
func (x *GetExampleListPageRes) Reset()
func (*GetExampleListPageRes) String ¶
func (x *GetExampleListPageRes) String() string
func (*GetExampleListPageRes) Validate ¶
func (m *GetExampleListPageRes) Validate() error
Validate checks the field values on GetExampleListPageRes 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 (*GetExampleListPageRes) ValidateAll ¶
func (m *GetExampleListPageRes) ValidateAll() error
ValidateAll checks the field values on GetExampleListPageRes 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 GetExampleListPageResMultiError, or nil if none found.
type GetExampleListPageResMultiError ¶
type GetExampleListPageResMultiError []error
GetExampleListPageResMultiError is an error wrapping multiple validation errors returned by GetExampleListPageRes.ValidateAll() if the designated constraints aren't met.
func (GetExampleListPageResMultiError) AllErrors ¶
func (m GetExampleListPageResMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetExampleListPageResMultiError) Error ¶
func (m GetExampleListPageResMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetExampleListPageResValidationError ¶
type GetExampleListPageResValidationError struct {
// contains filtered or unexported fields
}
GetExampleListPageResValidationError is the validation error returned by GetExampleListPageRes.Validate if the designated constraints aren't met.
func (GetExampleListPageResValidationError) Cause ¶
func (e GetExampleListPageResValidationError) Cause() error
Cause function returns cause value.
func (GetExampleListPageResValidationError) Error ¶
func (e GetExampleListPageResValidationError) Error() string
Error satisfies the builtin error interface
func (GetExampleListPageResValidationError) ErrorName ¶
func (e GetExampleListPageResValidationError) ErrorName() string
ErrorName returns error name.
func (GetExampleListPageResValidationError) Field ¶
func (e GetExampleListPageResValidationError) Field() string
Field function returns field value.
func (GetExampleListPageResValidationError) Key ¶
func (e GetExampleListPageResValidationError) Key() bool
Key function returns key value.
func (GetExampleListPageResValidationError) Reason ¶
func (e GetExampleListPageResValidationError) Reason() string
Reason function returns reason value.
type GetExampleListReq ¶
type GetExampleListReq struct { // Primary key id Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // Page Records PageSize int64 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` // name Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Status true normal false frozen Status *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // Delete IsDeleted *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=is_deleted,json=isDeleted,proto3" json:"is_deleted,omitempty"` // Creation start time CreatedAtStart string `protobuf:"bytes,6,opt,name=created_at_start,json=createdAtStart,proto3" json:"created_at_start,omitempty"` // Creation end time CreatedAtEnd string `protobuf:"bytes,7,opt,name=created_at_end,json=createdAtEnd,proto3" json:"created_at_end,omitempty"` // contains filtered or unexported fields }
Requests - Paginated List
func (*GetExampleListReq) Descriptor
deprecated
func (*GetExampleListReq) Descriptor() ([]byte, []int)
Deprecated: Use GetExampleListReq.ProtoReflect.Descriptor instead.
func (*GetExampleListReq) GetCreatedAtEnd ¶
func (x *GetExampleListReq) GetCreatedAtEnd() string
func (*GetExampleListReq) GetCreatedAtStart ¶
func (x *GetExampleListReq) GetCreatedAtStart() string
func (*GetExampleListReq) GetIsDeleted ¶
func (x *GetExampleListReq) GetIsDeleted() *wrapperspb.BoolValue
func (*GetExampleListReq) GetName ¶
func (x *GetExampleListReq) GetName() string
func (*GetExampleListReq) GetPage ¶
func (x *GetExampleListReq) GetPage() int64
func (*GetExampleListReq) GetPageSize ¶
func (x *GetExampleListReq) GetPageSize() int64
func (*GetExampleListReq) GetStatus ¶
func (x *GetExampleListReq) GetStatus() *wrapperspb.BoolValue
func (*GetExampleListReq) ProtoMessage ¶
func (*GetExampleListReq) ProtoMessage()
func (*GetExampleListReq) ProtoReflect ¶
func (x *GetExampleListReq) ProtoReflect() protoreflect.Message
func (*GetExampleListReq) Reset ¶
func (x *GetExampleListReq) Reset()
func (*GetExampleListReq) String ¶
func (x *GetExampleListReq) String() string
func (*GetExampleListReq) Validate ¶
func (m *GetExampleListReq) Validate() error
Validate checks the field values on GetExampleListReq 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 (*GetExampleListReq) ValidateAll ¶
func (m *GetExampleListReq) ValidateAll() error
ValidateAll checks the field values on GetExampleListReq 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 GetExampleListReqMultiError, or nil if none found.
type GetExampleListReqMultiError ¶
type GetExampleListReqMultiError []error
GetExampleListReqMultiError is an error wrapping multiple validation errors returned by GetExampleListReq.ValidateAll() if the designated constraints aren't met.
func (GetExampleListReqMultiError) AllErrors ¶
func (m GetExampleListReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetExampleListReqMultiError) Error ¶
func (m GetExampleListReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetExampleListReqValidationError ¶
type GetExampleListReqValidationError struct {
// contains filtered or unexported fields
}
GetExampleListReqValidationError is the validation error returned by GetExampleListReq.Validate if the designated constraints aren't met.
func (GetExampleListReqValidationError) Cause ¶
func (e GetExampleListReqValidationError) Cause() error
Cause function returns cause value.
func (GetExampleListReqValidationError) Error ¶
func (e GetExampleListReqValidationError) Error() string
Error satisfies the builtin error interface
func (GetExampleListReqValidationError) ErrorName ¶
func (e GetExampleListReqValidationError) ErrorName() string
ErrorName returns error name.
func (GetExampleListReqValidationError) Field ¶
func (e GetExampleListReqValidationError) Field() string
Field function returns field value.
func (GetExampleListReqValidationError) Key ¶
func (e GetExampleListReqValidationError) Key() bool
Key function returns key value.
func (GetExampleListReqValidationError) Reason ¶
func (e GetExampleListReqValidationError) Reason() string
Reason function returns reason value.
type UnimplementedExampleServiceServer ¶
type UnimplementedExampleServiceServer struct{}
UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedExampleServiceServer) CreateExample ¶
func (UnimplementedExampleServiceServer) CreateExample(context.Context, *CreateExampleReq) (*Example, error)
func (UnimplementedExampleServiceServer) DeleteExample ¶
func (UnimplementedExampleServiceServer) DeleteExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
func (UnimplementedExampleServiceServer) GetExample ¶
func (UnimplementedExampleServiceServer) GetExample(context.Context, *ExampleIdReq) (*Example, error)
func (UnimplementedExampleServiceServer) GetExampleList ¶
func (UnimplementedExampleServiceServer) GetExampleList(context.Context, *GetExampleListReq) (*GetExampleListPageRes, error)
func (UnimplementedExampleServiceServer) RecoverExample ¶
func (UnimplementedExampleServiceServer) RecoverExample(context.Context, *ExampleIdReq) (*emptypb.Empty, error)
func (UnimplementedExampleServiceServer) UpdateExample ¶
func (UnimplementedExampleServiceServer) UpdateExample(context.Context, *UpdateExampleReq) (*emptypb.Empty, 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 UpdateExampleReq ¶
type UpdateExampleReq struct { // Primary key id Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // state Status bool `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
Request - Update
func (*UpdateExampleReq) Descriptor
deprecated
func (*UpdateExampleReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateExampleReq.ProtoReflect.Descriptor instead.
func (*UpdateExampleReq) GetId ¶
func (x *UpdateExampleReq) GetId() int64
func (*UpdateExampleReq) GetName ¶
func (x *UpdateExampleReq) GetName() string
func (*UpdateExampleReq) GetStatus ¶
func (x *UpdateExampleReq) GetStatus() bool
func (*UpdateExampleReq) ProtoMessage ¶
func (*UpdateExampleReq) ProtoMessage()
func (*UpdateExampleReq) ProtoReflect ¶
func (x *UpdateExampleReq) ProtoReflect() protoreflect.Message
func (*UpdateExampleReq) Reset ¶
func (x *UpdateExampleReq) Reset()
func (*UpdateExampleReq) String ¶
func (x *UpdateExampleReq) String() string
func (*UpdateExampleReq) Validate ¶
func (m *UpdateExampleReq) Validate() error
Validate checks the field values on UpdateExampleReq 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 (*UpdateExampleReq) ValidateAll ¶
func (m *UpdateExampleReq) ValidateAll() error
ValidateAll checks the field values on UpdateExampleReq 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 UpdateExampleReqMultiError, or nil if none found.
type UpdateExampleReqMultiError ¶
type UpdateExampleReqMultiError []error
UpdateExampleReqMultiError is an error wrapping multiple validation errors returned by UpdateExampleReq.ValidateAll() if the designated constraints aren't met.
func (UpdateExampleReqMultiError) AllErrors ¶
func (m UpdateExampleReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateExampleReqMultiError) Error ¶
func (m UpdateExampleReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateExampleReqValidationError ¶
type UpdateExampleReqValidationError struct {
// contains filtered or unexported fields
}
UpdateExampleReqValidationError is the validation error returned by UpdateExampleReq.Validate if the designated constraints aren't met.
func (UpdateExampleReqValidationError) Cause ¶
func (e UpdateExampleReqValidationError) Cause() error
Cause function returns cause value.
func (UpdateExampleReqValidationError) Error ¶
func (e UpdateExampleReqValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateExampleReqValidationError) ErrorName ¶
func (e UpdateExampleReqValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateExampleReqValidationError) Field ¶
func (e UpdateExampleReqValidationError) Field() string
Field function returns field value.
func (UpdateExampleReqValidationError) Key ¶
func (e UpdateExampleReqValidationError) Key() bool
Key function returns key value.
func (UpdateExampleReqValidationError) Reason ¶
func (e UpdateExampleReqValidationError) Reason() string
Reason function returns reason value.