kontor-echo: setup project to show homepage
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
Gitea Actions Demo / build-and-test (push) Failing after 11s

This commit is contained in:
Thomas Peetz
2026-11-09 17:02:59 +01:00
parent 074abd3c85
commit debdf3d0b0
63 changed files with 2411 additions and 485 deletions
+27
View File
@@ -0,0 +1,27 @@
package service
import (
"context"
"kontor-api-echo/internal/models"
"kontor-api-echo/internal/repository"
"log/slog"
)
type TokenService struct {
repository *repository.TokenRepository
}
func NewTokenService(repo *repository.TokenRepository) *TokenService {
service := &TokenService{repository: repo}
return service
}
func (service *TokenService) List(context context.Context) ([]models.Token, error) {
slog.Info("TokenService#List")
return service.repository.FindAll(context)
}
func (service *TokenService) Get(context context.Context, id string) (*models.Token, error) {
slog.Info("TokenService#Get")
return service.repository.GetById(context, id)
}