wip: add api auth and /resume endpoint
This commit is contained in:
parent
22e2f6005f
commit
aaec8ec08d
23 changed files with 1244 additions and 271 deletions
20
internal/service/resume.go
Normal file
20
internal/service/resume.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"git.roboces.dev/catalin/cvvvvv/internal/domain"
|
||||
"git.roboces.dev/catalin/cvvvvv/internal/repo"
|
||||
)
|
||||
|
||||
type ResumesService struct {
|
||||
repo repo.Resumes
|
||||
}
|
||||
|
||||
func NewResumesService(repo repo.Resumes) *ResumesService {
|
||||
return &ResumesService{
|
||||
repo: repo,
|
||||
}
|
||||
}
|
||||
|
||||
func (r *ResumesService) Get() domain.Resume {
|
||||
return r.repo.Get()
|
||||
}
|
||||
27
internal/service/service.go
Normal file
27
internal/service/service.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"git.roboces.dev/catalin/cvvvvv/internal/config"
|
||||
"git.roboces.dev/catalin/cvvvvv/internal/domain"
|
||||
"git.roboces.dev/catalin/cvvvvv/internal/repo"
|
||||
)
|
||||
|
||||
type Services struct {
|
||||
Resumes Resumes
|
||||
Config *config.Config
|
||||
}
|
||||
|
||||
type Deps struct {
|
||||
Repos *repo.Repos
|
||||
Config *config.Config
|
||||
}
|
||||
|
||||
func NewServices(deps Deps) *Services {
|
||||
resumeService := NewResumesService(deps.Repos.Resumes)
|
||||
|
||||
return &Services{Resumes: resumeService, Config: deps.Config}
|
||||
}
|
||||
|
||||
type Resumes interface {
|
||||
Get() domain.Resume
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue