userservice

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_proto protoreflect.FileDescriptor
View Source
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

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

Cause function returns cause value.

func (ChangePasswordRequestValidationError) Error

Error satisfies the builtin error interface

func (ChangePasswordRequestValidationError) ErrorName

ErrorName returns error name.

func (ChangePasswordRequestValidationError) Field

Field function returns field value.

func (ChangePasswordRequestValidationError) Key

Key function returns key value.

func (ChangePasswordRequestValidationError) Reason

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) Descriptor() ([]byte, []int)

Deprecated: Use Email.ProtoReflect.Descriptor instead.

func (*Email) GetEmail

func (x *Email) GetEmail() string

func (*Email) ProtoMessage

func (*Email) ProtoMessage()

func (*Email) ProtoReflect

func (x *Email) ProtoReflect() protoreflect.Message

func (*Email) Reset

func (x *Email) Reset()

func (*Email) String

func (x *Email) String() string

func (*Email) Validate

func (m *Email) Validate() error

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

func (m *Email) ValidateAll() error

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

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

Cause function returns cause value.

func (EmailAndPasswordValidationError) Error

Error satisfies the builtin error interface

func (EmailAndPasswordValidationError) ErrorName

ErrorName returns error name.

func (EmailAndPasswordValidationError) Field

Field function returns field value.

func (EmailAndPasswordValidationError) Key

Key function returns key value.

func (EmailAndPasswordValidationError) Reason

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

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

Cause function returns cause value.

func (GetUserByIDRequestValidationError) Error

Error satisfies the builtin error interface

func (GetUserByIDRequestValidationError) ErrorName

ErrorName returns error name.

func (GetUserByIDRequestValidationError) Field

Field function returns field value.

func (GetUserByIDRequestValidationError) Key

Key function returns key value.

func (GetUserByIDRequestValidationError) Reason

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) Descriptor() ([]byte, []int)

Deprecated: Use IsCorrect.ProtoReflect.Descriptor instead.

func (*IsCorrect) GetIsCorrect

func (x *IsCorrect) GetIsCorrect() bool

func (*IsCorrect) ProtoMessage

func (*IsCorrect) ProtoMessage()

func (*IsCorrect) ProtoReflect

func (x *IsCorrect) ProtoReflect() protoreflect.Message

func (*IsCorrect) Reset

func (x *IsCorrect) Reset()

func (*IsCorrect) String

func (x *IsCorrect) String() string

func (*IsCorrect) Validate

func (m *IsCorrect) Validate() error

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

func (m *IsCorrect) ValidateAll() error

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

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) Descriptor() ([]byte, []int)

Deprecated: Use NewUser.ProtoReflect.Descriptor instead.

func (*NewUser) GetDefaultPharmacyId

func (x *NewUser) GetDefaultPharmacyId() int64

func (*NewUser) GetEmail

func (x *NewUser) GetEmail() string

func (*NewUser) GetIsBlocked

func (x *NewUser) GetIsBlocked() bool

func (*NewUser) GetName

func (x *NewUser) GetName() string

func (*NewUser) GetPassword

func (x *NewUser) GetPassword() string

func (*NewUser) GetRole

func (x *NewUser) GetRole() string

func (*NewUser) GetSurname

func (x *NewUser) GetSurname() string

func (*NewUser) GetUseIpCheck

func (x *NewUser) GetUseIpCheck() bool

func (*NewUser) ProtoMessage

func (*NewUser) ProtoMessage()

func (*NewUser) ProtoReflect

func (x *NewUser) ProtoReflect() protoreflect.Message

func (*NewUser) Reset

func (x *NewUser) Reset()

func (*NewUser) String

func (x *NewUser) String() string

func (*NewUser) Validate

func (m *NewUser) Validate() error

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

func (m *NewUser) ValidateAll() error

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

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

Cause function returns cause value.

func (PaginationRequestValidationError) Error

Error satisfies the builtin error interface

func (PaginationRequestValidationError) ErrorName

ErrorName returns error name.

func (PaginationRequestValidationError) Field

Field function returns field value.

func (PaginationRequestValidationError) Key

Key function returns key value.

func (PaginationRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) ChangePassword

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) GetByEmail

func (UnimplementedUserServiceServer) GetByID

func (UnimplementedUserServiceServer) GetUsers

func (UnimplementedUserServiceServer) IsPasswordCorrect

func (UnimplementedUserServiceServer) RequestToChangePassword

func (UnimplementedUserServiceServer) RequestToChangePassword(context.Context, *Email) (*emptypb.Empty, error)

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetDefaultPharmacyId

func (x *User) GetDefaultPharmacyId() int64

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetIsBlocked

func (x *User) GetIsBlocked() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) GetRole

func (x *User) GetRole() string

func (*User) GetSurname

func (x *User) GetSurname() string

func (*User) GetUseIpCheck

func (x *User) GetUseIpCheck() bool

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

func (*User) Validate

func (m *User) Validate() error

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

func (m *User) ValidateAll() error

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Users.ProtoReflect.Descriptor instead.

func (*Users) GetUsers

func (x *Users) GetUsers() []*User

func (*Users) ProtoMessage

func (*Users) ProtoMessage()

func (*Users) ProtoReflect

func (x *Users) ProtoReflect() protoreflect.Message

func (*Users) Reset

func (x *Users) Reset()

func (*Users) String

func (x *Users) String() string

func (*Users) Validate

func (m *Users) Validate() error

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

func (m *Users) ValidateAll() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL