Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServiceEchoServer(r *v4.Echo, srv GreeterServiceEchoServer)
- func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
- type Error
- type GreeterServiceClient
- type GreeterServiceEchoServer
- type GreeterServiceServer
- type SayHelloRequest
- func (*SayHelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SayHelloRequest) GetName() string
- func (*SayHelloRequest) ProtoMessage()
- func (x *SayHelloRequest) ProtoReflect() protoreflect.Message
- func (x *SayHelloRequest) Reset()
- func (x *SayHelloRequest) String() string
- func (m *SayHelloRequest) Validate() error
- func (m *SayHelloRequest) ValidateAll() error
- type SayHelloRequestMultiError
- type SayHelloRequestValidationError
- func (e SayHelloRequestValidationError) Cause() error
- func (e SayHelloRequestValidationError) Error() string
- func (e SayHelloRequestValidationError) ErrorName() string
- func (e SayHelloRequestValidationError) Field() string
- func (e SayHelloRequestValidationError) Key() bool
- func (e SayHelloRequestValidationError) Reason() string
- type SayHelloResponse
- func (*SayHelloResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SayHelloResponse) GetData() *SayHelloResponse_Data
- func (x *SayHelloResponse) GetError() uint32
- func (x *SayHelloResponse) GetMsg() string
- func (*SayHelloResponse) ProtoMessage()
- func (x *SayHelloResponse) ProtoReflect() protoreflect.Message
- func (x *SayHelloResponse) Reset()
- func (x *SayHelloResponse) String() string
- func (m *SayHelloResponse) Validate() error
- func (m *SayHelloResponse) ValidateAll() error
- type SayHelloResponseMultiError
- type SayHelloResponseValidationError
- func (e SayHelloResponseValidationError) Cause() error
- func (e SayHelloResponseValidationError) Error() string
- func (e SayHelloResponseValidationError) ErrorName() string
- func (e SayHelloResponseValidationError) Field() string
- func (e SayHelloResponseValidationError) Key() bool
- func (e SayHelloResponseValidationError) Reason() string
- type SayHelloResponse_Data
- func (*SayHelloResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *SayHelloResponse_Data) GetAgeNumber() uint64
- func (x *SayHelloResponse_Data) GetMetadata() map[string]string
- func (x *SayHelloResponse_Data) GetName() string
- func (x *SayHelloResponse_Data) GetSex() Sex
- func (*SayHelloResponse_Data) ProtoMessage()
- func (x *SayHelloResponse_Data) ProtoReflect() protoreflect.Message
- func (x *SayHelloResponse_Data) Reset()
- func (x *SayHelloResponse_Data) String() string
- func (m *SayHelloResponse_Data) Validate() error
- func (m *SayHelloResponse_Data) ValidateAll() error
- type SayHelloResponse_DataMultiError
- type SayHelloResponse_DataValidationError
- func (e SayHelloResponse_DataValidationError) Cause() error
- func (e SayHelloResponse_DataValidationError) Error() string
- func (e SayHelloResponse_DataValidationError) ErrorName() string
- func (e SayHelloResponse_DataValidationError) Field() string
- func (e SayHelloResponse_DataValidationError) Key() bool
- func (e SayHelloResponse_DataValidationError) Reason() string
- type SayHiRequest
- func (*SayHiRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SayHiRequest) GetName() string
- func (*SayHiRequest) ProtoMessage()
- func (x *SayHiRequest) ProtoReflect() protoreflect.Message
- func (x *SayHiRequest) Reset()
- func (x *SayHiRequest) String() string
- func (m *SayHiRequest) Validate() error
- func (m *SayHiRequest) ValidateAll() error
- type SayHiRequestMultiError
- type SayHiRequestValidationError
- func (e SayHiRequestValidationError) Cause() error
- func (e SayHiRequestValidationError) Error() string
- func (e SayHiRequestValidationError) ErrorName() string
- func (e SayHiRequestValidationError) Field() string
- func (e SayHiRequestValidationError) Key() bool
- func (e SayHiRequestValidationError) Reason() string
- type SayHiResponse
- func (*SayHiResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SayHiResponse) GetData() *SayHiResponse_Data
- func (x *SayHiResponse) GetError() uint32
- func (x *SayHiResponse) GetMsg() string
- func (*SayHiResponse) ProtoMessage()
- func (x *SayHiResponse) ProtoReflect() protoreflect.Message
- func (x *SayHiResponse) Reset()
- func (x *SayHiResponse) String() string
- func (m *SayHiResponse) Validate() error
- func (m *SayHiResponse) ValidateAll() error
- type SayHiResponseMultiError
- type SayHiResponseValidationError
- func (e SayHiResponseValidationError) Cause() error
- func (e SayHiResponseValidationError) Error() string
- func (e SayHiResponseValidationError) ErrorName() string
- func (e SayHiResponseValidationError) Field() string
- func (e SayHiResponseValidationError) Key() bool
- func (e SayHiResponseValidationError) Reason() string
- type SayHiResponse_Data
- func (*SayHiResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *SayHiResponse_Data) GetAgeNumber() uint64
- func (x *SayHiResponse_Data) GetName() string
- func (*SayHiResponse_Data) ProtoMessage()
- func (x *SayHiResponse_Data) ProtoReflect() protoreflect.Message
- func (x *SayHiResponse_Data) Reset()
- func (x *SayHiResponse_Data) String() string
- func (m *SayHiResponse_Data) Validate() error
- func (m *SayHiResponse_Data) ValidateAll() error
- type SayHiResponse_DataMultiError
- type SayHiResponse_DataValidationError
- func (e SayHiResponse_DataValidationError) Cause() error
- func (e SayHiResponse_DataValidationError) Error() string
- func (e SayHiResponse_DataValidationError) ErrorName() string
- func (e SayHiResponse_DataValidationError) Field() string
- func (e SayHiResponse_DataValidationError) Key() bool
- func (e SayHiResponse_DataValidationError) Reason() string
- type Sex
- type UnimplementedGreeterServiceServer
- type UnsafeGreeterServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Error_name = map[int32]string{ 0: "ERROR_UNSPECIFIED", 1000: "ERROR_NAME_EMPTY", } Error_value = map[string]int32{ "ERROR_UNSPECIFIED": 0, "ERROR_NAME_EMPTY": 1000, } )
Enum value maps for Error.
var ( Sex_name = map[int32]string{ 0: "SEX_UNSPECIFIED", 1: "SEX_MALE", 2: "SEX_FEMALE", } Sex_value = map[string]int32{ "SEX_UNSPECIFIED": 0, "SEX_MALE": 1, "SEX_FEMALE": 2, } )
Enum value maps for Sex.
var File_helloworld_v1_error_proto protoreflect.FileDescriptor
var File_helloworld_v1_helloworld_proto protoreflect.FileDescriptor
var GreeterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.v1.GreeterService", HandlerType: (*GreeterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _GreeterService_SayHello_Handler, }, { MethodName: "SayHi", Handler: _GreeterService_SayHi_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "helloworld/v1/helloworld.proto", }
GreeterService_ServiceDesc is the grpc.ServiceDesc for GreeterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var XERROR_ERROR_NAME_EMPTY = xerror.New(1000, "name is empty")
ERROR_NAME_EMPTY is the error code for empty name.
Functions ¶
func RegisterGreeterServiceEchoServer ¶
func RegisterGreeterServiceEchoServer(r *v4.Echo, srv GreeterServiceEchoServer)
func RegisterGreeterServiceServer ¶
func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
Types ¶
type Error ¶
type Error int32
Error codes for the helloworld.v1 package.
func (Error) Descriptor ¶
func (Error) Descriptor() protoreflect.EnumDescriptor
func (Error) EnumDescriptor
deprecated
func (Error) Number ¶
func (x Error) Number() protoreflect.EnumNumber
func (Error) Type ¶
func (Error) Type() protoreflect.EnumType
type GreeterServiceClient ¶
type GreeterServiceClient interface { // Sends a hello greeting SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) // Sends a hi greeting SayHi(ctx context.Context, in *SayHiRequest, opts ...grpc.CallOption) (*SayHiResponse, error) }
GreeterServiceClient is the client API for GreeterService 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 NewGreeterServiceClient ¶
func NewGreeterServiceClient(cc grpc.ClientConnInterface) GreeterServiceClient
type GreeterServiceEchoServer ¶
type GreeterServiceEchoServer interface { // Sends a hello greeting SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) // Sends a hi greeting SayHi(context.Context, *SayHiRequest) (*SayHiResponse, error) }
type GreeterServiceServer ¶
type GreeterServiceServer interface { // Sends a hello greeting SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) // Sends a hi greeting SayHi(context.Context, *SayHiRequest) (*SayHiResponse, error) }
GreeterServiceServer is the server API for GreeterService service. All implementations should embed UnimplementedGreeterServiceServer for forward compatibility
type SayHelloRequest ¶
type SayHelloRequest struct { // name ... Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" form:"name" param:"name" uri:"name"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*SayHelloRequest) Descriptor
deprecated
func (*SayHelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead.
func (*SayHelloRequest) GetName ¶
func (x *SayHelloRequest) GetName() string
func (*SayHelloRequest) ProtoMessage ¶
func (*SayHelloRequest) ProtoMessage()
func (*SayHelloRequest) ProtoReflect ¶
func (x *SayHelloRequest) ProtoReflect() protoreflect.Message
func (*SayHelloRequest) Reset ¶
func (x *SayHelloRequest) Reset()
func (*SayHelloRequest) String ¶
func (x *SayHelloRequest) String() string
func (*SayHelloRequest) Validate ¶
func (m *SayHelloRequest) Validate() error
Validate checks the field values on SayHelloRequest 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 (*SayHelloRequest) ValidateAll ¶
func (m *SayHelloRequest) ValidateAll() error
ValidateAll checks the field values on SayHelloRequest 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 SayHelloRequestMultiError, or nil if none found.
type SayHelloRequestMultiError ¶
type SayHelloRequestMultiError []error
SayHelloRequestMultiError is an error wrapping multiple validation errors returned by SayHelloRequest.ValidateAll() if the designated constraints aren't met.
func (SayHelloRequestMultiError) AllErrors ¶
func (m SayHelloRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SayHelloRequestMultiError) Error ¶
func (m SayHelloRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SayHelloRequestValidationError ¶
type SayHelloRequestValidationError struct {
// contains filtered or unexported fields
}
SayHelloRequestValidationError is the validation error returned by SayHelloRequest.Validate if the designated constraints aren't met.
func (SayHelloRequestValidationError) Cause ¶
func (e SayHelloRequestValidationError) Cause() error
Cause function returns cause value.
func (SayHelloRequestValidationError) Error ¶
func (e SayHelloRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SayHelloRequestValidationError) ErrorName ¶
func (e SayHelloRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SayHelloRequestValidationError) Field ¶
func (e SayHelloRequestValidationError) Field() string
Field function returns field value.
func (SayHelloRequestValidationError) Key ¶
func (e SayHelloRequestValidationError) Key() bool
Key function returns key value.
func (SayHelloRequestValidationError) Reason ¶
func (e SayHelloRequestValidationError) Reason() string
Reason function returns reason value.
type SayHelloResponse ¶
type SayHelloResponse struct { // error Error uint32 `protobuf:"varint,1,opt,name=error,proto3" json:"error"` // msg Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"` // data ... Data *SayHelloResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data"` // contains filtered or unexported fields }
The response message containing the greetings
func (*SayHelloResponse) Descriptor
deprecated
func (*SayHelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead.
func (*SayHelloResponse) GetData ¶
func (x *SayHelloResponse) GetData() *SayHelloResponse_Data
func (*SayHelloResponse) GetError ¶
func (x *SayHelloResponse) GetError() uint32
func (*SayHelloResponse) GetMsg ¶
func (x *SayHelloResponse) GetMsg() string
func (*SayHelloResponse) ProtoMessage ¶
func (*SayHelloResponse) ProtoMessage()
func (*SayHelloResponse) ProtoReflect ¶
func (x *SayHelloResponse) ProtoReflect() protoreflect.Message
func (*SayHelloResponse) Reset ¶
func (x *SayHelloResponse) Reset()
func (*SayHelloResponse) String ¶
func (x *SayHelloResponse) String() string
func (*SayHelloResponse) Validate ¶
func (m *SayHelloResponse) Validate() error
Validate checks the field values on SayHelloResponse 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 (*SayHelloResponse) ValidateAll ¶
func (m *SayHelloResponse) ValidateAll() error
ValidateAll checks the field values on SayHelloResponse 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 SayHelloResponseMultiError, or nil if none found.
type SayHelloResponseMultiError ¶
type SayHelloResponseMultiError []error
SayHelloResponseMultiError is an error wrapping multiple validation errors returned by SayHelloResponse.ValidateAll() if the designated constraints aren't met.
func (SayHelloResponseMultiError) AllErrors ¶
func (m SayHelloResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SayHelloResponseMultiError) Error ¶
func (m SayHelloResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SayHelloResponseValidationError ¶
type SayHelloResponseValidationError struct {
// contains filtered or unexported fields
}
SayHelloResponseValidationError is the validation error returned by SayHelloResponse.Validate if the designated constraints aren't met.
func (SayHelloResponseValidationError) Cause ¶
func (e SayHelloResponseValidationError) Cause() error
Cause function returns cause value.
func (SayHelloResponseValidationError) Error ¶
func (e SayHelloResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SayHelloResponseValidationError) ErrorName ¶
func (e SayHelloResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SayHelloResponseValidationError) Field ¶
func (e SayHelloResponseValidationError) Field() string
Field function returns field value.
func (SayHelloResponseValidationError) Key ¶
func (e SayHelloResponseValidationError) Key() bool
Key function returns key value.
func (SayHelloResponseValidationError) Reason ¶
func (e SayHelloResponseValidationError) Reason() string
Reason function returns reason value.
type SayHelloResponse_Data ¶
type SayHelloResponse_Data struct { // name of the user Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` // age_number is the age number. AgeNumber uint64 `protobuf:"varint,2,opt,name=age_number,json=ageNumber,proto3" json:"ageNumber"` // sex is the user's sex Sex Sex `protobuf:"varint,3,opt,name=sex,proto3,enum=helloworld.v1.Sex" json:"sex"` // metadata is the user's metadata Metadata map[string]string `` /* 147-byte string literal not displayed */ // contains filtered or unexported fields }
Data is the data to be sent.
func (*SayHelloResponse_Data) Descriptor
deprecated
func (*SayHelloResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloResponse_Data.ProtoReflect.Descriptor instead.
func (*SayHelloResponse_Data) GetAgeNumber ¶
func (x *SayHelloResponse_Data) GetAgeNumber() uint64
func (*SayHelloResponse_Data) GetMetadata ¶
func (x *SayHelloResponse_Data) GetMetadata() map[string]string
func (*SayHelloResponse_Data) GetName ¶
func (x *SayHelloResponse_Data) GetName() string
func (*SayHelloResponse_Data) GetSex ¶
func (x *SayHelloResponse_Data) GetSex() Sex
func (*SayHelloResponse_Data) ProtoMessage ¶
func (*SayHelloResponse_Data) ProtoMessage()
func (*SayHelloResponse_Data) ProtoReflect ¶
func (x *SayHelloResponse_Data) ProtoReflect() protoreflect.Message
func (*SayHelloResponse_Data) Reset ¶
func (x *SayHelloResponse_Data) Reset()
func (*SayHelloResponse_Data) String ¶
func (x *SayHelloResponse_Data) String() string
func (*SayHelloResponse_Data) Validate ¶
func (m *SayHelloResponse_Data) Validate() error
Validate checks the field values on SayHelloResponse_Data 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 (*SayHelloResponse_Data) ValidateAll ¶
func (m *SayHelloResponse_Data) ValidateAll() error
ValidateAll checks the field values on SayHelloResponse_Data 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 SayHelloResponse_DataMultiError, or nil if none found.
type SayHelloResponse_DataMultiError ¶
type SayHelloResponse_DataMultiError []error
SayHelloResponse_DataMultiError is an error wrapping multiple validation errors returned by SayHelloResponse_Data.ValidateAll() if the designated constraints aren't met.
func (SayHelloResponse_DataMultiError) AllErrors ¶
func (m SayHelloResponse_DataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SayHelloResponse_DataMultiError) Error ¶
func (m SayHelloResponse_DataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SayHelloResponse_DataValidationError ¶
type SayHelloResponse_DataValidationError struct {
// contains filtered or unexported fields
}
SayHelloResponse_DataValidationError is the validation error returned by SayHelloResponse_Data.Validate if the designated constraints aren't met.
func (SayHelloResponse_DataValidationError) Cause ¶
func (e SayHelloResponse_DataValidationError) Cause() error
Cause function returns cause value.
func (SayHelloResponse_DataValidationError) Error ¶
func (e SayHelloResponse_DataValidationError) Error() string
Error satisfies the builtin error interface
func (SayHelloResponse_DataValidationError) ErrorName ¶
func (e SayHelloResponse_DataValidationError) ErrorName() string
ErrorName returns error name.
func (SayHelloResponse_DataValidationError) Field ¶
func (e SayHelloResponse_DataValidationError) Field() string
Field function returns field value.
func (SayHelloResponse_DataValidationError) Key ¶
func (e SayHelloResponse_DataValidationError) Key() bool
Key function returns key value.
func (SayHelloResponse_DataValidationError) Reason ¶
func (e SayHelloResponse_DataValidationError) Reason() string
Reason function returns reason value.
type SayHiRequest ¶
type SayHiRequest struct { // name ... Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" form:"name"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*SayHiRequest) Descriptor
deprecated
func (*SayHiRequest) Descriptor() ([]byte, []int)
Deprecated: Use SayHiRequest.ProtoReflect.Descriptor instead.
func (*SayHiRequest) GetName ¶
func (x *SayHiRequest) GetName() string
func (*SayHiRequest) ProtoMessage ¶
func (*SayHiRequest) ProtoMessage()
func (*SayHiRequest) ProtoReflect ¶
func (x *SayHiRequest) ProtoReflect() protoreflect.Message
func (*SayHiRequest) Reset ¶
func (x *SayHiRequest) Reset()
func (*SayHiRequest) String ¶
func (x *SayHiRequest) String() string
func (*SayHiRequest) Validate ¶
func (m *SayHiRequest) Validate() error
Validate checks the field values on SayHiRequest 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 (*SayHiRequest) ValidateAll ¶
func (m *SayHiRequest) ValidateAll() error
ValidateAll checks the field values on SayHiRequest 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 SayHiRequestMultiError, or nil if none found.
type SayHiRequestMultiError ¶
type SayHiRequestMultiError []error
SayHiRequestMultiError is an error wrapping multiple validation errors returned by SayHiRequest.ValidateAll() if the designated constraints aren't met.
func (SayHiRequestMultiError) AllErrors ¶
func (m SayHiRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SayHiRequestMultiError) Error ¶
func (m SayHiRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SayHiRequestValidationError ¶
type SayHiRequestValidationError struct {
// contains filtered or unexported fields
}
SayHiRequestValidationError is the validation error returned by SayHiRequest.Validate if the designated constraints aren't met.
func (SayHiRequestValidationError) Cause ¶
func (e SayHiRequestValidationError) Cause() error
Cause function returns cause value.
func (SayHiRequestValidationError) Error ¶
func (e SayHiRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SayHiRequestValidationError) ErrorName ¶
func (e SayHiRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SayHiRequestValidationError) Field ¶
func (e SayHiRequestValidationError) Field() string
Field function returns field value.
func (SayHiRequestValidationError) Key ¶
func (e SayHiRequestValidationError) Key() bool
Key function returns key value.
func (SayHiRequestValidationError) Reason ¶
func (e SayHiRequestValidationError) Reason() string
Reason function returns reason value.
type SayHiResponse ¶
type SayHiResponse struct { // error Error uint32 `protobuf:"varint,1,opt,name=error,proto3" json:"error"` // msg Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"` // data ... Data *SayHiResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data"` // contains filtered or unexported fields }
The response message containing the greetings
func (*SayHiResponse) Descriptor
deprecated
func (*SayHiResponse) Descriptor() ([]byte, []int)
Deprecated: Use SayHiResponse.ProtoReflect.Descriptor instead.
func (*SayHiResponse) GetData ¶
func (x *SayHiResponse) GetData() *SayHiResponse_Data
func (*SayHiResponse) GetError ¶
func (x *SayHiResponse) GetError() uint32
func (*SayHiResponse) GetMsg ¶
func (x *SayHiResponse) GetMsg() string
func (*SayHiResponse) ProtoMessage ¶
func (*SayHiResponse) ProtoMessage()
func (*SayHiResponse) ProtoReflect ¶
func (x *SayHiResponse) ProtoReflect() protoreflect.Message
func (*SayHiResponse) Reset ¶
func (x *SayHiResponse) Reset()
func (*SayHiResponse) String ¶
func (x *SayHiResponse) String() string
func (*SayHiResponse) Validate ¶
func (m *SayHiResponse) Validate() error
Validate checks the field values on SayHiResponse 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 (*SayHiResponse) ValidateAll ¶
func (m *SayHiResponse) ValidateAll() error
ValidateAll checks the field values on SayHiResponse 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 SayHiResponseMultiError, or nil if none found.
type SayHiResponseMultiError ¶
type SayHiResponseMultiError []error
SayHiResponseMultiError is an error wrapping multiple validation errors returned by SayHiResponse.ValidateAll() if the designated constraints aren't met.
func (SayHiResponseMultiError) AllErrors ¶
func (m SayHiResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SayHiResponseMultiError) Error ¶
func (m SayHiResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SayHiResponseValidationError ¶
type SayHiResponseValidationError struct {
// contains filtered or unexported fields
}
SayHiResponseValidationError is the validation error returned by SayHiResponse.Validate if the designated constraints aren't met.
func (SayHiResponseValidationError) Cause ¶
func (e SayHiResponseValidationError) Cause() error
Cause function returns cause value.
func (SayHiResponseValidationError) Error ¶
func (e SayHiResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SayHiResponseValidationError) ErrorName ¶
func (e SayHiResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SayHiResponseValidationError) Field ¶
func (e SayHiResponseValidationError) Field() string
Field function returns field value.
func (SayHiResponseValidationError) Key ¶
func (e SayHiResponseValidationError) Key() bool
Key function returns key value.
func (SayHiResponseValidationError) Reason ¶
func (e SayHiResponseValidationError) Reason() string
Reason function returns reason value.
type SayHiResponse_Data ¶
type SayHiResponse_Data struct { // name of the user Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` // age_number is the age number. AgeNumber uint64 `protobuf:"varint,2,opt,name=age_number,json=ageNumber,proto3" json:"ageNumber"` // contains filtered or unexported fields }
Data is the data to be sent.
func (*SayHiResponse_Data) Descriptor
deprecated
func (*SayHiResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use SayHiResponse_Data.ProtoReflect.Descriptor instead.
func (*SayHiResponse_Data) GetAgeNumber ¶
func (x *SayHiResponse_Data) GetAgeNumber() uint64
func (*SayHiResponse_Data) GetName ¶
func (x *SayHiResponse_Data) GetName() string
func (*SayHiResponse_Data) ProtoMessage ¶
func (*SayHiResponse_Data) ProtoMessage()
func (*SayHiResponse_Data) ProtoReflect ¶
func (x *SayHiResponse_Data) ProtoReflect() protoreflect.Message
func (*SayHiResponse_Data) Reset ¶
func (x *SayHiResponse_Data) Reset()
func (*SayHiResponse_Data) String ¶
func (x *SayHiResponse_Data) String() string
func (*SayHiResponse_Data) Validate ¶
func (m *SayHiResponse_Data) Validate() error
Validate checks the field values on SayHiResponse_Data 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 (*SayHiResponse_Data) ValidateAll ¶
func (m *SayHiResponse_Data) ValidateAll() error
ValidateAll checks the field values on SayHiResponse_Data 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 SayHiResponse_DataMultiError, or nil if none found.
type SayHiResponse_DataMultiError ¶
type SayHiResponse_DataMultiError []error
SayHiResponse_DataMultiError is an error wrapping multiple validation errors returned by SayHiResponse_Data.ValidateAll() if the designated constraints aren't met.
func (SayHiResponse_DataMultiError) AllErrors ¶
func (m SayHiResponse_DataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SayHiResponse_DataMultiError) Error ¶
func (m SayHiResponse_DataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SayHiResponse_DataValidationError ¶
type SayHiResponse_DataValidationError struct {
// contains filtered or unexported fields
}
SayHiResponse_DataValidationError is the validation error returned by SayHiResponse_Data.Validate if the designated constraints aren't met.
func (SayHiResponse_DataValidationError) Cause ¶
func (e SayHiResponse_DataValidationError) Cause() error
Cause function returns cause value.
func (SayHiResponse_DataValidationError) Error ¶
func (e SayHiResponse_DataValidationError) Error() string
Error satisfies the builtin error interface
func (SayHiResponse_DataValidationError) ErrorName ¶
func (e SayHiResponse_DataValidationError) ErrorName() string
ErrorName returns error name.
func (SayHiResponse_DataValidationError) Field ¶
func (e SayHiResponse_DataValidationError) Field() string
Field function returns field value.
func (SayHiResponse_DataValidationError) Key ¶
func (e SayHiResponse_DataValidationError) Key() bool
Key function returns key value.
func (SayHiResponse_DataValidationError) Reason ¶
func (e SayHiResponse_DataValidationError) Reason() string
Reason function returns reason value.
type Sex ¶
type Sex int32
Sex
func (Sex) Descriptor ¶
func (Sex) Descriptor() protoreflect.EnumDescriptor
func (Sex) EnumDescriptor
deprecated
func (Sex) Number ¶
func (x Sex) Number() protoreflect.EnumNumber
func (Sex) Type ¶
func (Sex) Type() protoreflect.EnumType
type UnimplementedGreeterServiceServer ¶
type UnimplementedGreeterServiceServer struct { }
UnimplementedGreeterServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedGreeterServiceServer) SayHello ¶
func (UnimplementedGreeterServiceServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
func (UnimplementedGreeterServiceServer) SayHi ¶
func (UnimplementedGreeterServiceServer) SayHi(context.Context, *SayHiRequest) (*SayHiResponse, error)
type UnsafeGreeterServiceServer ¶
type UnsafeGreeterServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServiceServer will result in compilation errors.