Documentation ¶
Index ¶
- Variables
- func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
- type CreateUserResponse
- func (*CreateUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserResponse) GetCode() uint64
- func (x *CreateUserResponse) GetMessage() string
- func (x *CreateUserResponse) GetUser() *User
- func (*CreateUserResponse) ProtoMessage()
- func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
- func (x *CreateUserResponse) Reset()
- func (x *CreateUserResponse) String() string
- func (m *CreateUserResponse) Validate() error
- func (m *CreateUserResponse) ValidateAll() error
- type CreateUserResponseMultiError
- type CreateUserResponseValidationError
- func (e CreateUserResponseValidationError) Cause() error
- func (e CreateUserResponseValidationError) Error() string
- func (e CreateUserResponseValidationError) ErrorName() string
- func (e CreateUserResponseValidationError) Field() string
- func (e CreateUserResponseValidationError) Key() bool
- func (e CreateUserResponseValidationError) Reason() string
- type UnimplementedUsersServer
- type UnsafeUsersServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetName() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserValidationError
- type UsersClient
- type UsersServer
Constants ¶
This section is empty.
Variables ¶
var File_users_proto protoreflect.FileDescriptor
var Users_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Users", HandlerType: (*UsersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _Users_CreateUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "users.proto", }
Users_ServiceDesc is the grpc.ServiceDesc for Users service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUsersServer ¶
func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer)
Types ¶
type CreateUserResponse ¶
type CreateUserResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Code uint64 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetCode ¶
func (x *CreateUserResponse) GetCode() uint64
func (*CreateUserResponse) GetMessage ¶
func (x *CreateUserResponse) GetMessage() string
func (*CreateUserResponse) GetUser ¶
func (x *CreateUserResponse) GetUser() *User
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
func (*CreateUserResponse) Validate ¶
func (m *CreateUserResponse) Validate() error
Validate checks the field values on CreateUserResponse 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 (*CreateUserResponse) ValidateAll ¶
func (m *CreateUserResponse) ValidateAll() error
ValidateAll checks the field values on CreateUserResponse 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 CreateUserResponseMultiError, or nil if none found.
type CreateUserResponseMultiError ¶
type CreateUserResponseMultiError []error
CreateUserResponseMultiError is an error wrapping multiple validation errors returned by CreateUserResponse.ValidateAll() if the designated constraints aren't met.
func (CreateUserResponseMultiError) AllErrors ¶
func (m CreateUserResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateUserResponseMultiError) Error ¶
func (m CreateUserResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateUserResponseValidationError ¶
type CreateUserResponseValidationError struct {
// contains filtered or unexported fields
}
CreateUserResponseValidationError is the validation error returned by CreateUserResponse.Validate if the designated constraints aren't met.
func (CreateUserResponseValidationError) Cause ¶
func (e CreateUserResponseValidationError) Cause() error
Cause function returns cause value.
func (CreateUserResponseValidationError) Error ¶
func (e CreateUserResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreateUserResponseValidationError) ErrorName ¶
func (e CreateUserResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreateUserResponseValidationError) Field ¶
func (e CreateUserResponseValidationError) Field() string
Field function returns field value.
func (CreateUserResponseValidationError) Key ¶
func (e CreateUserResponseValidationError) Key() bool
Key function returns key value.
func (CreateUserResponseValidationError) Reason ¶
func (e CreateUserResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServer) CreateUser ¶
func (UnimplementedUsersServer) CreateUser(context.Context, *User) (*CreateUserResponse, error)
type UnsafeUsersServer ¶
type UnsafeUsersServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
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.
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.
type UsersClient ¶
type UsersClient interface {
CreateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*CreateUserResponse, error)
}
UsersClient is the client API for Users 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 NewUsersClient ¶
func NewUsersClient(cc grpc.ClientConnInterface) UsersClient
type UsersServer ¶
type UsersServer interface { CreateUser(context.Context, *User) (*CreateUserResponse, error) // contains filtered or unexported methods }
UsersServer is the server API for Users service. All implementations must embed UnimplementedUsersServer for forward compatibility