package app

import (
	"context"

	"gitea.dwysokinski.me/twhelp/corev3/internal/domain"
)

type VersionRepository interface {
	List(ctx context.Context, params domain.ListVersionsParams) (domain.Versions, error)
}

type VersionService struct {
	repo VersionRepository
}

func NewVersionService(repo VersionRepository) *VersionService {
	return &VersionService{repo: repo}
}

func (svc *VersionService) List(ctx context.Context, params domain.ListVersionsParams) (domain.Versions, error) {
	return svc.repo.List(ctx, params)
}
