Documentation ¶
Index ¶
- type AuthService
- type JwtService
- type URLService
- func (s *URLService) CreateURL(createURLDto *dtos.CreateURLDto, user *models.User) (*models.URL, error)
- func (s *URLService) GetAllURLs() ([]models.URL, error)
- func (s *URLService) GetURLByHash(hash string) (*models.URL, error)
- func (s *URLService) GetUserURLByHash(hash string, user *models.UserClaims) (*models.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(r models.UserRepository, j models.JwtService) *AuthService
func (*AuthService) Login ¶
func (s *AuthService) Login(credentials *dtos.SignInDto) (*models.AccessTokenResponse, error)
type JwtService ¶
type JwtService struct {
// contains filtered or unexported fields
}
func NewJwtService ¶
func NewJwtService(ttl time.Duration, secret string, issuer string) *JwtService
func (*JwtService) GenerateJwtToken ¶
func (j *JwtService) GenerateJwtToken(user *models.User) (*models.AccessTokenResponse, error)
func (*JwtService) VerifyToken ¶
func (j *JwtService) VerifyToken(tokenString string) (*models.AuthClaims, error)
type URLService ¶
type URLService struct {
// contains filtered or unexported fields
}
func NewUrlService ¶
func NewUrlService(r models.URLRepository) *URLService
func (*URLService) CreateURL ¶
func (s *URLService) CreateURL(createURLDto *dtos.CreateURLDto, user *models.User) (*models.URL, error)
func (*URLService) GetAllURLs ¶
func (s *URLService) GetAllURLs() ([]models.URL, error)
func (*URLService) GetURLByHash ¶
func (s *URLService) GetURLByHash(hash string) (*models.URL, error)
func (*URLService) GetUserURLByHash ¶
func (s *URLService) GetUserURLByHash(hash string, user *models.UserClaims) (*models.URL, error)
Click to show internal directories.
Click to hide internal directories.