Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type ChangePasswordRequest
- func (*ChangePasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChangePasswordRequest) GetCode() string
- func (x *ChangePasswordRequest) GetEmail() string
- func (x *ChangePasswordRequest) GetNewPassword() string
- func (*ChangePasswordRequest) ProtoMessage()
- func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message
- func (x *ChangePasswordRequest) Reset()
- func (x *ChangePasswordRequest) String() string
- func (m *ChangePasswordRequest) Validate() error
- func (m *ChangePasswordRequest) ValidateAll() error
- type ChangePasswordRequestMultiError
- type ChangePasswordRequestValidationError
- func (e ChangePasswordRequestValidationError) Cause() error
- func (e ChangePasswordRequestValidationError) Error() string
- func (e ChangePasswordRequestValidationError) ErrorName() string
- func (e ChangePasswordRequestValidationError) Field() string
- func (e ChangePasswordRequestValidationError) Key() bool
- func (e ChangePasswordRequestValidationError) Reason() string
- type Email
- type EmailAndPassword
- func (*EmailAndPassword) Descriptor() ([]byte, []int)deprecated
- func (x *EmailAndPassword) GetEmail() string
- func (x *EmailAndPassword) GetPassword() string
- func (*EmailAndPassword) ProtoMessage()
- func (x *EmailAndPassword) ProtoReflect() protoreflect.Message
- func (x *EmailAndPassword) Reset()
- func (x *EmailAndPassword) String() string
- func (m *EmailAndPassword) Validate() error
- func (m *EmailAndPassword) ValidateAll() error
- type EmailAndPasswordMultiError
- type EmailAndPasswordValidationError
- func (e EmailAndPasswordValidationError) Cause() error
- func (e EmailAndPasswordValidationError) Error() string
- func (e EmailAndPasswordValidationError) ErrorName() string
- func (e EmailAndPasswordValidationError) Field() string
- func (e EmailAndPasswordValidationError) Key() bool
- func (e EmailAndPasswordValidationError) Reason() string
- type EmailMultiError
- type EmailValidationError
- type GetUserByIDRequest
- func (*GetUserByIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByIDRequest) GetId() int64
- func (*GetUserByIDRequest) ProtoMessage()
- func (x *GetUserByIDRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserByIDRequest) Reset()
- func (x *GetUserByIDRequest) String() string
- func (m *GetUserByIDRequest) Validate() error
- func (m *GetUserByIDRequest) ValidateAll() error
- type GetUserByIDRequestMultiError
- type GetUserByIDRequestValidationError
- func (e GetUserByIDRequestValidationError) Cause() error
- func (e GetUserByIDRequestValidationError) Error() string
- func (e GetUserByIDRequestValidationError) ErrorName() string
- func (e GetUserByIDRequestValidationError) Field() string
- func (e GetUserByIDRequestValidationError) Key() bool
- func (e GetUserByIDRequestValidationError) Reason() string
- type IsCorrect
- func (*IsCorrect) Descriptor() ([]byte, []int)deprecated
- func (x *IsCorrect) GetIsCorrect() bool
- func (*IsCorrect) ProtoMessage()
- func (x *IsCorrect) ProtoReflect() protoreflect.Message
- func (x *IsCorrect) Reset()
- func (x *IsCorrect) String() string
- func (m *IsCorrect) Validate() error
- func (m *IsCorrect) ValidateAll() error
- type IsCorrectMultiError
- type IsCorrectValidationError
- type NewUser
- func (*NewUser) Descriptor() ([]byte, []int)deprecated
- func (x *NewUser) GetDefaultPharmacyId() int64
- func (x *NewUser) GetEmail() string
- func (x *NewUser) GetIsBlocked() bool
- func (x *NewUser) GetName() string
- func (x *NewUser) GetPassword() string
- func (x *NewUser) GetRole() string
- func (x *NewUser) GetSurname() string
- func (x *NewUser) GetUseIpCheck() bool
- func (*NewUser) ProtoMessage()
- func (x *NewUser) ProtoReflect() protoreflect.Message
- func (x *NewUser) Reset()
- func (x *NewUser) String() string
- func (m *NewUser) Validate() error
- func (m *NewUser) ValidateAll() error
- type NewUserMultiError
- type NewUserValidationError
- type PaginationRequest
- func (*PaginationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PaginationRequest) GetLastId() int64
- func (x *PaginationRequest) GetLimit() int64
- func (*PaginationRequest) ProtoMessage()
- func (x *PaginationRequest) ProtoReflect() protoreflect.Message
- func (x *PaginationRequest) Reset()
- func (x *PaginationRequest) String() string
- func (m *PaginationRequest) Validate() error
- func (m *PaginationRequest) ValidateAll() error
- type PaginationRequestMultiError
- type PaginationRequestValidationError
- func (e PaginationRequestValidationError) Cause() error
- func (e PaginationRequestValidationError) Error() string
- func (e PaginationRequestValidationError) ErrorName() string
- func (e PaginationRequestValidationError) Field() string
- func (e PaginationRequestValidationError) Key() bool
- func (e PaginationRequestValidationError) Reason() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *NewUser) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) GetByEmail(context.Context, *Email) (*User, error)
- func (UnimplementedUserServiceServer) GetByID(context.Context, *GetUserByIDRequest) (*User, error)
- func (UnimplementedUserServiceServer) GetUsers(context.Context, *PaginationRequest) (*Users, error)
- func (UnimplementedUserServiceServer) IsPasswordCorrect(context.Context, *EmailAndPassword) (*IsCorrect, error)
- func (UnimplementedUserServiceServer) RequestToChangePassword(context.Context, *Email) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *User) (*emptypb.Empty, error)
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetDefaultPharmacyId() int64
- func (x *User) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetIsBlocked() bool
- func (x *User) GetName() string
- func (x *User) GetRole() string
- func (x *User) GetSurname() string
- func (x *User) GetUseIpCheck() bool
- 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 UserServiceClient
- type UserServiceServer
- type UserValidationError
- type Users
- type UsersMultiError
- type UsersValidationError
Constants ¶
This section is empty.
Variables ¶
var File_proto_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "userService.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetByEmail", Handler: _UserService_GetByEmail_Handler, }, { MethodName: "GetByID", Handler: _UserService_GetByID_Handler, }, { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "RequestToChangePassword", Handler: _UserService_RequestToChangePassword_Handler, }, { MethodName: "ChangePassword", Handler: _UserService_ChangePassword_Handler, }, { MethodName: "GetUsers", Handler: _UserService_GetUsers_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "IsPasswordCorrect", Handler: _UserService_IsPasswordCorrect_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type ChangePasswordRequest ¶
type ChangePasswordRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` NewPassword string `protobuf:"bytes,3,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` // contains filtered or unexported fields }
func (*ChangePasswordRequest) Descriptor
deprecated
func (*ChangePasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
func (*ChangePasswordRequest) GetCode ¶
func (x *ChangePasswordRequest) GetCode() string
func (*ChangePasswordRequest) GetEmail ¶
func (x *ChangePasswordRequest) GetEmail() string
func (*ChangePasswordRequest) GetNewPassword ¶
func (x *ChangePasswordRequest) GetNewPassword() string
func (*ChangePasswordRequest) ProtoMessage ¶
func (*ChangePasswordRequest) ProtoMessage()
func (*ChangePasswordRequest) ProtoReflect ¶
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message
func (*ChangePasswordRequest) Reset ¶
func (x *ChangePasswordRequest) Reset()
func (*ChangePasswordRequest) String ¶
func (x *ChangePasswordRequest) String() string
func (*ChangePasswordRequest) Validate ¶
func (m *ChangePasswordRequest) Validate() error
Validate checks the field values on ChangePasswordRequest 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 (*ChangePasswordRequest) ValidateAll ¶
func (m *ChangePasswordRequest) ValidateAll() error
ValidateAll checks the field values on ChangePasswordRequest 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 ChangePasswordRequestMultiError, or nil if none found.
type ChangePasswordRequestMultiError ¶
type ChangePasswordRequestMultiError []error
ChangePasswordRequestMultiError is an error wrapping multiple validation errors returned by ChangePasswordRequest.ValidateAll() if the designated constraints aren't met.
func (ChangePasswordRequestMultiError) AllErrors ¶
func (m ChangePasswordRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ChangePasswordRequestMultiError) Error ¶
func (m ChangePasswordRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ChangePasswordRequestValidationError ¶
type ChangePasswordRequestValidationError struct {
// contains filtered or unexported fields
}
ChangePasswordRequestValidationError is the validation error returned by ChangePasswordRequest.Validate if the designated constraints aren't met.
func (ChangePasswordRequestValidationError) Cause ¶
func (e ChangePasswordRequestValidationError) Cause() error
Cause function returns cause value.
func (ChangePasswordRequestValidationError) Error ¶
func (e ChangePasswordRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ChangePasswordRequestValidationError) ErrorName ¶
func (e ChangePasswordRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ChangePasswordRequestValidationError) Field ¶
func (e ChangePasswordRequestValidationError) Field() string
Field function returns field value.
func (ChangePasswordRequestValidationError) Key ¶
func (e ChangePasswordRequestValidationError) Key() bool
Key function returns key value.
func (ChangePasswordRequestValidationError) Reason ¶
func (e ChangePasswordRequestValidationError) Reason() string
Reason function returns reason value.
type Email ¶
type Email struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*Email) Descriptor
deprecated
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ProtoReflect ¶
func (x *Email) ProtoReflect() protoreflect.Message
func (*Email) Validate ¶
Validate checks the field values on Email 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 (*Email) ValidateAll ¶
ValidateAll checks the field values on Email 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 EmailMultiError, or nil if none found.
type EmailAndPassword ¶
type EmailAndPassword struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*EmailAndPassword) Descriptor
deprecated
func (*EmailAndPassword) Descriptor() ([]byte, []int)
Deprecated: Use EmailAndPassword.ProtoReflect.Descriptor instead.
func (*EmailAndPassword) GetEmail ¶
func (x *EmailAndPassword) GetEmail() string
func (*EmailAndPassword) GetPassword ¶
func (x *EmailAndPassword) GetPassword() string
func (*EmailAndPassword) ProtoMessage ¶
func (*EmailAndPassword) ProtoMessage()
func (*EmailAndPassword) ProtoReflect ¶
func (x *EmailAndPassword) ProtoReflect() protoreflect.Message
func (*EmailAndPassword) Reset ¶
func (x *EmailAndPassword) Reset()
func (*EmailAndPassword) String ¶
func (x *EmailAndPassword) String() string
func (*EmailAndPassword) Validate ¶
func (m *EmailAndPassword) Validate() error
Validate checks the field values on EmailAndPassword 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 (*EmailAndPassword) ValidateAll ¶
func (m *EmailAndPassword) ValidateAll() error
ValidateAll checks the field values on EmailAndPassword 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 EmailAndPasswordMultiError, or nil if none found.
type EmailAndPasswordMultiError ¶
type EmailAndPasswordMultiError []error
EmailAndPasswordMultiError is an error wrapping multiple validation errors returned by EmailAndPassword.ValidateAll() if the designated constraints aren't met.
func (EmailAndPasswordMultiError) AllErrors ¶
func (m EmailAndPasswordMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EmailAndPasswordMultiError) Error ¶
func (m EmailAndPasswordMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EmailAndPasswordValidationError ¶
type EmailAndPasswordValidationError struct {
// contains filtered or unexported fields
}
EmailAndPasswordValidationError is the validation error returned by EmailAndPassword.Validate if the designated constraints aren't met.
func (EmailAndPasswordValidationError) Cause ¶
func (e EmailAndPasswordValidationError) Cause() error
Cause function returns cause value.
func (EmailAndPasswordValidationError) Error ¶
func (e EmailAndPasswordValidationError) Error() string
Error satisfies the builtin error interface
func (EmailAndPasswordValidationError) ErrorName ¶
func (e EmailAndPasswordValidationError) ErrorName() string
ErrorName returns error name.
func (EmailAndPasswordValidationError) Field ¶
func (e EmailAndPasswordValidationError) Field() string
Field function returns field value.
func (EmailAndPasswordValidationError) Key ¶
func (e EmailAndPasswordValidationError) Key() bool
Key function returns key value.
func (EmailAndPasswordValidationError) Reason ¶
func (e EmailAndPasswordValidationError) Reason() string
Reason function returns reason value.
type EmailMultiError ¶
type EmailMultiError []error
EmailMultiError is an error wrapping multiple validation errors returned by Email.ValidateAll() if the designated constraints aren't met.
func (EmailMultiError) AllErrors ¶
func (m EmailMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EmailMultiError) Error ¶
func (m EmailMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EmailValidationError ¶
type EmailValidationError struct {
// contains filtered or unexported fields
}
EmailValidationError is the validation error returned by Email.Validate if the designated constraints aren't met.
func (EmailValidationError) Cause ¶
func (e EmailValidationError) Cause() error
Cause function returns cause value.
func (EmailValidationError) Error ¶
func (e EmailValidationError) Error() string
Error satisfies the builtin error interface
func (EmailValidationError) ErrorName ¶
func (e EmailValidationError) ErrorName() string
ErrorName returns error name.
func (EmailValidationError) Field ¶
func (e EmailValidationError) Field() string
Field function returns field value.
func (EmailValidationError) Key ¶
func (e EmailValidationError) Key() bool
Key function returns key value.
func (EmailValidationError) Reason ¶
func (e EmailValidationError) Reason() string
Reason function returns reason value.
type GetUserByIDRequest ¶
type GetUserByIDRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserByIDRequest) Descriptor
deprecated
func (*GetUserByIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByIDRequest.ProtoReflect.Descriptor instead.
func (*GetUserByIDRequest) GetId ¶
func (x *GetUserByIDRequest) GetId() int64
func (*GetUserByIDRequest) ProtoMessage ¶
func (*GetUserByIDRequest) ProtoMessage()
func (*GetUserByIDRequest) ProtoReflect ¶
func (x *GetUserByIDRequest) ProtoReflect() protoreflect.Message
func (*GetUserByIDRequest) Reset ¶
func (x *GetUserByIDRequest) Reset()
func (*GetUserByIDRequest) String ¶
func (x *GetUserByIDRequest) String() string
func (*GetUserByIDRequest) Validate ¶
func (m *GetUserByIDRequest) Validate() error
Validate checks the field values on GetUserByIDRequest 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 (*GetUserByIDRequest) ValidateAll ¶
func (m *GetUserByIDRequest) ValidateAll() error
ValidateAll checks the field values on GetUserByIDRequest 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 GetUserByIDRequestMultiError, or nil if none found.
type GetUserByIDRequestMultiError ¶
type GetUserByIDRequestMultiError []error
GetUserByIDRequestMultiError is an error wrapping multiple validation errors returned by GetUserByIDRequest.ValidateAll() if the designated constraints aren't met.
func (GetUserByIDRequestMultiError) AllErrors ¶
func (m GetUserByIDRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserByIDRequestMultiError) Error ¶
func (m GetUserByIDRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserByIDRequestValidationError ¶
type GetUserByIDRequestValidationError struct {
// contains filtered or unexported fields
}
GetUserByIDRequestValidationError is the validation error returned by GetUserByIDRequest.Validate if the designated constraints aren't met.
func (GetUserByIDRequestValidationError) Cause ¶
func (e GetUserByIDRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserByIDRequestValidationError) Error ¶
func (e GetUserByIDRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserByIDRequestValidationError) ErrorName ¶
func (e GetUserByIDRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserByIDRequestValidationError) Field ¶
func (e GetUserByIDRequestValidationError) Field() string
Field function returns field value.
func (GetUserByIDRequestValidationError) Key ¶
func (e GetUserByIDRequestValidationError) Key() bool
Key function returns key value.
func (GetUserByIDRequestValidationError) Reason ¶
func (e GetUserByIDRequestValidationError) Reason() string
Reason function returns reason value.
type IsCorrect ¶
type IsCorrect struct { IsCorrect bool `protobuf:"varint,1,opt,name=is_correct,json=isCorrect,proto3" json:"is_correct,omitempty"` // contains filtered or unexported fields }
func (*IsCorrect) Descriptor
deprecated
func (*IsCorrect) GetIsCorrect ¶
func (*IsCorrect) ProtoMessage ¶
func (*IsCorrect) ProtoMessage()
func (*IsCorrect) ProtoReflect ¶
func (x *IsCorrect) ProtoReflect() protoreflect.Message
func (*IsCorrect) Validate ¶
Validate checks the field values on IsCorrect 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 (*IsCorrect) ValidateAll ¶
ValidateAll checks the field values on IsCorrect 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 IsCorrectMultiError, or nil if none found.
type IsCorrectMultiError ¶
type IsCorrectMultiError []error
IsCorrectMultiError is an error wrapping multiple validation errors returned by IsCorrect.ValidateAll() if the designated constraints aren't met.
func (IsCorrectMultiError) AllErrors ¶
func (m IsCorrectMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IsCorrectMultiError) Error ¶
func (m IsCorrectMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IsCorrectValidationError ¶
type IsCorrectValidationError struct {
// contains filtered or unexported fields
}
IsCorrectValidationError is the validation error returned by IsCorrect.Validate if the designated constraints aren't met.
func (IsCorrectValidationError) Cause ¶
func (e IsCorrectValidationError) Cause() error
Cause function returns cause value.
func (IsCorrectValidationError) Error ¶
func (e IsCorrectValidationError) Error() string
Error satisfies the builtin error interface
func (IsCorrectValidationError) ErrorName ¶
func (e IsCorrectValidationError) ErrorName() string
ErrorName returns error name.
func (IsCorrectValidationError) Field ¶
func (e IsCorrectValidationError) Field() string
Field function returns field value.
func (IsCorrectValidationError) Key ¶
func (e IsCorrectValidationError) Key() bool
Key function returns key value.
func (IsCorrectValidationError) Reason ¶
func (e IsCorrectValidationError) Reason() string
Reason function returns reason value.
type NewUser ¶
type NewUser struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` UseIpCheck bool `protobuf:"varint,6,opt,name=use_ip_check,json=useIpCheck,proto3" json:"use_ip_check,omitempty"` IsBlocked bool `protobuf:"varint,7,opt,name=is_blocked,json=isBlocked,proto3" json:"is_blocked,omitempty"` DefaultPharmacyId int64 `protobuf:"varint,8,opt,name=default_pharmacy_id,json=defaultPharmacyId,proto3" json:"default_pharmacy_id,omitempty"` Surname string `protobuf:"bytes,9,opt,name=surname,proto3" json:"surname,omitempty"` // contains filtered or unexported fields }
func (*NewUser) Descriptor
deprecated
func (*NewUser) GetDefaultPharmacyId ¶
func (*NewUser) GetIsBlocked ¶
func (*NewUser) GetPassword ¶
func (*NewUser) GetSurname ¶
func (*NewUser) GetUseIpCheck ¶
func (*NewUser) ProtoMessage ¶
func (*NewUser) ProtoMessage()
func (*NewUser) ProtoReflect ¶
func (x *NewUser) ProtoReflect() protoreflect.Message
func (*NewUser) Validate ¶
Validate checks the field values on NewUser 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 (*NewUser) ValidateAll ¶
ValidateAll checks the field values on NewUser 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 NewUserMultiError, or nil if none found.
type NewUserMultiError ¶
type NewUserMultiError []error
NewUserMultiError is an error wrapping multiple validation errors returned by NewUser.ValidateAll() if the designated constraints aren't met.
func (NewUserMultiError) AllErrors ¶
func (m NewUserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (NewUserMultiError) Error ¶
func (m NewUserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type NewUserValidationError ¶
type NewUserValidationError struct {
// contains filtered or unexported fields
}
NewUserValidationError is the validation error returned by NewUser.Validate if the designated constraints aren't met.
func (NewUserValidationError) Cause ¶
func (e NewUserValidationError) Cause() error
Cause function returns cause value.
func (NewUserValidationError) Error ¶
func (e NewUserValidationError) Error() string
Error satisfies the builtin error interface
func (NewUserValidationError) ErrorName ¶
func (e NewUserValidationError) ErrorName() string
ErrorName returns error name.
func (NewUserValidationError) Field ¶
func (e NewUserValidationError) Field() string
Field function returns field value.
func (NewUserValidationError) Key ¶
func (e NewUserValidationError) Key() bool
Key function returns key value.
func (NewUserValidationError) Reason ¶
func (e NewUserValidationError) Reason() string
Reason function returns reason value.
type PaginationRequest ¶
type PaginationRequest struct { LastId int64 `protobuf:"varint,1,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"` Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*PaginationRequest) Descriptor
deprecated
func (*PaginationRequest) Descriptor() ([]byte, []int)
Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead.
func (*PaginationRequest) GetLastId ¶
func (x *PaginationRequest) GetLastId() int64
func (*PaginationRequest) GetLimit ¶
func (x *PaginationRequest) GetLimit() int64
func (*PaginationRequest) ProtoMessage ¶
func (*PaginationRequest) ProtoMessage()
func (*PaginationRequest) ProtoReflect ¶
func (x *PaginationRequest) ProtoReflect() protoreflect.Message
func (*PaginationRequest) Reset ¶
func (x *PaginationRequest) Reset()
func (*PaginationRequest) String ¶
func (x *PaginationRequest) String() string
func (*PaginationRequest) Validate ¶
func (m *PaginationRequest) Validate() error
Validate checks the field values on PaginationRequest 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 (*PaginationRequest) ValidateAll ¶
func (m *PaginationRequest) ValidateAll() error
ValidateAll checks the field values on PaginationRequest 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 PaginationRequestMultiError, or nil if none found.
type PaginationRequestMultiError ¶
type PaginationRequestMultiError []error
PaginationRequestMultiError is an error wrapping multiple validation errors returned by PaginationRequest.ValidateAll() if the designated constraints aren't met.
func (PaginationRequestMultiError) AllErrors ¶
func (m PaginationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PaginationRequestMultiError) Error ¶
func (m PaginationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PaginationRequestValidationError ¶
type PaginationRequestValidationError struct {
// contains filtered or unexported fields
}
PaginationRequestValidationError is the validation error returned by PaginationRequest.Validate if the designated constraints aren't met.
func (PaginationRequestValidationError) Cause ¶
func (e PaginationRequestValidationError) Cause() error
Cause function returns cause value.
func (PaginationRequestValidationError) Error ¶
func (e PaginationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PaginationRequestValidationError) ErrorName ¶
func (e PaginationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PaginationRequestValidationError) Field ¶
func (e PaginationRequestValidationError) Field() string
Field function returns field value.
func (PaginationRequestValidationError) Key ¶
func (e PaginationRequestValidationError) Key() bool
Key function returns key value.
func (PaginationRequestValidationError) Reason ¶
func (e PaginationRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) ChangePassword ¶
func (UnimplementedUserServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) GetByEmail ¶
func (UnimplementedUserServiceServer) GetByID ¶
func (UnimplementedUserServiceServer) GetByID(context.Context, *GetUserByIDRequest) (*User, error)
func (UnimplementedUserServiceServer) GetUsers ¶
func (UnimplementedUserServiceServer) GetUsers(context.Context, *PaginationRequest) (*Users, error)
func (UnimplementedUserServiceServer) IsPasswordCorrect ¶
func (UnimplementedUserServiceServer) IsPasswordCorrect(context.Context, *EmailAndPassword) (*IsCorrect, error)
func (UnimplementedUserServiceServer) RequestToChangePassword ¶
func (UnimplementedUserServiceServer) UpdateUser ¶
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` UseIpCheck bool `protobuf:"varint,6,opt,name=use_ip_check,json=useIpCheck,proto3" json:"use_ip_check,omitempty"` IsBlocked bool `protobuf:"varint,7,opt,name=is_blocked,json=isBlocked,proto3" json:"is_blocked,omitempty"` DefaultPharmacyId int64 `protobuf:"varint,8,opt,name=default_pharmacy_id,json=defaultPharmacyId,proto3" json:"default_pharmacy_id,omitempty"` Surname string `protobuf:"bytes,9,opt,name=surname,proto3" json:"surname,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetDefaultPharmacyId ¶
func (*User) GetIsBlocked ¶
func (*User) GetSurname ¶
func (*User) GetUseIpCheck ¶
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 UserServiceClient ¶
type UserServiceClient interface { GetByEmail(ctx context.Context, in *Email, opts ...grpc.CallOption) (*User, error) GetByID(ctx context.Context, in *GetUserByIDRequest, opts ...grpc.CallOption) (*User, error) CreateUser(ctx context.Context, in *NewUser, opts ...grpc.CallOption) (*emptypb.Empty, error) RequestToChangePassword(ctx context.Context, in *Email, opts ...grpc.CallOption) (*emptypb.Empty, error) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetUsers(ctx context.Context, in *PaginationRequest, opts ...grpc.CallOption) (*Users, error) UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) IsPasswordCorrect(ctx context.Context, in *EmailAndPassword, opts ...grpc.CallOption) (*IsCorrect, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { GetByEmail(context.Context, *Email) (*User, error) GetByID(context.Context, *GetUserByIDRequest) (*User, error) CreateUser(context.Context, *NewUser) (*emptypb.Empty, error) RequestToChangePassword(context.Context, *Email) (*emptypb.Empty, error) ChangePassword(context.Context, *ChangePasswordRequest) (*emptypb.Empty, error) GetUsers(context.Context, *PaginationRequest) (*Users, error) UpdateUser(context.Context, *User) (*emptypb.Empty, error) IsPasswordCorrect(context.Context, *EmailAndPassword) (*IsCorrect, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer 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.
type Users ¶
type Users struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*Users) Descriptor
deprecated
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message
func (*Users) Validate ¶
Validate checks the field values on Users 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 (*Users) ValidateAll ¶
ValidateAll checks the field values on Users 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 UsersMultiError, or nil if none found.
type UsersMultiError ¶
type UsersMultiError []error
UsersMultiError is an error wrapping multiple validation errors returned by Users.ValidateAll() if the designated constraints aren't met.
func (UsersMultiError) AllErrors ¶
func (m UsersMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UsersMultiError) Error ¶
func (m UsersMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UsersValidationError ¶
type UsersValidationError struct {
// contains filtered or unexported fields
}
UsersValidationError is the validation error returned by Users.Validate if the designated constraints aren't met.
func (UsersValidationError) Cause ¶
func (e UsersValidationError) Cause() error
Cause function returns cause value.
func (UsersValidationError) Error ¶
func (e UsersValidationError) Error() string
Error satisfies the builtin error interface
func (UsersValidationError) ErrorName ¶
func (e UsersValidationError) ErrorName() string
ErrorName returns error name.
func (UsersValidationError) Field ¶
func (e UsersValidationError) Field() string
Field function returns field value.
func (UsersValidationError) Key ¶
func (e UsersValidationError) Key() bool
Key function returns key value.
func (UsersValidationError) Reason ¶
func (e UsersValidationError) Reason() string
Reason function returns reason value.