initial commit
This commit is contained in:
parent
9baa0fab25
commit
fc46164556
14 changed files with 243 additions and 0 deletions
21
internal/services/link.go
Normal file
21
internal/services/link.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue