storage

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorage

func NewStorage(config *storage.StorageConfig) (storage.Storage, error)

NewStorage crée une nouvelle instance de storage basée sur la configuration

Types

type StorageService

type StorageService struct {
	// contains filtered or unexported fields
}

func NewStorageService

func NewStorageService(storage storage.Storage) *StorageService

func (*StorageService) CleanupJob

func (s *StorageService) CleanupJob(ctx context.Context, jobID uuid.UUID) error

CleanupJob supprime tous les fichiers liés à un job

func (*StorageService) DownloadJobSource

func (s *StorageService) DownloadJobSource(ctx context.Context, jobID uuid.UUID, filename string) (io.Reader, error)

DownloadJobSource télécharge un fichier source

func (*StorageService) DownloadResult

func (s *StorageService) DownloadResult(ctx context.Context, courseID uuid.UUID, filename string) (io.Reader, error)

DownloadResult télécharge un résultat généré

func (*StorageService) GetJobLog

func (s *StorageService) GetJobLog(ctx context.Context, jobID uuid.UUID) (string, error)

GetJobLog récupère les logs d'un job

func (*StorageService) GetJobSourceTree added in v0.0.4

func (s *StorageService) GetJobSourceTree(ctx context.Context, jobID uuid.UUID) (map[string][]string, error)

GetJobSourceTree retourne l'arbre des fichiers sources organisé par dossiers

func (*StorageService) GetResultURL

func (s *StorageService) GetResultURL(ctx context.Context, courseID uuid.UUID, filename string) (string, error)

GetResultURL retourne l'URL d'accès à un résultat

func (*StorageService) ListJobSources

func (s *StorageService) ListJobSources(ctx context.Context, jobID uuid.UUID) ([]string, error)

ListJobSources liste les fichiers source d'un job avec leurs chemins complets

func (*StorageService) ListResults

func (s *StorageService) ListResults(ctx context.Context, courseID uuid.UUID) ([]string, error)

ListResults liste les fichiers de résultat d'un cours

func (*StorageService) SaveJobLog

func (s *StorageService) SaveJobLog(ctx context.Context, jobID uuid.UUID, logContent string) error

SaveJobLog sauvegarde les logs d'un job

func (*StorageService) UploadJobSource

func (s *StorageService) UploadJobSource(ctx context.Context, jobID uuid.UUID, filename string, content io.Reader) error

UploadJobSource upload un fichier source unique

func (*StorageService) UploadJobSourceWithPath added in v0.0.4

func (s *StorageService) UploadJobSourceWithPath(ctx context.Context, jobID uuid.UUID, filePath string, content io.Reader) error

UploadJobSourceWithPath upload un fichier source avec un chemin explicite

func (*StorageService) UploadJobSources

func (s *StorageService) UploadJobSources(ctx context.Context, jobID uuid.UUID, files []*multipart.FileHeader) error

UploadJobSources upload les fichiers source pour un job

func (*StorageService) UploadResult

func (s *StorageService) UploadResult(ctx context.Context, courseID uuid.UUID, filename string, content io.Reader) error

UploadResult upload le résultat généré pour un cours

func (*StorageService) ValidateFile

func (s *StorageService) ValidateFile(filePath string) error

ValidateFile valide un fichier uploadé

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL