Documentation ¶
Index ¶
- type InterfaceUrlService
- type InterfaceUserService
- type UrlService
- func (s *UrlService) CreateUrl(req *entity.CreateUrlRequest) *entity.CustomError
- func (s *UrlService) GetUrlByShortUrl(shortUrl string) (string, *entity.CustomError)
- func (s *UrlService) GetUrlsByUserId(userId int) ([]*entity.UserUrlResponse, *entity.CustomError)
- func (s *UrlService) GetUrlsByUsername(username string) ([]*entity.UserUrlResponse, *entity.CustomError)
- type UserService
- func (s *UserService) CreateUser(req *entity.CreateUserRequest) *entity.CustomError
- func (s *UserService) Login(req *entity.UserLoginRequest) (*entity.UserLoginResponse, *entity.CustomError)
- func (s *UserService) UpdateUserPassword(userId int, req *entity.UpdatePasswordRequest) *entity.CustomError
- func (s *UserService) UserProfile(userId int) (*entity.UserProfileResponse, *entity.CustomError)
- func (s *UserService) UserProfileByUsername(username string) (*entity.UserProfileResponse, *entity.CustomError)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceUrlService ¶
type InterfaceUrlService interface { CreateUrl(req *entity.CreateUrlRequest) *entity.CustomError GetUrlByShortUrl(shortUrl string) (string, *entity.CustomError) GetUrlsByUserId(userId int) ([]*entity.UserUrlResponse, *entity.CustomError) GetUrlsByUsername(username string) ([]*entity.UserUrlResponse, *entity.CustomError) }
func NewUrlServices ¶
func NewUrlServices(repo repositories.InterfaceUrlRepository) InterfaceUrlService
type InterfaceUserService ¶
type InterfaceUserService interface { CreateUser(req *entity.CreateUserRequest) *entity.CustomError Login(req *entity.UserLoginRequest) (*entity.UserLoginResponse, *entity.CustomError) UserProfile(userId int) (*entity.UserProfileResponse, *entity.CustomError) UserProfileByUsername(username string) (*entity.UserProfileResponse, *entity.CustomError) UpdateUserPassword(userId int, req *entity.UpdatePasswordRequest) *entity.CustomError }
func NewUserService ¶
func NewUserService(repo repositories.InterfaceUserRepository) InterfaceUserService
type UrlService ¶
type UrlService struct {
// contains filtered or unexported fields
}
func (*UrlService) CreateUrl ¶
func (s *UrlService) CreateUrl(req *entity.CreateUrlRequest) *entity.CustomError
func (*UrlService) GetUrlByShortUrl ¶
func (s *UrlService) GetUrlByShortUrl(shortUrl string) (string, *entity.CustomError)
func (*UrlService) GetUrlsByUserId ¶
func (s *UrlService) GetUrlsByUserId(userId int) ([]*entity.UserUrlResponse, *entity.CustomError)
func (*UrlService) GetUrlsByUsername ¶
func (s *UrlService) GetUrlsByUsername(username string) ([]*entity.UserUrlResponse, *entity.CustomError)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) CreateUser ¶
func (s *UserService) CreateUser(req *entity.CreateUserRequest) *entity.CustomError
func (*UserService) Login ¶
func (s *UserService) Login(req *entity.UserLoginRequest) (*entity.UserLoginResponse, *entity.CustomError)
func (*UserService) UpdateUserPassword ¶
func (s *UserService) UpdateUserPassword(userId int, req *entity.UpdatePasswordRequest) *entity.CustomError
func (*UserService) UserProfile ¶
func (s *UserService) UserProfile(userId int) (*entity.UserProfileResponse, *entity.CustomError)
func (*UserService) UserProfileByUsername ¶
func (s *UserService) UserProfileByUsername(username string) (*entity.UserProfileResponse, *entity.CustomError)
Click to show internal directories.
Click to hide internal directories.