21 lines
396 B
Go
21 lines
396 B
Go
package services
|
|
|
|
import (
|
|
"context"
|
|
"maot-shortner/internal/domain"
|
|
"maot-shortner/internal/repositories"
|
|
)
|
|
|
|
type LinkService struct {
|
|
repo repositories.LinkRepository
|
|
}
|
|
|
|
func NewLinkService(repo repositories.LinkRepository) *LinkService {
|
|
return &LinkService{
|
|
repo: repo,
|
|
}
|
|
}
|
|
|
|
func (s *LinkService) GetLinks(ctx context.Context) ([]*domain.Link, error) {
|
|
return s.repo.GetLinks(ctx)
|
|
}
|