Documentation ¶
Index ¶
- Constants
- type ProfileHandler
- type ProfileService
- type ProfileServiceImpl
- func (service *ProfileServiceImpl) DeleteProfileByUserUuid(ctx context.Context, userUUID uuid.UUID) (user.UserEntity, error)
- func (service *ProfileServiceImpl) UpdateImageByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdateImageRequest) (user.UserEntity, error)
- func (service *ProfileServiceImpl) UpdatePasswordByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdatePasswordRequest) (user.UserEntity, error)
- func (service *ProfileServiceImpl) UpdateProfileByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdateProfileRequest) (user.UserEntity, error)
- type UpdateImageRequest
- type UpdatePasswordRequest
- type UpdateProfileRequest
Constants ¶
View Source
const ( TmpDir = "tmp" ValidExtensions = ".jpg,.jpeg,.png,.gif" S3Dir = "profile" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProfileHandler ¶
type ProfileHandler struct { conf.Config *validator.Validate ProfileService storage.StorageService }
func NewProfileHandler ¶
func NewProfileHandler(profileService ProfileService, storageService storage.StorageService, config conf.Config, validate *validator.Validate) ProfileHandler
func (*ProfileHandler) DeleteProfile ¶
func (h *ProfileHandler) DeleteProfile(ctx *gin.Context)
func (*ProfileHandler) GetProfile ¶
func (h *ProfileHandler) GetProfile(ctx *gin.Context)
func (*ProfileHandler) UpdateImage ¶
func (h *ProfileHandler) UpdateImage(ctx *gin.Context)
func (*ProfileHandler) UpdatePassword ¶
func (h *ProfileHandler) UpdatePassword(ctx *gin.Context)
func (*ProfileHandler) UpdateProfile ¶
func (h *ProfileHandler) UpdateProfile(ctx *gin.Context)
type ProfileService ¶
type ProfileService interface { UpdateProfileByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdateProfileRequest) (user.UserEntity, error) UpdatePasswordByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdatePasswordRequest) (user.UserEntity, error) UpdateImageByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdateImageRequest) (user.UserEntity, error) DeleteProfileByUserUuid(ctx context.Context, userUUID uuid.UUID) (user.UserEntity, error) }
func NewProfileService ¶
func NewProfileService(datastore db.DataStore, userService user.UserService) ProfileService
type ProfileServiceImpl ¶
type ProfileServiceImpl struct {
// contains filtered or unexported fields
}
func (*ProfileServiceImpl) DeleteProfileByUserUuid ¶
func (service *ProfileServiceImpl) DeleteProfileByUserUuid(ctx context.Context, userUUID uuid.UUID) (user.UserEntity, error)
func (*ProfileServiceImpl) UpdateImageByUserUuid ¶
func (service *ProfileServiceImpl) UpdateImageByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdateImageRequest) (user.UserEntity, error)
func (*ProfileServiceImpl) UpdatePasswordByUserUuid ¶
func (service *ProfileServiceImpl) UpdatePasswordByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdatePasswordRequest) (user.UserEntity, error)
func (*ProfileServiceImpl) UpdateProfileByUserUuid ¶
func (service *ProfileServiceImpl) UpdateProfileByUserUuid(ctx context.Context, userUUID uuid.UUID, req UpdateProfileRequest) (user.UserEntity, error)
type UpdateImageRequest ¶
type UpdatePasswordRequest ¶
type UpdateProfileRequest ¶
type UpdateProfileRequest struct {
Name string `json:"name" validate:"required,max=100"`
}
Click to show internal directories.
Click to hide internal directories.