Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- type CreateGreeterRequest
- func (*CreateGreeterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateGreeterRequest) GetAge() int32
- func (x *CreateGreeterRequest) GetName() string
- func (*CreateGreeterRequest) ProtoMessage()
- func (x *CreateGreeterRequest) ProtoReflect() protoreflect.Message
- func (x *CreateGreeterRequest) Reset()
- func (x *CreateGreeterRequest) String() string
- func (m *CreateGreeterRequest) Validate() error
- func (m *CreateGreeterRequest) ValidateAll() error
- type CreateGreeterRequestMultiError
- type CreateGreeterRequestValidationError
- func (e CreateGreeterRequestValidationError) Cause() error
- func (e CreateGreeterRequestValidationError) Error() string
- func (e CreateGreeterRequestValidationError) ErrorName() string
- func (e CreateGreeterRequestValidationError) Field() string
- func (e CreateGreeterRequestValidationError) Key() bool
- func (e CreateGreeterRequestValidationError) Reason() string
- type FindGreeterReply
- func (*FindGreeterReply) Descriptor() ([]byte, []int)deprecated
- func (x *FindGreeterReply) GetList() []*GreeterReply
- func (x *FindGreeterReply) GetPage() *Page
- func (*FindGreeterReply) ProtoMessage()
- func (x *FindGreeterReply) ProtoReflect() protoreflect.Message
- func (x *FindGreeterReply) Reset()
- func (x *FindGreeterReply) String() string
- func (m *FindGreeterReply) Validate() error
- func (m *FindGreeterReply) ValidateAll() error
- type FindGreeterReplyMultiError
- type FindGreeterReplyValidationError
- func (e FindGreeterReplyValidationError) Cause() error
- func (e FindGreeterReplyValidationError) Error() string
- func (e FindGreeterReplyValidationError) ErrorName() string
- func (e FindGreeterReplyValidationError) Field() string
- func (e FindGreeterReplyValidationError) Key() bool
- func (e FindGreeterReplyValidationError) Reason() string
- type FindGreeterRequest
- func (*FindGreeterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FindGreeterRequest) GetAge() int32
- func (x *FindGreeterRequest) GetName() string
- func (x *FindGreeterRequest) GetPage() *Page
- func (*FindGreeterRequest) ProtoMessage()
- func (x *FindGreeterRequest) ProtoReflect() protoreflect.Message
- func (x *FindGreeterRequest) Reset()
- func (x *FindGreeterRequest) String() string
- func (m *FindGreeterRequest) Validate() error
- func (m *FindGreeterRequest) ValidateAll() error
- type FindGreeterRequestMultiError
- type FindGreeterRequestValidationError
- func (e FindGreeterRequestValidationError) Cause() error
- func (e FindGreeterRequestValidationError) Error() string
- func (e FindGreeterRequestValidationError) ErrorName() string
- func (e FindGreeterRequestValidationError) Field() string
- func (e FindGreeterRequestValidationError) Key() bool
- func (e FindGreeterRequestValidationError) Reason() string
- type GetGreeterReply
- func (*GetGreeterReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetGreeterReply) GetAge() int32
- func (x *GetGreeterReply) GetId() uint64
- func (x *GetGreeterReply) GetName() string
- func (*GetGreeterReply) ProtoMessage()
- func (x *GetGreeterReply) ProtoReflect() protoreflect.Message
- func (x *GetGreeterReply) Reset()
- func (x *GetGreeterReply) String() string
- func (m *GetGreeterReply) Validate() error
- func (m *GetGreeterReply) ValidateAll() error
- type GetGreeterReplyMultiError
- type GetGreeterReplyValidationError
- func (e GetGreeterReplyValidationError) Cause() error
- func (e GetGreeterReplyValidationError) Error() string
- func (e GetGreeterReplyValidationError) ErrorName() string
- func (e GetGreeterReplyValidationError) Field() string
- func (e GetGreeterReplyValidationError) Key() bool
- func (e GetGreeterReplyValidationError) Reason() string
- type GetGreeterRequest
- func (*GetGreeterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetGreeterRequest) GetId() uint64
- func (*GetGreeterRequest) ProtoMessage()
- func (x *GetGreeterRequest) ProtoReflect() protoreflect.Message
- func (x *GetGreeterRequest) Reset()
- func (x *GetGreeterRequest) String() string
- func (m *GetGreeterRequest) Validate() error
- func (m *GetGreeterRequest) ValidateAll() error
- type GetGreeterRequestMultiError
- type GetGreeterRequestValidationError
- func (e GetGreeterRequestValidationError) Cause() error
- func (e GetGreeterRequestValidationError) Error() string
- func (e GetGreeterRequestValidationError) ErrorName() string
- func (e GetGreeterRequestValidationError) Field() string
- func (e GetGreeterRequestValidationError) Key() bool
- func (e GetGreeterRequestValidationError) Reason() string
- type GreeterClient
- type GreeterHTTPClient
- type GreeterHTTPClientImpl
- func (c *GreeterHTTPClientImpl) CreateGreeter(ctx context.Context, in *CreateGreeterRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *GreeterHTTPClientImpl) DeleteGreeter(ctx context.Context, in *IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *GreeterHTTPClientImpl) FindGreeter(ctx context.Context, in *FindGreeterRequest, opts ...http.CallOption) (*FindGreeterReply, error)
- func (c *GreeterHTTPClientImpl) GetGreeter(ctx context.Context, in *GetGreeterRequest, opts ...http.CallOption) (*GetGreeterReply, error)
- func (c *GreeterHTTPClientImpl) UpdateGreeter(ctx context.Context, in *UpdateGreeterRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- type GreeterHTTPServer
- type GreeterReply
- func (*GreeterReply) Descriptor() ([]byte, []int)deprecated
- func (x *GreeterReply) GetAge() int32
- func (x *GreeterReply) GetId() uint64
- func (x *GreeterReply) GetName() string
- func (*GreeterReply) ProtoMessage()
- func (x *GreeterReply) ProtoReflect() protoreflect.Message
- func (x *GreeterReply) Reset()
- func (x *GreeterReply) String() string
- func (m *GreeterReply) Validate() error
- func (m *GreeterReply) ValidateAll() error
- type GreeterReplyMultiError
- type GreeterReplyValidationError
- func (e GreeterReplyValidationError) Cause() error
- func (e GreeterReplyValidationError) Error() string
- func (e GreeterReplyValidationError) ErrorName() string
- func (e GreeterReplyValidationError) Field() string
- func (e GreeterReplyValidationError) Key() bool
- func (e GreeterReplyValidationError) Reason() string
- type GreeterServer
- type IdsRequest
- func (*IdsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IdsRequest) GetIds() string
- func (*IdsRequest) ProtoMessage()
- func (x *IdsRequest) ProtoReflect() protoreflect.Message
- func (x *IdsRequest) Reset()
- func (x *IdsRequest) String() string
- func (m *IdsRequest) Validate() error
- func (m *IdsRequest) ValidateAll() error
- type IdsRequestMultiError
- type IdsRequestValidationError
- type Page
- func (*Page) Descriptor() ([]byte, []int)deprecated
- func (x *Page) GetDisable() bool
- func (x *Page) GetNum() uint64
- func (x *Page) GetSize() uint64
- func (x *Page) GetTotal() int64
- func (*Page) ProtoMessage()
- func (x *Page) ProtoReflect() protoreflect.Message
- func (x *Page) Reset()
- func (x *Page) String() string
- func (m *Page) Validate() error
- func (m *Page) ValidateAll() error
- type PageMultiError
- type PageValidationError
- type UnimplementedGreeterServer
- func (UnimplementedGreeterServer) CreateGreeter(context.Context, *CreateGreeterRequest) (*emptypb.Empty, error)
- func (UnimplementedGreeterServer) DeleteGreeter(context.Context, *IdsRequest) (*emptypb.Empty, error)
- func (UnimplementedGreeterServer) FindGreeter(context.Context, *FindGreeterRequest) (*FindGreeterReply, error)
- func (UnimplementedGreeterServer) GetGreeter(context.Context, *GetGreeterRequest) (*GetGreeterReply, error)
- func (UnimplementedGreeterServer) UpdateGreeter(context.Context, *UpdateGreeterRequest) (*emptypb.Empty, error)
- type UnsafeGreeterServer
- type UpdateGreeterRequest
- func (*UpdateGreeterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateGreeterRequest) GetAge() int32
- func (x *UpdateGreeterRequest) GetId() uint64
- func (x *UpdateGreeterRequest) GetName() string
- func (*UpdateGreeterRequest) ProtoMessage()
- func (x *UpdateGreeterRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateGreeterRequest) Reset()
- func (x *UpdateGreeterRequest) String() string
- func (m *UpdateGreeterRequest) Validate() error
- func (m *UpdateGreeterRequest) ValidateAll() error
- type UpdateGreeterRequestMultiError
- type UpdateGreeterRequestValidationError
- func (e UpdateGreeterRequestValidationError) Cause() error
- func (e UpdateGreeterRequestValidationError) Error() string
- func (e UpdateGreeterRequestValidationError) ErrorName() string
- func (e UpdateGreeterRequestValidationError) Field() string
- func (e UpdateGreeterRequestValidationError) Key() bool
- func (e UpdateGreeterRequestValidationError) Reason() string
Constants ¶
const OperationGreeterCreateGreeter = "/greeter.v1.Greeter/CreateGreeter"
const OperationGreeterDeleteGreeter = "/greeter.v1.Greeter/DeleteGreeter"
const OperationGreeterFindGreeter = "/greeter.v1.Greeter/FindGreeter"
const OperationGreeterGetGreeter = "/greeter.v1.Greeter/GetGreeter"
const OperationGreeterUpdateGreeter = "/greeter.v1.Greeter/UpdateGreeter"
Variables ¶
var File_greeter_proto_greeter_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greeter.v1.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateGreeter", Handler: _Greeter_CreateGreeter_Handler, }, { MethodName: "GetGreeter", Handler: _Greeter_GetGreeter_Handler, }, { MethodName: "FindGreeter", Handler: _Greeter_FindGreeter_Handler, }, { MethodName: "UpdateGreeter", Handler: _Greeter_UpdateGreeter_Handler, }, { MethodName: "DeleteGreeter", Handler: _Greeter_DeleteGreeter_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "greeter-proto/greeter.proto", }
Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreeterHTTPServer ¶
func RegisterGreeterHTTPServer(s *http.Server, srv GreeterHTTPServer)
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
Types ¶
type CreateGreeterRequest ¶
type CreateGreeterRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the name of string must be between 2 and 50 character
Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` // the age of int32 must be >= 0
// contains filtered or unexported fields
}
func (*CreateGreeterRequest) Descriptor
deprecated
func (*CreateGreeterRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateGreeterRequest.ProtoReflect.Descriptor instead.
func (*CreateGreeterRequest) GetAge ¶
func (x *CreateGreeterRequest) GetAge() int32
func (*CreateGreeterRequest) GetName ¶
func (x *CreateGreeterRequest) GetName() string
func (*CreateGreeterRequest) ProtoMessage ¶
func (*CreateGreeterRequest) ProtoMessage()
func (*CreateGreeterRequest) ProtoReflect ¶
func (x *CreateGreeterRequest) ProtoReflect() protoreflect.Message
func (*CreateGreeterRequest) Reset ¶
func (x *CreateGreeterRequest) Reset()
func (*CreateGreeterRequest) String ¶
func (x *CreateGreeterRequest) String() string
func (*CreateGreeterRequest) Validate ¶
func (m *CreateGreeterRequest) Validate() error
Validate checks the field values on CreateGreeterRequest 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 (*CreateGreeterRequest) ValidateAll ¶
func (m *CreateGreeterRequest) ValidateAll() error
ValidateAll checks the field values on CreateGreeterRequest 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 CreateGreeterRequestMultiError, or nil if none found.
type CreateGreeterRequestMultiError ¶
type CreateGreeterRequestMultiError []error
CreateGreeterRequestMultiError is an error wrapping multiple validation errors returned by CreateGreeterRequest.ValidateAll() if the designated constraints aren't met.
func (CreateGreeterRequestMultiError) AllErrors ¶
func (m CreateGreeterRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateGreeterRequestMultiError) Error ¶
func (m CreateGreeterRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateGreeterRequestValidationError ¶
type CreateGreeterRequestValidationError struct {
// contains filtered or unexported fields
}
CreateGreeterRequestValidationError is the validation error returned by CreateGreeterRequest.Validate if the designated constraints aren't met.
func (CreateGreeterRequestValidationError) Cause ¶
func (e CreateGreeterRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateGreeterRequestValidationError) Error ¶
func (e CreateGreeterRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateGreeterRequestValidationError) ErrorName ¶
func (e CreateGreeterRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateGreeterRequestValidationError) Field ¶
func (e CreateGreeterRequestValidationError) Field() string
Field function returns field value.
func (CreateGreeterRequestValidationError) Key ¶
func (e CreateGreeterRequestValidationError) Key() bool
Key function returns key value.
func (CreateGreeterRequestValidationError) Reason ¶
func (e CreateGreeterRequestValidationError) Reason() string
Reason function returns reason value.
type FindGreeterReply ¶
type FindGreeterReply struct {
Page *Page `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
List []*GreeterReply `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
func (*FindGreeterReply) Descriptor
deprecated
func (*FindGreeterReply) Descriptor() ([]byte, []int)
Deprecated: Use FindGreeterReply.ProtoReflect.Descriptor instead.
func (*FindGreeterReply) GetList ¶
func (x *FindGreeterReply) GetList() []*GreeterReply
func (*FindGreeterReply) GetPage ¶
func (x *FindGreeterReply) GetPage() *Page
func (*FindGreeterReply) ProtoMessage ¶
func (*FindGreeterReply) ProtoMessage()
func (*FindGreeterReply) ProtoReflect ¶
func (x *FindGreeterReply) ProtoReflect() protoreflect.Message
func (*FindGreeterReply) Reset ¶
func (x *FindGreeterReply) Reset()
func (*FindGreeterReply) String ¶
func (x *FindGreeterReply) String() string
func (*FindGreeterReply) Validate ¶
func (m *FindGreeterReply) Validate() error
Validate checks the field values on FindGreeterReply 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 (*FindGreeterReply) ValidateAll ¶
func (m *FindGreeterReply) ValidateAll() error
ValidateAll checks the field values on FindGreeterReply 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 FindGreeterReplyMultiError, or nil if none found.
type FindGreeterReplyMultiError ¶
type FindGreeterReplyMultiError []error
FindGreeterReplyMultiError is an error wrapping multiple validation errors returned by FindGreeterReply.ValidateAll() if the designated constraints aren't met.
func (FindGreeterReplyMultiError) AllErrors ¶
func (m FindGreeterReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FindGreeterReplyMultiError) Error ¶
func (m FindGreeterReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FindGreeterReplyValidationError ¶
type FindGreeterReplyValidationError struct {
// contains filtered or unexported fields
}
FindGreeterReplyValidationError is the validation error returned by FindGreeterReply.Validate if the designated constraints aren't met.
func (FindGreeterReplyValidationError) Cause ¶
func (e FindGreeterReplyValidationError) Cause() error
Cause function returns cause value.
func (FindGreeterReplyValidationError) Error ¶
func (e FindGreeterReplyValidationError) Error() string
Error satisfies the builtin error interface
func (FindGreeterReplyValidationError) ErrorName ¶
func (e FindGreeterReplyValidationError) ErrorName() string
ErrorName returns error name.
func (FindGreeterReplyValidationError) Field ¶
func (e FindGreeterReplyValidationError) Field() string
Field function returns field value.
func (FindGreeterReplyValidationError) Key ¶
func (e FindGreeterReplyValidationError) Key() bool
Key function returns key value.
func (FindGreeterReplyValidationError) Reason ¶
func (e FindGreeterReplyValidationError) Reason() string
Reason function returns reason value.
type FindGreeterRequest ¶
type FindGreeterRequest struct {
Page *Page `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"`
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
Age *int32 `protobuf:"varint,3,opt,name=age,proto3,oneof" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*FindGreeterRequest) Descriptor
deprecated
func (*FindGreeterRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindGreeterRequest.ProtoReflect.Descriptor instead.
func (*FindGreeterRequest) GetAge ¶
func (x *FindGreeterRequest) GetAge() int32
func (*FindGreeterRequest) GetName ¶
func (x *FindGreeterRequest) GetName() string
func (*FindGreeterRequest) GetPage ¶
func (x *FindGreeterRequest) GetPage() *Page
func (*FindGreeterRequest) ProtoMessage ¶
func (*FindGreeterRequest) ProtoMessage()
func (*FindGreeterRequest) ProtoReflect ¶
func (x *FindGreeterRequest) ProtoReflect() protoreflect.Message
func (*FindGreeterRequest) Reset ¶
func (x *FindGreeterRequest) Reset()
func (*FindGreeterRequest) String ¶
func (x *FindGreeterRequest) String() string
func (*FindGreeterRequest) Validate ¶
func (m *FindGreeterRequest) Validate() error
Validate checks the field values on FindGreeterRequest 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 (*FindGreeterRequest) ValidateAll ¶
func (m *FindGreeterRequest) ValidateAll() error
ValidateAll checks the field values on FindGreeterRequest 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 FindGreeterRequestMultiError, or nil if none found.
type FindGreeterRequestMultiError ¶
type FindGreeterRequestMultiError []error
FindGreeterRequestMultiError is an error wrapping multiple validation errors returned by FindGreeterRequest.ValidateAll() if the designated constraints aren't met.
func (FindGreeterRequestMultiError) AllErrors ¶
func (m FindGreeterRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (FindGreeterRequestMultiError) Error ¶
func (m FindGreeterRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type FindGreeterRequestValidationError ¶
type FindGreeterRequestValidationError struct {
// contains filtered or unexported fields
}
FindGreeterRequestValidationError is the validation error returned by FindGreeterRequest.Validate if the designated constraints aren't met.
func (FindGreeterRequestValidationError) Cause ¶
func (e FindGreeterRequestValidationError) Cause() error
Cause function returns cause value.
func (FindGreeterRequestValidationError) Error ¶
func (e FindGreeterRequestValidationError) Error() string
Error satisfies the builtin error interface
func (FindGreeterRequestValidationError) ErrorName ¶
func (e FindGreeterRequestValidationError) ErrorName() string
ErrorName returns error name.
func (FindGreeterRequestValidationError) Field ¶
func (e FindGreeterRequestValidationError) Field() string
Field function returns field value.
func (FindGreeterRequestValidationError) Key ¶
func (e FindGreeterRequestValidationError) Key() bool
Key function returns key value.
func (FindGreeterRequestValidationError) Reason ¶
func (e FindGreeterRequestValidationError) Reason() string
Reason function returns reason value.
type GetGreeterReply ¶
type GetGreeterReply struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*GetGreeterReply) Descriptor
deprecated
func (*GetGreeterReply) Descriptor() ([]byte, []int)
Deprecated: Use GetGreeterReply.ProtoReflect.Descriptor instead.
func (*GetGreeterReply) GetAge ¶
func (x *GetGreeterReply) GetAge() int32
func (*GetGreeterReply) GetId ¶
func (x *GetGreeterReply) GetId() uint64
func (*GetGreeterReply) GetName ¶
func (x *GetGreeterReply) GetName() string
func (*GetGreeterReply) ProtoMessage ¶
func (*GetGreeterReply) ProtoMessage()
func (*GetGreeterReply) ProtoReflect ¶
func (x *GetGreeterReply) ProtoReflect() protoreflect.Message
func (*GetGreeterReply) Reset ¶
func (x *GetGreeterReply) Reset()
func (*GetGreeterReply) String ¶
func (x *GetGreeterReply) String() string
func (*GetGreeterReply) Validate ¶
func (m *GetGreeterReply) Validate() error
Validate checks the field values on GetGreeterReply 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 (*GetGreeterReply) ValidateAll ¶
func (m *GetGreeterReply) ValidateAll() error
ValidateAll checks the field values on GetGreeterReply 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 GetGreeterReplyMultiError, or nil if none found.
type GetGreeterReplyMultiError ¶
type GetGreeterReplyMultiError []error
GetGreeterReplyMultiError is an error wrapping multiple validation errors returned by GetGreeterReply.ValidateAll() if the designated constraints aren't met.
func (GetGreeterReplyMultiError) AllErrors ¶
func (m GetGreeterReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetGreeterReplyMultiError) Error ¶
func (m GetGreeterReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetGreeterReplyValidationError ¶
type GetGreeterReplyValidationError struct {
// contains filtered or unexported fields
}
GetGreeterReplyValidationError is the validation error returned by GetGreeterReply.Validate if the designated constraints aren't met.
func (GetGreeterReplyValidationError) Cause ¶
func (e GetGreeterReplyValidationError) Cause() error
Cause function returns cause value.
func (GetGreeterReplyValidationError) Error ¶
func (e GetGreeterReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GetGreeterReplyValidationError) ErrorName ¶
func (e GetGreeterReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GetGreeterReplyValidationError) Field ¶
func (e GetGreeterReplyValidationError) Field() string
Field function returns field value.
func (GetGreeterReplyValidationError) Key ¶
func (e GetGreeterReplyValidationError) Key() bool
Key function returns key value.
func (GetGreeterReplyValidationError) Reason ¶
func (e GetGreeterReplyValidationError) Reason() string
Reason function returns reason value.
type GetGreeterRequest ¶
type GetGreeterRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*GetGreeterRequest) Descriptor
deprecated
func (*GetGreeterRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetGreeterRequest.ProtoReflect.Descriptor instead.
func (*GetGreeterRequest) GetId ¶
func (x *GetGreeterRequest) GetId() uint64
func (*GetGreeterRequest) ProtoMessage ¶
func (*GetGreeterRequest) ProtoMessage()
func (*GetGreeterRequest) ProtoReflect ¶
func (x *GetGreeterRequest) ProtoReflect() protoreflect.Message
func (*GetGreeterRequest) Reset ¶
func (x *GetGreeterRequest) Reset()
func (*GetGreeterRequest) String ¶
func (x *GetGreeterRequest) String() string
func (*GetGreeterRequest) Validate ¶
func (m *GetGreeterRequest) Validate() error
Validate checks the field values on GetGreeterRequest 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 (*GetGreeterRequest) ValidateAll ¶
func (m *GetGreeterRequest) ValidateAll() error
ValidateAll checks the field values on GetGreeterRequest 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 GetGreeterRequestMultiError, or nil if none found.
type GetGreeterRequestMultiError ¶
type GetGreeterRequestMultiError []error
GetGreeterRequestMultiError is an error wrapping multiple validation errors returned by GetGreeterRequest.ValidateAll() if the designated constraints aren't met.
func (GetGreeterRequestMultiError) AllErrors ¶
func (m GetGreeterRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetGreeterRequestMultiError) Error ¶
func (m GetGreeterRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetGreeterRequestValidationError ¶
type GetGreeterRequestValidationError struct {
// contains filtered or unexported fields
}
GetGreeterRequestValidationError is the validation error returned by GetGreeterRequest.Validate if the designated constraints aren't met.
func (GetGreeterRequestValidationError) Cause ¶
func (e GetGreeterRequestValidationError) Cause() error
Cause function returns cause value.
func (GetGreeterRequestValidationError) Error ¶
func (e GetGreeterRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetGreeterRequestValidationError) ErrorName ¶
func (e GetGreeterRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetGreeterRequestValidationError) Field ¶
func (e GetGreeterRequestValidationError) Field() string
Field function returns field value.
func (GetGreeterRequestValidationError) Key ¶
func (e GetGreeterRequestValidationError) Key() bool
Key function returns key value.
func (GetGreeterRequestValidationError) Reason ¶
func (e GetGreeterRequestValidationError) Reason() string
Reason function returns reason value.
type GreeterClient ¶
type GreeterClient interface {
CreateGreeter(ctx context.Context, in *CreateGreeterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetGreeter(ctx context.Context, in *GetGreeterRequest, opts ...grpc.CallOption) (*GetGreeterReply, error)
FindGreeter(ctx context.Context, in *FindGreeterRequest, opts ...grpc.CallOption) (*FindGreeterReply, error)
UpdateGreeter(ctx context.Context, in *UpdateGreeterRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
DeleteGreeter(ctx context.Context, in *IdsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
GreeterClient is the client API for Greeter 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 NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterHTTPClient ¶
type GreeterHTTPClient interface {
CreateGreeter(ctx context.Context, req *CreateGreeterRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
DeleteGreeter(ctx context.Context, req *IdsRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
FindGreeter(ctx context.Context, req *FindGreeterRequest, opts ...http.CallOption) (rsp *FindGreeterReply, err error)
GetGreeter(ctx context.Context, req *GetGreeterRequest, opts ...http.CallOption) (rsp *GetGreeterReply, err error)
UpdateGreeter(ctx context.Context, req *UpdateGreeterRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
}
func NewGreeterHTTPClient ¶
func NewGreeterHTTPClient(client *http.Client) GreeterHTTPClient
type GreeterHTTPClientImpl ¶
type GreeterHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*GreeterHTTPClientImpl) CreateGreeter ¶
func (c *GreeterHTTPClientImpl) CreateGreeter(ctx context.Context, in *CreateGreeterRequest, opts ...http.CallOption) (*emptypb.Empty, error)
func (*GreeterHTTPClientImpl) DeleteGreeter ¶
func (c *GreeterHTTPClientImpl) DeleteGreeter(ctx context.Context, in *IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error)
func (*GreeterHTTPClientImpl) FindGreeter ¶
func (c *GreeterHTTPClientImpl) FindGreeter(ctx context.Context, in *FindGreeterRequest, opts ...http.CallOption) (*FindGreeterReply, error)
func (*GreeterHTTPClientImpl) GetGreeter ¶
func (c *GreeterHTTPClientImpl) GetGreeter(ctx context.Context, in *GetGreeterRequest, opts ...http.CallOption) (*GetGreeterReply, error)
func (*GreeterHTTPClientImpl) UpdateGreeter ¶
func (c *GreeterHTTPClientImpl) UpdateGreeter(ctx context.Context, in *UpdateGreeterRequest, opts ...http.CallOption) (*emptypb.Empty, error)
type GreeterHTTPServer ¶
type GreeterHTTPServer interface {
CreateGreeter(context.Context, *CreateGreeterRequest) (*emptypb.Empty, error)
DeleteGreeter(context.Context, *IdsRequest) (*emptypb.Empty, error)
FindGreeter(context.Context, *FindGreeterRequest) (*FindGreeterReply, error)
GetGreeter(context.Context, *GetGreeterRequest) (*GetGreeterReply, error)
UpdateGreeter(context.Context, *UpdateGreeterRequest) (*emptypb.Empty, error)
}
type GreeterReply ¶
type GreeterReply struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*GreeterReply) Descriptor
deprecated
func (*GreeterReply) Descriptor() ([]byte, []int)
Deprecated: Use GreeterReply.ProtoReflect.Descriptor instead.
func (*GreeterReply) GetAge ¶
func (x *GreeterReply) GetAge() int32
func (*GreeterReply) GetId ¶
func (x *GreeterReply) GetId() uint64
func (*GreeterReply) GetName ¶
func (x *GreeterReply) GetName() string
func (*GreeterReply) ProtoMessage ¶
func (*GreeterReply) ProtoMessage()
func (*GreeterReply) ProtoReflect ¶
func (x *GreeterReply) ProtoReflect() protoreflect.Message
func (*GreeterReply) Reset ¶
func (x *GreeterReply) Reset()
func (*GreeterReply) String ¶
func (x *GreeterReply) String() string
func (*GreeterReply) Validate ¶
func (m *GreeterReply) Validate() error
Validate checks the field values on GreeterReply 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 (*GreeterReply) ValidateAll ¶
func (m *GreeterReply) ValidateAll() error
ValidateAll checks the field values on GreeterReply 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 GreeterReplyMultiError, or nil if none found.
type GreeterReplyMultiError ¶
type GreeterReplyMultiError []error
GreeterReplyMultiError is an error wrapping multiple validation errors returned by GreeterReply.ValidateAll() if the designated constraints aren't met.
func (GreeterReplyMultiError) AllErrors ¶
func (m GreeterReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GreeterReplyMultiError) Error ¶
func (m GreeterReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GreeterReplyValidationError ¶
type GreeterReplyValidationError struct {
// contains filtered or unexported fields
}
GreeterReplyValidationError is the validation error returned by GreeterReply.Validate if the designated constraints aren't met.
func (GreeterReplyValidationError) Cause ¶
func (e GreeterReplyValidationError) Cause() error
Cause function returns cause value.
func (GreeterReplyValidationError) Error ¶
func (e GreeterReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GreeterReplyValidationError) ErrorName ¶
func (e GreeterReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GreeterReplyValidationError) Field ¶
func (e GreeterReplyValidationError) Field() string
Field function returns field value.
func (GreeterReplyValidationError) Key ¶
func (e GreeterReplyValidationError) Key() bool
Key function returns key value.
func (GreeterReplyValidationError) Reason ¶
func (e GreeterReplyValidationError) Reason() string
Reason function returns reason value.
type GreeterServer ¶
type GreeterServer interface {
CreateGreeter(context.Context, *CreateGreeterRequest) (*emptypb.Empty, error)
GetGreeter(context.Context, *GetGreeterRequest) (*GetGreeterReply, error)
FindGreeter(context.Context, *FindGreeterRequest) (*FindGreeterReply, error)
UpdateGreeter(context.Context, *UpdateGreeterRequest) (*emptypb.Empty, error)
DeleteGreeter(context.Context, *IdsRequest) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type IdsRequest ¶
type IdsRequest struct {
Ids string `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
// contains filtered or unexported fields
}
func (*IdsRequest) Descriptor
deprecated
func (*IdsRequest) Descriptor() ([]byte, []int)
Deprecated: Use IdsRequest.ProtoReflect.Descriptor instead.
func (*IdsRequest) GetIds ¶
func (x *IdsRequest) GetIds() string
func (*IdsRequest) ProtoMessage ¶
func (*IdsRequest) ProtoMessage()
func (*IdsRequest) ProtoReflect ¶
func (x *IdsRequest) ProtoReflect() protoreflect.Message
func (*IdsRequest) Reset ¶
func (x *IdsRequest) Reset()
func (*IdsRequest) String ¶
func (x *IdsRequest) String() string
func (*IdsRequest) Validate ¶
func (m *IdsRequest) Validate() error
Validate checks the field values on IdsRequest 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 (*IdsRequest) ValidateAll ¶
func (m *IdsRequest) ValidateAll() error
ValidateAll checks the field values on IdsRequest 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 IdsRequestMultiError, or nil if none found.
type IdsRequestMultiError ¶
type IdsRequestMultiError []error
IdsRequestMultiError is an error wrapping multiple validation errors returned by IdsRequest.ValidateAll() if the designated constraints aren't met.
func (IdsRequestMultiError) AllErrors ¶
func (m IdsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IdsRequestMultiError) Error ¶
func (m IdsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IdsRequestValidationError ¶
type IdsRequestValidationError struct {
// contains filtered or unexported fields
}
IdsRequestValidationError is the validation error returned by IdsRequest.Validate if the designated constraints aren't met.
func (IdsRequestValidationError) Cause ¶
func (e IdsRequestValidationError) Cause() error
Cause function returns cause value.
func (IdsRequestValidationError) Error ¶
func (e IdsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (IdsRequestValidationError) ErrorName ¶
func (e IdsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (IdsRequestValidationError) Field ¶
func (e IdsRequestValidationError) Field() string
Field function returns field value.
func (IdsRequestValidationError) Key ¶
func (e IdsRequestValidationError) Key() bool
Key function returns key value.
func (IdsRequestValidationError) Reason ¶
func (e IdsRequestValidationError) Reason() string
Reason function returns reason value.
type Page ¶
type Page struct {
Num uint64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
Disable bool `protobuf:"varint,4,opt,name=disable,proto3" json:"disable,omitempty"`
// contains filtered or unexported fields
}
func (*Page) Descriptor
deprecated
func (*Page) GetDisable ¶
func (*Page) ProtoMessage ¶
func (*Page) ProtoMessage()
func (*Page) ProtoReflect ¶
func (x *Page) ProtoReflect() protoreflect.Message
func (*Page) Validate ¶
Validate checks the field values on Page 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 (*Page) ValidateAll ¶
ValidateAll checks the field values on Page 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 PageMultiError, or nil if none found.
type PageMultiError ¶
type PageMultiError []error
PageMultiError is an error wrapping multiple validation errors returned by Page.ValidateAll() if the designated constraints aren't met.
func (PageMultiError) AllErrors ¶
func (m PageMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PageMultiError) Error ¶
func (m PageMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PageValidationError ¶
type PageValidationError struct {
// contains filtered or unexported fields
}
PageValidationError is the validation error returned by Page.Validate if the designated constraints aren't met.
func (PageValidationError) Cause ¶
func (e PageValidationError) Cause() error
Cause function returns cause value.
func (PageValidationError) Error ¶
func (e PageValidationError) Error() string
Error satisfies the builtin error interface
func (PageValidationError) ErrorName ¶
func (e PageValidationError) ErrorName() string
ErrorName returns error name.
func (PageValidationError) Field ¶
func (e PageValidationError) Field() string
Field function returns field value.
func (PageValidationError) Key ¶
func (e PageValidationError) Key() bool
Key function returns key value.
func (PageValidationError) Reason ¶
func (e PageValidationError) Reason() string
Reason function returns reason value.
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct {
}
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) CreateGreeter ¶
func (UnimplementedGreeterServer) CreateGreeter(context.Context, *CreateGreeterRequest) (*emptypb.Empty, error)
func (UnimplementedGreeterServer) DeleteGreeter ¶
func (UnimplementedGreeterServer) DeleteGreeter(context.Context, *IdsRequest) (*emptypb.Empty, error)
func (UnimplementedGreeterServer) FindGreeter ¶
func (UnimplementedGreeterServer) FindGreeter(context.Context, *FindGreeterRequest) (*FindGreeterReply, error)
func (UnimplementedGreeterServer) GetGreeter ¶
func (UnimplementedGreeterServer) GetGreeter(context.Context, *GetGreeterRequest) (*GetGreeterReply, error)
func (UnimplementedGreeterServer) UpdateGreeter ¶
func (UnimplementedGreeterServer) UpdateGreeter(context.Context, *UpdateGreeterRequest) (*emptypb.Empty, error)
type UnsafeGreeterServer ¶
type UnsafeGreeterServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.
type UpdateGreeterRequest ¶
type UpdateGreeterRequest struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` // the name of string must be between 2 and 50 character
Age *int32 `protobuf:"varint,3,opt,name=age,proto3,oneof" json:"age,omitempty"` // the age of int32 must be >= 0
// contains filtered or unexported fields
}
func (*UpdateGreeterRequest) Descriptor
deprecated
func (*UpdateGreeterRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateGreeterRequest.ProtoReflect.Descriptor instead.
func (*UpdateGreeterRequest) GetAge ¶
func (x *UpdateGreeterRequest) GetAge() int32
func (*UpdateGreeterRequest) GetId ¶
func (x *UpdateGreeterRequest) GetId() uint64
func (*UpdateGreeterRequest) GetName ¶
func (x *UpdateGreeterRequest) GetName() string
func (*UpdateGreeterRequest) ProtoMessage ¶
func (*UpdateGreeterRequest) ProtoMessage()
func (*UpdateGreeterRequest) ProtoReflect ¶
func (x *UpdateGreeterRequest) ProtoReflect() protoreflect.Message
func (*UpdateGreeterRequest) Reset ¶
func (x *UpdateGreeterRequest) Reset()
func (*UpdateGreeterRequest) String ¶
func (x *UpdateGreeterRequest) String() string
func (*UpdateGreeterRequest) Validate ¶
func (m *UpdateGreeterRequest) Validate() error
Validate checks the field values on UpdateGreeterRequest 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 (*UpdateGreeterRequest) ValidateAll ¶
func (m *UpdateGreeterRequest) ValidateAll() error
ValidateAll checks the field values on UpdateGreeterRequest 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 UpdateGreeterRequestMultiError, or nil if none found.
type UpdateGreeterRequestMultiError ¶
type UpdateGreeterRequestMultiError []error
UpdateGreeterRequestMultiError is an error wrapping multiple validation errors returned by UpdateGreeterRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateGreeterRequestMultiError) AllErrors ¶
func (m UpdateGreeterRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateGreeterRequestMultiError) Error ¶
func (m UpdateGreeterRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateGreeterRequestValidationError ¶
type UpdateGreeterRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateGreeterRequestValidationError is the validation error returned by UpdateGreeterRequest.Validate if the designated constraints aren't met.
func (UpdateGreeterRequestValidationError) Cause ¶
func (e UpdateGreeterRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateGreeterRequestValidationError) Error ¶
func (e UpdateGreeterRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateGreeterRequestValidationError) ErrorName ¶
func (e UpdateGreeterRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateGreeterRequestValidationError) Field ¶
func (e UpdateGreeterRequestValidationError) Field() string
Field function returns field value.
func (UpdateGreeterRequestValidationError) Key ¶
func (e UpdateGreeterRequestValidationError) Key() bool
Key function returns key value.
func (UpdateGreeterRequestValidationError) Reason ¶
func (e UpdateGreeterRequestValidationError) Reason() string
Reason function returns reason value.