Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDecodeUser = myerrors.NewErrorBadFormatRequest("Некорректный json пользователя") ErrValidateUserWithoutPassword = myerrors.NewErrorBadContentRequest("Неправильно заполнены поля: ") )
View Source
var ErrWrongUserID = myerrors.NewErrorBadFormatRequest("Попытка изменить данные другого пользователя")
Functions ¶
func ValidatePartOfUserWithoutPassword ¶
func ValidatePartOfUserWithoutPassword(r io.Reader) (*models.UserWithoutPassword, error)
func ValidateUserWithoutPassword ¶
func ValidateUserWithoutPassword(r io.Reader) (*models.UserWithoutPassword, error)
Types ¶
type IUserStorage ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(userStorage IUserStorage) (*UserService, error)
func (*UserService) GetUserWithoutPasswordByID ¶
func (u *UserService) GetUserWithoutPasswordByID(ctx context.Context, userID uint64, ) (*models.UserWithoutPassword, error)
func (*UserService) UpdateUser ¶
func (u *UserService) UpdateUser(ctx context.Context, r io.Reader, isPartialUpdate bool, userID uint64, ) (*models.UserWithoutPassword, error)
Click to show internal directories.
Click to hide internal directories.