Documentation ¶
Index ¶
- Variables
- type ProfileCreateInput
- type ProfileService
- func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Create(ctx context.Context, userID int, input CreateInput) (*Model, error)
- func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Delete(ctx context.Context, userID int) error
- func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetById(ctx context.Context, userID int) (*Model, error)
- func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetByIds(ctx context.Context, userID ...int) ([]Model, error)
- func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Trx(db *gorm.DB) profile.IProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]
- func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Update(ctx context.Context, userID int, input UpdateInput) error
- func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) UpdateProfile(ctx context.Context, userID int, input UpdateProfileInput) error
- type ProfileUpdateInput
- type ProfileUpdateProfileInput
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProfileNotFound = apperr.New("profile_not_found", apperr.WithTextTranslate(i18n.ErrProfileNotFound), apperr.WithCode(code.NotFound)) ErrProfileExists = apperr.New("profile_exists_error", apperr.WithTextTranslate(i18n.ErrProfileExists), apperr.WithCode(code.InvalidArgument)) )
Functions ¶
This section is empty.
Types ¶
type ProfileCreateInput ¶
type ProfileService ¶
type ProfileService[Model model.Profile, CreateInput ProfileCreateInput, UpdateInput ProfileUpdateInput, UpdateProfileInput ProfileUpdateProfileInput] struct { // contains filtered or unexported fields }
func NewProfileService ¶
func NewProfileService[Model model.Profile, CreateInput ProfileCreateInput, UpdateInput ProfileUpdateInput, UpdateProfileInput ProfileUpdateProfileInput]( profileRepository repository.IProfileRepository, ) ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]
func (ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Create ¶
func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Create(ctx context.Context, userID int, input CreateInput) (*Model, error)
func (ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Delete ¶
func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Delete(ctx context.Context, userID int) error
func (ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetById ¶
func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetById(ctx context.Context, userID int) (*Model, error)
func (ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetByIds ¶
func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) GetByIds(ctx context.Context, userID ...int) ([]Model, error)
func (ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Trx ¶
func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Trx(db *gorm.DB) profile.IProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]
func (ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Update ¶
func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) Update(ctx context.Context, userID int, input UpdateInput) error
func (ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) UpdateProfile ¶
func (s ProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]) UpdateProfile(ctx context.Context, userID int, input UpdateProfileInput) error
type ProfileUpdateInput ¶
Click to show internal directories.
Click to hide internal directories.