Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFoundTranslate = translator.Translate{translator.RU: "Профиль не найден", translator.EN: "Profile not found"} ErrExistsTranslate = translator.Translate{translator.RU: "Профиль уже зарегистрирован", translator.EN: "A profile is already registered"} ErrNotFound = apperr.New("profile_not_found", apperr.WithTextTranslate(ErrNotFoundTranslate), apperr.WithCode(code.NotFound)) ErrExists = apperr.New("profile_exists_error", apperr.WithTextTranslate(ErrExistsTranslate), apperr.WithCode(code.AlreadyExists)) )
Functions ¶
This section is empty.
Types ¶
type IProfileService ¶
type IProfileService interface {
Trx(db *gorm.DB) IProfileService
GetById(ctx context.Context, userID int) (*IModel, error)
GetByIds(ctx context.Context, userIDs ...int) ([]IModel, error)
Create(ctx context.Context, userID int, input any) (*IModel, error)
Update(ctx context.Context, userID int, input any) error
UpdateProfile(ctx context.Context, userID int, input any) error
Delete(ctx context.Context, userID int) error
}
type ITransformer ¶
type Profile ¶
type Profile struct {
Service IProfileService
Request IRequest
Transformer ITransformer
}
Click to show internal directories.
Click to hide internal directories.