From a85afbc19f414c40c763e54e9841713a65803eb6 Mon Sep 17 00:00:00 2001 From: felipeversiane Date: Sun, 20 Oct 2024 17:34:12 -0300 Subject: [PATCH] feat: adding person domain layer schema --- internal/domain/person/controller.go | 12 ++++++++++++ internal/domain/person/repository.go | 16 ++++++++++++++++ internal/domain/person/service.go | 12 ++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 internal/domain/person/controller.go create mode 100644 internal/domain/person/repository.go create mode 100644 internal/domain/person/service.go diff --git a/internal/domain/person/controller.go b/internal/domain/person/controller.go new file mode 100644 index 0000000..d513da5 --- /dev/null +++ b/internal/domain/person/controller.go @@ -0,0 +1,12 @@ +package person + +type personController struct { + service PersonServiceInterface +} + +type PersonControllerInterface interface { +} + +func NewPersonController(service PersonServiceInterface) PersonControllerInterface { + return &personController{service} +} diff --git a/internal/domain/person/repository.go b/internal/domain/person/repository.go new file mode 100644 index 0000000..571107c --- /dev/null +++ b/internal/domain/person/repository.go @@ -0,0 +1,16 @@ +package person + +import ( + "github.com/felipeversiane/go-otel/internal/infra/services/database" +) + +type personRepository struct { + db database.DatabaseInterface +} + +type PersonRepositoryInterface interface { +} + +func NewPersonRepository(db database.DatabaseInterface) PersonRepositoryInterface { + return &personRepository{db} +} diff --git a/internal/domain/person/service.go b/internal/domain/person/service.go new file mode 100644 index 0000000..c847295 --- /dev/null +++ b/internal/domain/person/service.go @@ -0,0 +1,12 @@ +package person + +type personService struct { + repository PersonRepositoryInterface +} + +type PersonServiceInterface interface { +} + +func NewPersonService(repository PersonRepositoryInterface) PersonServiceInterface { + return &personService{repository} +}