// Package port defines interfaces (ports) for external dependencies.
package port

import (
	"context"

	"github.com/orchard9/rdev/internal/domain"
)

// RegistryProvider manages container registry operations.
type RegistryProvider interface {
	// Check returns the health status of the registry.
	Check(ctx context.Context) domain.RegistryStatus

	// ListRepositories returns all repositories in the registry.
	ListRepositories(ctx context.Context) ([]string, error)

	// ListProjectRepositories returns all repositories for a specific project.
	// This includes both the main repo and sub-repos like cache.
	ListProjectRepositories(ctx context.Context, projectID string) ([]string, error)

	// DeleteRepository deletes all tags and manifests for a repository.
	DeleteRepository(ctx context.Context, repo string) error

	// DeleteProjectRepositories deletes all repositories for a project.
	// This should be called during project teardown to reclaim storage.
	DeleteProjectRepositories(ctx context.Context, projectID string) error
}
