Documentation
¶
Overview ¶
Package user_v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUserV1Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserV1Client) error
- func RegisterUserV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserV1Server) error
- func RegisterUserV1Server(s grpc.ServiceRegistrar, srv UserV1Server)
- type CheckUsersExistenceRequest
- func (*CheckUsersExistenceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckUsersExistenceRequest) GetUsernames() []string
- func (*CheckUsersExistenceRequest) ProtoMessage()
- func (x *CheckUsersExistenceRequest) ProtoReflect() protoreflect.Message
- func (x *CheckUsersExistenceRequest) Reset()
- func (x *CheckUsersExistenceRequest) String() string
- func (m *CheckUsersExistenceRequest) Validate() error
- func (m *CheckUsersExistenceRequest) ValidateAll() error
- type CheckUsersExistenceRequestMultiError
- type CheckUsersExistenceRequestValidationError
- func (e CheckUsersExistenceRequestValidationError) Cause() error
- func (e CheckUsersExistenceRequestValidationError) Error() string
- func (e CheckUsersExistenceRequestValidationError) ErrorName() string
- func (e CheckUsersExistenceRequestValidationError) Field() string
- func (e CheckUsersExistenceRequestValidationError) Key() bool
- func (e CheckUsersExistenceRequestValidationError) Reason() string
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetInfo() *UserCreateInfo
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- func (m *CreateRequest) Validate() error
- func (m *CreateRequest) ValidateAll() error
- type CreateRequestMultiError
- type CreateRequestValidationError
- func (e CreateRequestValidationError) Cause() error
- func (e CreateRequestValidationError) Error() string
- func (e CreateRequestValidationError) ErrorName() string
- func (e CreateRequestValidationError) Field() string
- func (e CreateRequestValidationError) Key() bool
- func (e CreateRequestValidationError) Reason() string
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateResponse) GetId() int64
- func (*CreateResponse) ProtoMessage()
- func (x *CreateResponse) ProtoReflect() protoreflect.Message
- func (x *CreateResponse) Reset()
- func (x *CreateResponse) String() string
- func (m *CreateResponse) Validate() error
- func (m *CreateResponse) ValidateAll() error
- type CreateResponseMultiError
- type CreateResponseValidationError
- func (e CreateResponseValidationError) Cause() error
- func (e CreateResponseValidationError) Error() string
- func (e CreateResponseValidationError) ErrorName() string
- func (e CreateResponseValidationError) Field() string
- func (e CreateResponseValidationError) Key() bool
- func (e CreateResponseValidationError) Reason() string
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetId() int64
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- func (m *DeleteRequest) Validate() error
- func (m *DeleteRequest) ValidateAll() error
- type DeleteRequestMultiError
- type DeleteRequestValidationError
- func (e DeleteRequestValidationError) Cause() error
- func (e DeleteRequestValidationError) Error() string
- func (e DeleteRequestValidationError) ErrorName() string
- func (e DeleteRequestValidationError) Field() string
- func (e DeleteRequestValidationError) Key() bool
- func (e DeleteRequestValidationError) Reason() string
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetId() int64
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- func (m *GetRequest) Validate() error
- func (m *GetRequest) ValidateAll() error
- type GetRequestMultiError
- type GetRequestValidationError
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetUser() *User
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- func (m *GetResponse) Validate() error
- func (m *GetResponse) ValidateAll() error
- type GetResponseMultiError
- type GetResponseValidationError
- func (e GetResponseValidationError) Cause() error
- func (e GetResponseValidationError) Error() string
- func (e GetResponseValidationError) ErrorName() string
- func (e GetResponseValidationError) Field() string
- func (e GetResponseValidationError) Key() bool
- func (e GetResponseValidationError) Reason() string
- type Role
- type UnimplementedUserV1Server
- func (UnimplementedUserV1Server) CheckUsersExistence(context.Context, *CheckUsersExistenceRequest) (*emptypb.Empty, error)
- func (UnimplementedUserV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedUserV1Server) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedUserV1Server) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedUserV1Server) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
- type UnsafeUserV1Server
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetId() int64
- func (x *UpdateRequest) GetInfo() *UpdateUserInfo
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- func (m *UpdateRequest) Validate() error
- func (m *UpdateRequest) ValidateAll() error
- type UpdateRequestMultiError
- type UpdateRequestValidationError
- func (e UpdateRequestValidationError) Cause() error
- func (e UpdateRequestValidationError) Error() string
- func (e UpdateRequestValidationError) ErrorName() string
- func (e UpdateRequestValidationError) Field() string
- func (e UpdateRequestValidationError) Key() bool
- func (e UpdateRequestValidationError) Reason() string
- type UpdateUserInfo
- func (*UpdateUserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserInfo) GetEmail() *wrapperspb.StringValue
- func (x *UpdateUserInfo) GetUsername() *wrapperspb.StringValue
- func (*UpdateUserInfo) ProtoMessage()
- func (x *UpdateUserInfo) ProtoReflect() protoreflect.Message
- func (x *UpdateUserInfo) Reset()
- func (x *UpdateUserInfo) String() string
- func (m *UpdateUserInfo) Validate() error
- func (m *UpdateUserInfo) ValidateAll() error
- type UpdateUserInfoMultiError
- type UpdateUserInfoValidationError
- func (e UpdateUserInfoValidationError) Cause() error
- func (e UpdateUserInfoValidationError) Error() string
- func (e UpdateUserInfoValidationError) ErrorName() string
- func (e UpdateUserInfoValidationError) Field() string
- func (e UpdateUserInfoValidationError) Key() bool
- func (e UpdateUserInfoValidationError) Reason() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetRole() Role
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (x *User) GetUsername() 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 UserCreateInfo
- func (*UserCreateInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserCreateInfo) GetEmail() string
- func (x *UserCreateInfo) GetPassword() string
- func (x *UserCreateInfo) GetPasswordConfirm() string
- func (x *UserCreateInfo) GetRole() Role
- func (x *UserCreateInfo) GetUsername() string
- func (*UserCreateInfo) ProtoMessage()
- func (x *UserCreateInfo) ProtoReflect() protoreflect.Message
- func (x *UserCreateInfo) Reset()
- func (x *UserCreateInfo) String() string
- func (m *UserCreateInfo) Validate() error
- func (m *UserCreateInfo) ValidateAll() error
- type UserCreateInfoMultiError
- type UserCreateInfoValidationError
- func (e UserCreateInfoValidationError) Cause() error
- func (e UserCreateInfoValidationError) Error() string
- func (e UserCreateInfoValidationError) ErrorName() string
- func (e UserCreateInfoValidationError) Field() string
- func (e UserCreateInfoValidationError) Key() bool
- func (e UserCreateInfoValidationError) Reason() string
- type UserMultiError
- type UserV1Client
- type UserV1Server
- type UserValidationError
Constants ¶
This section is empty.
Variables ¶
var ( Role_name = map[int32]string{ 0: "USER", 1: "ADMIN", } Role_value = map[string]int32{ "USER": 0, "ADMIN": 1, } )
Enum value maps for Role.
var File_user_proto protoreflect.FileDescriptor
var UserV1_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user_v1.UserV1", HandlerType: (*UserV1Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserV1_Create_Handler, }, { MethodName: "Get", Handler: _UserV1_Get_Handler, }, { MethodName: "Update", Handler: _UserV1_Update_Handler, }, { MethodName: "Delete", Handler: _UserV1_Delete_Handler, }, { MethodName: "CheckUsersExistence", Handler: _UserV1_CheckUsersExistence_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserV1_ServiceDesc is the grpc.ServiceDesc for UserV1 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserV1Handler ¶
RegisterUserV1Handler registers the http handlers for service UserV1 to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserV1HandlerClient ¶
func RegisterUserV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserV1Client) error
RegisterUserV1HandlerClient registers the http handlers for service UserV1 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserV1Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserV1Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserV1Client" to call the correct interceptors.
func RegisterUserV1HandlerFromEndpoint ¶
func RegisterUserV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserV1HandlerFromEndpoint is same as RegisterUserV1Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserV1HandlerServer ¶
func RegisterUserV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserV1Server) error
RegisterUserV1HandlerServer registers the http handlers for service UserV1 to "mux". UnaryRPC :call UserV1Server directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserV1HandlerFromEndpoint instead.
func RegisterUserV1Server ¶
func RegisterUserV1Server(s grpc.ServiceRegistrar, srv UserV1Server)
Types ¶
type CheckUsersExistenceRequest ¶
type CheckUsersExistenceRequest struct { Usernames []string `protobuf:"bytes,1,rep,name=usernames,proto3" json:"usernames,omitempty"` // contains filtered or unexported fields }
func (*CheckUsersExistenceRequest) Descriptor
deprecated
func (*CheckUsersExistenceRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckUsersExistenceRequest.ProtoReflect.Descriptor instead.
func (*CheckUsersExistenceRequest) GetUsernames ¶
func (x *CheckUsersExistenceRequest) GetUsernames() []string
func (*CheckUsersExistenceRequest) ProtoMessage ¶
func (*CheckUsersExistenceRequest) ProtoMessage()
func (*CheckUsersExistenceRequest) ProtoReflect ¶
func (x *CheckUsersExistenceRequest) ProtoReflect() protoreflect.Message
func (*CheckUsersExistenceRequest) Reset ¶
func (x *CheckUsersExistenceRequest) Reset()
func (*CheckUsersExistenceRequest) String ¶
func (x *CheckUsersExistenceRequest) String() string
func (*CheckUsersExistenceRequest) Validate ¶
func (m *CheckUsersExistenceRequest) Validate() error
Validate checks the field values on CheckUsersExistenceRequest 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 (*CheckUsersExistenceRequest) ValidateAll ¶
func (m *CheckUsersExistenceRequest) ValidateAll() error
ValidateAll checks the field values on CheckUsersExistenceRequest 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 CheckUsersExistenceRequestMultiError, or nil if none found.
type CheckUsersExistenceRequestMultiError ¶
type CheckUsersExistenceRequestMultiError []error
CheckUsersExistenceRequestMultiError is an error wrapping multiple validation errors returned by CheckUsersExistenceRequest.ValidateAll() if the designated constraints aren't met.
func (CheckUsersExistenceRequestMultiError) AllErrors ¶
func (m CheckUsersExistenceRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CheckUsersExistenceRequestMultiError) Error ¶
func (m CheckUsersExistenceRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CheckUsersExistenceRequestValidationError ¶
type CheckUsersExistenceRequestValidationError struct {
// contains filtered or unexported fields
}
CheckUsersExistenceRequestValidationError is the validation error returned by CheckUsersExistenceRequest.Validate if the designated constraints aren't met.
func (CheckUsersExistenceRequestValidationError) Cause ¶
func (e CheckUsersExistenceRequestValidationError) Cause() error
Cause function returns cause value.
func (CheckUsersExistenceRequestValidationError) Error ¶
func (e CheckUsersExistenceRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CheckUsersExistenceRequestValidationError) ErrorName ¶
func (e CheckUsersExistenceRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CheckUsersExistenceRequestValidationError) Field ¶
func (e CheckUsersExistenceRequestValidationError) Field() string
Field function returns field value.
func (CheckUsersExistenceRequestValidationError) Key ¶
func (e CheckUsersExistenceRequestValidationError) Key() bool
Key function returns key value.
func (CheckUsersExistenceRequestValidationError) Reason ¶
func (e CheckUsersExistenceRequestValidationError) Reason() string
Reason function returns reason value.
type CreateRequest ¶
type CreateRequest struct { Info *UserCreateInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetInfo ¶
func (x *CreateRequest) GetInfo() *UserCreateInfo
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
func (*CreateRequest) Validate ¶
func (m *CreateRequest) Validate() error
Validate checks the field values on CreateRequest 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 (*CreateRequest) ValidateAll ¶
func (m *CreateRequest) ValidateAll() error
ValidateAll checks the field values on CreateRequest 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 CreateRequestMultiError, or nil if none found.
type CreateRequestMultiError ¶
type CreateRequestMultiError []error
CreateRequestMultiError is an error wrapping multiple validation errors returned by CreateRequest.ValidateAll() if the designated constraints aren't met.
func (CreateRequestMultiError) AllErrors ¶
func (m CreateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateRequestMultiError) Error ¶
func (m CreateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateRequestValidationError ¶
type CreateRequestValidationError struct {
// contains filtered or unexported fields
}
CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.
func (CreateRequestValidationError) Cause ¶
func (e CreateRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateRequestValidationError) Error ¶
func (e CreateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateRequestValidationError) ErrorName ¶
func (e CreateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateRequestValidationError) Field ¶
func (e CreateRequestValidationError) Field() string
Field function returns field value.
func (CreateRequestValidationError) Key ¶
func (e CreateRequestValidationError) Key() bool
Key function returns key value.
func (CreateRequestValidationError) Reason ¶
func (e CreateRequestValidationError) Reason() string
Reason function returns reason value.
type CreateResponse ¶
type CreateResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetId ¶
func (x *CreateResponse) GetId() int64
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
func (*CreateResponse) Validate ¶
func (m *CreateResponse) Validate() error
Validate checks the field values on CreateResponse 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 (*CreateResponse) ValidateAll ¶
func (m *CreateResponse) ValidateAll() error
ValidateAll checks the field values on CreateResponse 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 CreateResponseMultiError, or nil if none found.
type CreateResponseMultiError ¶
type CreateResponseMultiError []error
CreateResponseMultiError is an error wrapping multiple validation errors returned by CreateResponse.ValidateAll() if the designated constraints aren't met.
func (CreateResponseMultiError) AllErrors ¶
func (m CreateResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateResponseMultiError) Error ¶
func (m CreateResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateResponseValidationError ¶
type CreateResponseValidationError struct {
// contains filtered or unexported fields
}
CreateResponseValidationError is the validation error returned by CreateResponse.Validate if the designated constraints aren't met.
func (CreateResponseValidationError) Cause ¶
func (e CreateResponseValidationError) Cause() error
Cause function returns cause value.
func (CreateResponseValidationError) Error ¶
func (e CreateResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CreateResponseValidationError) ErrorName ¶
func (e CreateResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CreateResponseValidationError) Field ¶
func (e CreateResponseValidationError) Field() string
Field function returns field value.
func (CreateResponseValidationError) Key ¶
func (e CreateResponseValidationError) Key() bool
Key function returns key value.
func (CreateResponseValidationError) Reason ¶
func (e CreateResponseValidationError) Reason() string
Reason function returns reason value.
type DeleteRequest ¶
type DeleteRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() int64
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
func (*DeleteRequest) Validate ¶
func (m *DeleteRequest) Validate() error
Validate checks the field values on DeleteRequest 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 (*DeleteRequest) ValidateAll ¶
func (m *DeleteRequest) ValidateAll() error
ValidateAll checks the field values on DeleteRequest 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 DeleteRequestMultiError, or nil if none found.
type DeleteRequestMultiError ¶
type DeleteRequestMultiError []error
DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteRequestMultiError) AllErrors ¶
func (m DeleteRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteRequestMultiError) Error ¶
func (m DeleteRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteRequestValidationError ¶
type DeleteRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.
func (DeleteRequestValidationError) Cause ¶
func (e DeleteRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteRequestValidationError) Error ¶
func (e DeleteRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteRequestValidationError) ErrorName ¶
func (e DeleteRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteRequestValidationError) Field ¶
func (e DeleteRequestValidationError) Field() string
Field function returns field value.
func (DeleteRequestValidationError) Key ¶
func (e DeleteRequestValidationError) Key() bool
Key function returns key value.
func (DeleteRequestValidationError) Reason ¶
func (e DeleteRequestValidationError) Reason() string
Reason function returns reason value.
type GetRequest ¶
type GetRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() int64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
func (*GetRequest) Validate ¶
func (m *GetRequest) Validate() error
Validate checks the field values on GetRequest 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 (*GetRequest) ValidateAll ¶
func (m *GetRequest) ValidateAll() error
ValidateAll checks the field values on GetRequest 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 GetRequestMultiError, or nil if none found.
type GetRequestMultiError ¶
type GetRequestMultiError []error
GetRequestMultiError is an error wrapping multiple validation errors returned by GetRequest.ValidateAll() if the designated constraints aren't met.
func (GetRequestMultiError) AllErrors ¶
func (m GetRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetRequestMultiError) Error ¶
func (m GetRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetRequestValidationError ¶
type GetRequestValidationError struct {
// contains filtered or unexported fields
}
GetRequestValidationError is the validation error returned by GetRequest.Validate if the designated constraints aren't met.
func (GetRequestValidationError) Cause ¶
func (e GetRequestValidationError) Cause() error
Cause function returns cause value.
func (GetRequestValidationError) Error ¶
func (e GetRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetRequestValidationError) ErrorName ¶
func (e GetRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetRequestValidationError) Field ¶
func (e GetRequestValidationError) Field() string
Field function returns field value.
func (GetRequestValidationError) Key ¶
func (e GetRequestValidationError) Key() bool
Key function returns key value.
func (GetRequestValidationError) Reason ¶
func (e GetRequestValidationError) Reason() string
Reason function returns reason value.
type GetResponse ¶
type GetResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetUser ¶
func (x *GetResponse) GetUser() *User
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
func (*GetResponse) Validate ¶
func (m *GetResponse) Validate() error
Validate checks the field values on GetResponse 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 (*GetResponse) ValidateAll ¶
func (m *GetResponse) ValidateAll() error
ValidateAll checks the field values on GetResponse 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 GetResponseMultiError, or nil if none found.
type GetResponseMultiError ¶
type GetResponseMultiError []error
GetResponseMultiError is an error wrapping multiple validation errors returned by GetResponse.ValidateAll() if the designated constraints aren't met.
func (GetResponseMultiError) AllErrors ¶
func (m GetResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetResponseMultiError) Error ¶
func (m GetResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetResponseValidationError ¶
type GetResponseValidationError struct {
// contains filtered or unexported fields
}
GetResponseValidationError is the validation error returned by GetResponse.Validate if the designated constraints aren't met.
func (GetResponseValidationError) Cause ¶
func (e GetResponseValidationError) Cause() error
Cause function returns cause value.
func (GetResponseValidationError) Error ¶
func (e GetResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetResponseValidationError) ErrorName ¶
func (e GetResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetResponseValidationError) Field ¶
func (e GetResponseValidationError) Field() string
Field function returns field value.
func (GetResponseValidationError) Key ¶
func (e GetResponseValidationError) Key() bool
Key function returns key value.
func (GetResponseValidationError) Reason ¶
func (e GetResponseValidationError) Reason() string
Reason function returns reason value.
type Role ¶
type Role int32
func (Role) Descriptor ¶
func (Role) Descriptor() protoreflect.EnumDescriptor
func (Role) EnumDescriptor
deprecated
func (Role) Number ¶
func (x Role) Number() protoreflect.EnumNumber
func (Role) Type ¶
func (Role) Type() protoreflect.EnumType
type UnimplementedUserV1Server ¶
type UnimplementedUserV1Server struct { }
UnimplementedUserV1Server must be embedded to have forward compatible implementations.
func (UnimplementedUserV1Server) CheckUsersExistence ¶
func (UnimplementedUserV1Server) CheckUsersExistence(context.Context, *CheckUsersExistenceRequest) (*emptypb.Empty, error)
func (UnimplementedUserV1Server) Create ¶
func (UnimplementedUserV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedUserV1Server) Delete ¶
func (UnimplementedUserV1Server) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedUserV1Server) Get ¶
func (UnimplementedUserV1Server) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedUserV1Server) Update ¶
func (UnimplementedUserV1Server) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
type UnsafeUserV1Server ¶
type UnsafeUserV1Server interface {
// contains filtered or unexported methods
}
UnsafeUserV1Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserV1Server will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Info *UpdateUserInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() int64
func (*UpdateRequest) GetInfo ¶
func (x *UpdateRequest) GetInfo() *UpdateUserInfo
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
func (*UpdateRequest) Validate ¶
func (m *UpdateRequest) Validate() error
Validate checks the field values on UpdateRequest 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 (*UpdateRequest) ValidateAll ¶
func (m *UpdateRequest) ValidateAll() error
ValidateAll checks the field values on UpdateRequest 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 UpdateRequestMultiError, or nil if none found.
type UpdateRequestMultiError ¶
type UpdateRequestMultiError []error
UpdateRequestMultiError is an error wrapping multiple validation errors returned by UpdateRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateRequestMultiError) AllErrors ¶
func (m UpdateRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateRequestMultiError) Error ¶
func (m UpdateRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateRequestValidationError ¶
type UpdateRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateRequestValidationError is the validation error returned by UpdateRequest.Validate if the designated constraints aren't met.
func (UpdateRequestValidationError) Cause ¶
func (e UpdateRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateRequestValidationError) Error ¶
func (e UpdateRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateRequestValidationError) ErrorName ¶
func (e UpdateRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateRequestValidationError) Field ¶
func (e UpdateRequestValidationError) Field() string
Field function returns field value.
func (UpdateRequestValidationError) Key ¶
func (e UpdateRequestValidationError) Key() bool
Key function returns key value.
func (UpdateRequestValidationError) Reason ¶
func (e UpdateRequestValidationError) Reason() string
Reason function returns reason value.
type UpdateUserInfo ¶
type UpdateUserInfo struct { Username *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserInfo) Descriptor
deprecated
func (*UpdateUserInfo) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserInfo.ProtoReflect.Descriptor instead.
func (*UpdateUserInfo) GetEmail ¶
func (x *UpdateUserInfo) GetEmail() *wrapperspb.StringValue
func (*UpdateUserInfo) GetUsername ¶
func (x *UpdateUserInfo) GetUsername() *wrapperspb.StringValue
func (*UpdateUserInfo) ProtoMessage ¶
func (*UpdateUserInfo) ProtoMessage()
func (*UpdateUserInfo) ProtoReflect ¶
func (x *UpdateUserInfo) ProtoReflect() protoreflect.Message
func (*UpdateUserInfo) Reset ¶
func (x *UpdateUserInfo) Reset()
func (*UpdateUserInfo) String ¶
func (x *UpdateUserInfo) String() string
func (*UpdateUserInfo) Validate ¶
func (m *UpdateUserInfo) Validate() error
Validate checks the field values on UpdateUserInfo 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 (*UpdateUserInfo) ValidateAll ¶
func (m *UpdateUserInfo) ValidateAll() error
ValidateAll checks the field values on UpdateUserInfo 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 UpdateUserInfoMultiError, or nil if none found.
type UpdateUserInfoMultiError ¶
type UpdateUserInfoMultiError []error
UpdateUserInfoMultiError is an error wrapping multiple validation errors returned by UpdateUserInfo.ValidateAll() if the designated constraints aren't met.
func (UpdateUserInfoMultiError) AllErrors ¶
func (m UpdateUserInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateUserInfoMultiError) Error ¶
func (m UpdateUserInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateUserInfoValidationError ¶
type UpdateUserInfoValidationError struct {
// contains filtered or unexported fields
}
UpdateUserInfoValidationError is the validation error returned by UpdateUserInfo.Validate if the designated constraints aren't met.
func (UpdateUserInfoValidationError) Cause ¶
func (e UpdateUserInfoValidationError) Cause() error
Cause function returns cause value.
func (UpdateUserInfoValidationError) Error ¶
func (e UpdateUserInfoValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateUserInfoValidationError) ErrorName ¶
func (e UpdateUserInfoValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateUserInfoValidationError) Field ¶
func (e UpdateUserInfoValidationError) Field() string
Field function returns field value.
func (UpdateUserInfoValidationError) Key ¶
func (e UpdateUserInfoValidationError) Key() bool
Key function returns key value.
func (UpdateUserInfoValidationError) Reason ¶
func (e UpdateUserInfoValidationError) Reason() string
Reason function returns reason value.
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:"username,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Role Role `protobuf:"varint,4,opt,name=role,proto3,enum=user_v1.Role" json:"role,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) GetUsername ¶
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 UserCreateInfo ¶
type UserCreateInfo struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` PasswordConfirm string `protobuf:"bytes,4,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"` Role Role `protobuf:"varint,5,opt,name=role,proto3,enum=user_v1.Role" json:"role,omitempty"` // contains filtered or unexported fields }
func (*UserCreateInfo) Descriptor
deprecated
func (*UserCreateInfo) Descriptor() ([]byte, []int)
Deprecated: Use UserCreateInfo.ProtoReflect.Descriptor instead.
func (*UserCreateInfo) GetEmail ¶
func (x *UserCreateInfo) GetEmail() string
func (*UserCreateInfo) GetPassword ¶
func (x *UserCreateInfo) GetPassword() string
func (*UserCreateInfo) GetPasswordConfirm ¶
func (x *UserCreateInfo) GetPasswordConfirm() string
func (*UserCreateInfo) GetRole ¶
func (x *UserCreateInfo) GetRole() Role
func (*UserCreateInfo) GetUsername ¶
func (x *UserCreateInfo) GetUsername() string
func (*UserCreateInfo) ProtoMessage ¶
func (*UserCreateInfo) ProtoMessage()
func (*UserCreateInfo) ProtoReflect ¶
func (x *UserCreateInfo) ProtoReflect() protoreflect.Message
func (*UserCreateInfo) Reset ¶
func (x *UserCreateInfo) Reset()
func (*UserCreateInfo) String ¶
func (x *UserCreateInfo) String() string
func (*UserCreateInfo) Validate ¶
func (m *UserCreateInfo) Validate() error
Validate checks the field values on UserCreateInfo 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 (*UserCreateInfo) ValidateAll ¶
func (m *UserCreateInfo) ValidateAll() error
ValidateAll checks the field values on UserCreateInfo 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 UserCreateInfoMultiError, or nil if none found.
type UserCreateInfoMultiError ¶
type UserCreateInfoMultiError []error
UserCreateInfoMultiError is an error wrapping multiple validation errors returned by UserCreateInfo.ValidateAll() if the designated constraints aren't met.
func (UserCreateInfoMultiError) AllErrors ¶
func (m UserCreateInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserCreateInfoMultiError) Error ¶
func (m UserCreateInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserCreateInfoValidationError ¶
type UserCreateInfoValidationError struct {
// contains filtered or unexported fields
}
UserCreateInfoValidationError is the validation error returned by UserCreateInfo.Validate if the designated constraints aren't met.
func (UserCreateInfoValidationError) Cause ¶
func (e UserCreateInfoValidationError) Cause() error
Cause function returns cause value.
func (UserCreateInfoValidationError) Error ¶
func (e UserCreateInfoValidationError) Error() string
Error satisfies the builtin error interface
func (UserCreateInfoValidationError) ErrorName ¶
func (e UserCreateInfoValidationError) ErrorName() string
ErrorName returns error name.
func (UserCreateInfoValidationError) Field ¶
func (e UserCreateInfoValidationError) Field() string
Field function returns field value.
func (UserCreateInfoValidationError) Key ¶
func (e UserCreateInfoValidationError) Key() bool
Key function returns key value.
func (UserCreateInfoValidationError) Reason ¶
func (e UserCreateInfoValidationError) Reason() string
Reason function returns reason value.
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 UserV1Client ¶
type UserV1Client interface { // Создать пользователя Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // Получить пользователя по ID Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) // Обновить пользователя Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Удалить пользователя Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) CheckUsersExistence(ctx context.Context, in *CheckUsersExistenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
UserV1Client is the client API for UserV1 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 NewUserV1Client ¶
func NewUserV1Client(cc grpc.ClientConnInterface) UserV1Client
type UserV1Server ¶
type UserV1Server interface { // Создать пользователя Create(context.Context, *CreateRequest) (*CreateResponse, error) // Получить пользователя по ID Get(context.Context, *GetRequest) (*GetResponse, error) // Обновить пользователя Update(context.Context, *UpdateRequest) (*emptypb.Empty, error) // Удалить пользователя Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) CheckUsersExistence(context.Context, *CheckUsersExistenceRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
UserV1Server is the server API for UserV1 service. All implementations must embed UnimplementedUserV1Server for forward compatibility
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.