Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServiceHTTPServer(r gin.IRouter, srv GreeterServiceHTTPServer)
- func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
- type GetUserReply
- func (*GetUserReply) Descriptor() ([]byte, []int)
- func (m *GetUserReply) GetUser() *User
- func (m *GetUserReply) Marshal() (dAtA []byte, err error)
- func (m *GetUserReply) MarshalTo(dAtA []byte) (int, error)
- func (m *GetUserReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetUserReply) ProtoMessage()
- func (m *GetUserReply) Reset()
- func (m *GetUserReply) Size() (n int)
- func (m *GetUserReply) String() string
- func (m *GetUserReply) Unmarshal(dAtA []byte) error
- func (m *GetUserReply) Validate() error
- func (m *GetUserReply) ValidateAll() error
- func (m *GetUserReply) XXX_DiscardUnknown()
- func (m *GetUserReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetUserReply) XXX_Merge(src proto.Message)
- func (m *GetUserReply) XXX_Size() int
- func (m *GetUserReply) XXX_Unmarshal(b []byte) error
- type GetUserReplyMultiError
- type GetUserReplyValidationError
- func (e GetUserReplyValidationError) Cause() error
- func (e GetUserReplyValidationError) Error() string
- func (e GetUserReplyValidationError) ErrorName() string
- func (e GetUserReplyValidationError) Field() string
- func (e GetUserReplyValidationError) Key() bool
- func (e GetUserReplyValidationError) Reason() string
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)
- func (m *GetUserRequest) GetUserId() int64
- func (m *GetUserRequest) Marshal() (dAtA []byte, err error)
- func (m *GetUserRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetUserRequest) ProtoMessage()
- func (m *GetUserRequest) Reset()
- func (m *GetUserRequest) Size() (n int)
- func (m *GetUserRequest) String() string
- func (m *GetUserRequest) Unmarshal(dAtA []byte) error
- func (m *GetUserRequest) Validate() error
- func (m *GetUserRequest) ValidateAll() error
- func (m *GetUserRequest) XXX_DiscardUnknown()
- func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetUserRequest) XXX_Merge(src proto.Message)
- func (m *GetUserRequest) XXX_Size() int
- func (m *GetUserRequest) XXX_Unmarshal(b []byte) error
- type GetUserRequestMultiError
- type GetUserRequestValidationError
- func (e GetUserRequestValidationError) Cause() error
- func (e GetUserRequestValidationError) Error() string
- func (e GetUserRequestValidationError) ErrorName() string
- func (e GetUserRequestValidationError) Field() string
- func (e GetUserRequestValidationError) Key() bool
- func (e GetUserRequestValidationError) Reason() string
- type GreeterService
- type GreeterServiceClient
- type GreeterServiceHTTPServer
- type GreeterServiceServer
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)
- func (m *HelloReply) GetMessage() string
- func (m *HelloReply) Marshal() (dAtA []byte, err error)
- func (m *HelloReply) MarshalTo(dAtA []byte) (int, error)
- func (m *HelloReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HelloReply) ProtoMessage()
- func (m *HelloReply) Reset()
- func (m *HelloReply) Size() (n int)
- func (m *HelloReply) String() string
- func (m *HelloReply) Unmarshal(dAtA []byte) error
- func (m *HelloReply) Validate() error
- func (m *HelloReply) ValidateAll() error
- func (m *HelloReply) XXX_DiscardUnknown()
- func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloReply) XXX_Merge(src proto.Message)
- func (m *HelloReply) XXX_Size() int
- func (m *HelloReply) XXX_Unmarshal(b []byte) error
- type HelloReplyMultiError
- type HelloReplyValidationError
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)
- func (m *HelloRequest) GetName() string
- func (m *HelloRequest) Marshal() (dAtA []byte, err error)
- func (m *HelloRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *HelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HelloRequest) ProtoMessage()
- func (m *HelloRequest) Reset()
- func (m *HelloRequest) Size() (n int)
- func (m *HelloRequest) String() string
- func (m *HelloRequest) Unmarshal(dAtA []byte) error
- func (m *HelloRequest) Validate() error
- func (m *HelloRequest) ValidateAll() error
- func (m *HelloRequest) XXX_DiscardUnknown()
- func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloRequest) XXX_Merge(src proto.Message)
- func (m *HelloRequest) XXX_Size() int
- func (m *HelloRequest) XXX_Unmarshal(b []byte) error
- type HelloRequestMultiError
- type HelloRequestValidationError
- func (e HelloRequestValidationError) Cause() error
- func (e HelloRequestValidationError) Error() string
- func (e HelloRequestValidationError) ErrorName() string
- func (e HelloRequestValidationError) Field() string
- func (e HelloRequestValidationError) Key() bool
- func (e HelloRequestValidationError) Reason() string
- type UnimplementedGreeterServiceServer
- type UnsafeGreeterServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetAvatar() string
- func (m *User) GetBio() string
- func (m *User) GetBirthday() string
- func (m *User) GetCreatedAt() int64
- func (m *User) GetEmail() string
- func (m *User) GetGender() int32
- func (m *User) GetId() int64
- func (m *User) GetLastLoginAt() int64
- func (m *User) GetNickname() string
- func (m *User) GetPhone() string
- func (m *User) GetStatus() int32
- func (m *User) GetUpdatedAt() int64
- func (m *User) GetUsername() string
- func (m *User) Marshal() (dAtA []byte, err error)
- func (m *User) MarshalTo(dAtA []byte) (int, error)
- func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) Size() (n int)
- func (m *User) String() string
- func (m *User) Unmarshal(dAtA []byte) error
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserMultiError
- type UserValidationError
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthGreeter = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGreeter = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGreeter = fmt.Errorf("proto: unexpected end of group") )
var GreeterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.greeter.v1.GreeterService", HandlerType: (*GreeterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _GreeterService_SayHello_Handler, }, { MethodName: "GetUserInfo", Handler: _GreeterService_GetUserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/helloworld/greeter/v1/greeter.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)
Functions ¶
func RegisterGreeterServiceHTTPServer ¶
func RegisterGreeterServiceHTTPServer(r gin.IRouter, srv GreeterServiceHTTPServer)
func RegisterGreeterServiceServer ¶
func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
Types ¶
type GetUserReply ¶
type GetUserReply struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetUserReply) Descriptor ¶
func (*GetUserReply) Descriptor() ([]byte, []int)
func (*GetUserReply) GetUser ¶
func (m *GetUserReply) GetUser() *User
func (*GetUserReply) Marshal ¶
func (m *GetUserReply) Marshal() (dAtA []byte, err error)
func (*GetUserReply) MarshalToSizedBuffer ¶
func (m *GetUserReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetUserReply) ProtoMessage ¶
func (*GetUserReply) ProtoMessage()
func (*GetUserReply) Reset ¶
func (m *GetUserReply) Reset()
func (*GetUserReply) Size ¶
func (m *GetUserReply) Size() (n int)
func (*GetUserReply) String ¶
func (m *GetUserReply) String() string
func (*GetUserReply) Unmarshal ¶
func (m *GetUserReply) Unmarshal(dAtA []byte) error
func (*GetUserReply) Validate ¶
func (m *GetUserReply) Validate() error
Validate checks the field values on GetUserReply 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 (*GetUserReply) ValidateAll ¶
func (m *GetUserReply) ValidateAll() error
ValidateAll checks the field values on GetUserReply 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 GetUserReplyMultiError, or nil if none found.
func (*GetUserReply) XXX_DiscardUnknown ¶
func (m *GetUserReply) XXX_DiscardUnknown()
func (*GetUserReply) XXX_Marshal ¶
func (m *GetUserReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUserReply) XXX_Merge ¶
func (m *GetUserReply) XXX_Merge(src proto.Message)
func (*GetUserReply) XXX_Size ¶
func (m *GetUserReply) XXX_Size() int
func (*GetUserReply) XXX_Unmarshal ¶
func (m *GetUserReply) XXX_Unmarshal(b []byte) error
type GetUserReplyMultiError ¶
type GetUserReplyMultiError []error
GetUserReplyMultiError is an error wrapping multiple validation errors returned by GetUserReply.ValidateAll() if the designated constraints aren't met.
func (GetUserReplyMultiError) AllErrors ¶
func (m GetUserReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserReplyMultiError) Error ¶
func (m GetUserReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserReplyValidationError ¶
type GetUserReplyValidationError struct {
// contains filtered or unexported fields
}
GetUserReplyValidationError is the validation error returned by GetUserReply.Validate if the designated constraints aren't met.
func (GetUserReplyValidationError) Cause ¶
func (e GetUserReplyValidationError) Cause() error
Cause function returns cause value.
func (GetUserReplyValidationError) Error ¶
func (e GetUserReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserReplyValidationError) ErrorName ¶
func (e GetUserReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserReplyValidationError) Field ¶
func (e GetUserReplyValidationError) Field() string
Field function returns field value.
func (GetUserReplyValidationError) Key ¶
func (e GetUserReplyValidationError) Key() bool
Key function returns key value.
func (GetUserReplyValidationError) Reason ¶
func (e GetUserReplyValidationError) Reason() string
Reason function returns reason value.
type GetUserRequest ¶
type GetUserRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" form:"user_id"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetUserRequest) Descriptor ¶
func (*GetUserRequest) Descriptor() ([]byte, []int)
func (*GetUserRequest) GetUserId ¶
func (m *GetUserRequest) GetUserId() int64
func (*GetUserRequest) Marshal ¶
func (m *GetUserRequest) Marshal() (dAtA []byte, err error)
func (*GetUserRequest) MarshalToSizedBuffer ¶
func (m *GetUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) Reset ¶
func (m *GetUserRequest) Reset()
func (*GetUserRequest) Size ¶
func (m *GetUserRequest) Size() (n int)
func (*GetUserRequest) String ¶
func (m *GetUserRequest) String() string
func (*GetUserRequest) Unmarshal ¶
func (m *GetUserRequest) Unmarshal(dAtA []byte) error
func (*GetUserRequest) Validate ¶
func (m *GetUserRequest) Validate() error
Validate checks the field values on GetUserRequest 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 (*GetUserRequest) ValidateAll ¶
func (m *GetUserRequest) ValidateAll() error
ValidateAll checks the field values on GetUserRequest 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 GetUserRequestMultiError, or nil if none found.
func (*GetUserRequest) XXX_DiscardUnknown ¶
func (m *GetUserRequest) XXX_DiscardUnknown()
func (*GetUserRequest) XXX_Marshal ¶
func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUserRequest) XXX_Merge ¶
func (m *GetUserRequest) XXX_Merge(src proto.Message)
func (*GetUserRequest) XXX_Size ¶
func (m *GetUserRequest) XXX_Size() int
func (*GetUserRequest) XXX_Unmarshal ¶
func (m *GetUserRequest) XXX_Unmarshal(b []byte) error
type GetUserRequestMultiError ¶
type GetUserRequestMultiError []error
GetUserRequestMultiError is an error wrapping multiple validation errors returned by GetUserRequest.ValidateAll() if the designated constraints aren't met.
func (GetUserRequestMultiError) AllErrors ¶
func (m GetUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserRequestMultiError) Error ¶
func (m GetUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserRequestValidationError ¶
type GetUserRequestValidationError struct {
// contains filtered or unexported fields
}
GetUserRequestValidationError is the validation error returned by GetUserRequest.Validate if the designated constraints aren't met.
func (GetUserRequestValidationError) Cause ¶
func (e GetUserRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserRequestValidationError) Error ¶
func (e GetUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserRequestValidationError) ErrorName ¶
func (e GetUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserRequestValidationError) Field ¶
func (e GetUserRequestValidationError) Field() string
Field function returns field value.
func (GetUserRequestValidationError) Key ¶
func (e GetUserRequestValidationError) Key() bool
Key function returns key value.
func (GetUserRequestValidationError) Reason ¶
func (e GetUserRequestValidationError) Reason() string
Reason function returns reason value.
type GreeterService ¶
type GreeterService struct {
// contains filtered or unexported fields
}
func (*GreeterService) GetUserInfo_0 ¶
func (s *GreeterService) GetUserInfo_0(ctx *gin.Context)
func (*GreeterService) RegisterService ¶
func (s *GreeterService) RegisterService()
func (*GreeterService) SayHello_0 ¶
func (s *GreeterService) SayHello_0(ctx *gin.Context)
type GreeterServiceClient ¶
type GreeterServiceClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) GetUserInfo(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserReply, 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 GreeterServiceHTTPServer ¶
type GreeterServiceHTTPServer interface { GetUserInfo(context.Context, *GetUserRequest) (*GetUserReply, error) SayHello(context.Context, *HelloRequest) (*HelloReply, error) }
type GreeterServiceServer ¶
type GreeterServiceServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) GetUserInfo(context.Context, *GetUserRequest) (*GetUserReply, error) // contains filtered or unexported methods }
GreeterServiceServer is the server API for GreeterService service. All implementations must embed UnimplementedGreeterServiceServer for forward compatibility
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message containing the greetings
func (*HelloReply) Descriptor ¶
func (*HelloReply) Descriptor() ([]byte, []int)
func (*HelloReply) GetMessage ¶
func (m *HelloReply) GetMessage() string
func (*HelloReply) Marshal ¶
func (m *HelloReply) Marshal() (dAtA []byte, err error)
func (*HelloReply) MarshalToSizedBuffer ¶
func (m *HelloReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) Reset ¶
func (m *HelloReply) Reset()
func (*HelloReply) Size ¶
func (m *HelloReply) Size() (n int)
func (*HelloReply) String ¶
func (m *HelloReply) String() string
func (*HelloReply) Unmarshal ¶
func (m *HelloReply) Unmarshal(dAtA []byte) error
func (*HelloReply) Validate ¶
func (m *HelloReply) Validate() error
Validate checks the field values on HelloReply 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 (*HelloReply) ValidateAll ¶
func (m *HelloReply) ValidateAll() error
ValidateAll checks the field values on HelloReply 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 HelloReplyMultiError, or nil if none found.
func (*HelloReply) XXX_DiscardUnknown ¶
func (m *HelloReply) XXX_DiscardUnknown()
func (*HelloReply) XXX_Marshal ¶
func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloReply) XXX_Merge ¶
func (m *HelloReply) XXX_Merge(src proto.Message)
func (*HelloReply) XXX_Size ¶
func (m *HelloReply) XXX_Size() int
func (*HelloReply) XXX_Unmarshal ¶
func (m *HelloReply) XXX_Unmarshal(b []byte) error
type HelloReplyMultiError ¶
type HelloReplyMultiError []error
HelloReplyMultiError is an error wrapping multiple validation errors returned by HelloReply.ValidateAll() if the designated constraints aren't met.
func (HelloReplyMultiError) AllErrors ¶
func (m HelloReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HelloReplyMultiError) Error ¶
func (m HelloReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HelloReplyValidationError ¶
type HelloReplyValidationError struct {
// contains filtered or unexported fields
}
HelloReplyValidationError is the validation error returned by HelloReply.Validate if the designated constraints aren't met.
func (HelloReplyValidationError) Cause ¶
func (e HelloReplyValidationError) Cause() error
Cause function returns cause value.
func (HelloReplyValidationError) Error ¶
func (e HelloReplyValidationError) Error() string
Error satisfies the builtin error interface
func (HelloReplyValidationError) ErrorName ¶
func (e HelloReplyValidationError) ErrorName() string
ErrorName returns error name.
func (HelloReplyValidationError) Field ¶
func (e HelloReplyValidationError) Field() string
Field function returns field value.
func (HelloReplyValidationError) Key ¶
func (e HelloReplyValidationError) Key() bool
Key function returns key value.
func (HelloReplyValidationError) Reason ¶
func (e HelloReplyValidationError) Reason() string
Reason function returns reason value.
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message containing the user's name.
func (*HelloRequest) Descriptor ¶
func (*HelloRequest) Descriptor() ([]byte, []int)
func (*HelloRequest) GetName ¶
func (m *HelloRequest) GetName() string
func (*HelloRequest) Marshal ¶
func (m *HelloRequest) Marshal() (dAtA []byte, err error)
func (*HelloRequest) MarshalToSizedBuffer ¶
func (m *HelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) Reset ¶
func (m *HelloRequest) Reset()
func (*HelloRequest) Size ¶
func (m *HelloRequest) Size() (n int)
func (*HelloRequest) String ¶
func (m *HelloRequest) String() string
func (*HelloRequest) Unmarshal ¶
func (m *HelloRequest) Unmarshal(dAtA []byte) error
func (*HelloRequest) Validate ¶
func (m *HelloRequest) Validate() error
Validate checks the field values on HelloRequest 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 (*HelloRequest) ValidateAll ¶
func (m *HelloRequest) ValidateAll() error
ValidateAll checks the field values on HelloRequest 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 HelloRequestMultiError, or nil if none found.
func (*HelloRequest) XXX_DiscardUnknown ¶
func (m *HelloRequest) XXX_DiscardUnknown()
func (*HelloRequest) XXX_Marshal ¶
func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloRequest) XXX_Merge ¶
func (m *HelloRequest) XXX_Merge(src proto.Message)
func (*HelloRequest) XXX_Size ¶
func (m *HelloRequest) XXX_Size() int
func (*HelloRequest) XXX_Unmarshal ¶
func (m *HelloRequest) XXX_Unmarshal(b []byte) error
type HelloRequestMultiError ¶
type HelloRequestMultiError []error
HelloRequestMultiError is an error wrapping multiple validation errors returned by HelloRequest.ValidateAll() if the designated constraints aren't met.
func (HelloRequestMultiError) AllErrors ¶
func (m HelloRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HelloRequestMultiError) Error ¶
func (m HelloRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HelloRequestValidationError ¶
type HelloRequestValidationError struct {
// contains filtered or unexported fields
}
HelloRequestValidationError is the validation error returned by HelloRequest.Validate if the designated constraints aren't met.
func (HelloRequestValidationError) Cause ¶
func (e HelloRequestValidationError) Cause() error
Cause function returns cause value.
func (HelloRequestValidationError) Error ¶
func (e HelloRequestValidationError) Error() string
Error satisfies the builtin error interface
func (HelloRequestValidationError) ErrorName ¶
func (e HelloRequestValidationError) ErrorName() string
ErrorName returns error name.
func (HelloRequestValidationError) Field ¶
func (e HelloRequestValidationError) Field() string
Field function returns field value.
func (HelloRequestValidationError) Key ¶
func (e HelloRequestValidationError) Key() bool
Key function returns key value.
func (HelloRequestValidationError) Reason ¶
func (e HelloRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedGreeterServiceServer ¶
type UnimplementedGreeterServiceServer struct { }
UnimplementedGreeterServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServiceServer) GetUserInfo ¶
func (UnimplementedGreeterServiceServer) GetUserInfo(context.Context, *GetUserRequest) (*GetUserReply, error)
func (UnimplementedGreeterServiceServer) SayHello ¶
func (UnimplementedGreeterServiceServer) SayHello(context.Context, *HelloRequest) (*HelloReply, 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.
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"form:\"username\""` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` LastLoginAt int64 `protobuf:"varint,5,opt,name=last_login_at,json=lastLoginAt,proto3" json:"last_login_at,omitempty"` Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` Nickname string `protobuf:"bytes,7,opt,name=nickname,proto3" json:"form:\"nickname\""` Avatar string `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar,omitempty"` Gender int32 `protobuf:"varint,9,opt,name=gender,proto3" json:"gender,omitempty"` Birthday string `protobuf:"bytes,10,opt,name=birthday,proto3" json:"birthday,omitempty"` Bio string `protobuf:"bytes,11,opt,name=bio,proto3" json:"bio,omitempty"` CreatedAt int64 `protobuf:"varint,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) GetBirthday ¶
func (*User) GetCreatedAt ¶
func (*User) GetLastLoginAt ¶
func (*User) GetNickname ¶
func (*User) GetUpdatedAt ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) Validate ¶
Validate checks the field values on User 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 (*User) ValidateAll ¶
ValidateAll checks the field values on User 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 UserMultiError, or nil if none found.
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.