umstellung auf Service und Repository Verwendung - WIP
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package service
|
||||
|
||||
import "kontor-api-gin/internal/repository"
|
||||
|
||||
type AuthService struct {
|
||||
repository *repository.ProfileRepository
|
||||
}
|
||||
|
||||
func NewAuthService(repository *repository.ProfileRepository, secret []byte) *AuthService {
|
||||
service := &AuthService{repository: repository}
|
||||
return service
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"kontor-api-gin/internal/models/comics"
|
||||
"kontor-api-gin/internal/repository"
|
||||
)
|
||||
|
||||
type ComicService struct {
|
||||
repository *repository.ComicRepository
|
||||
}
|
||||
|
||||
func NewComicService(repo *repository.ComicRepository) *ComicService {
|
||||
service := &ComicService{repository: repo}
|
||||
return service
|
||||
}
|
||||
|
||||
func (service *ComicService) List(context context.Context) ([]comics.Comic, error) {
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user