service

package
v0.0.0-...-9941730 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioProcessingService

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

AudioProcessingService es un servicio que maneja la descarga, codificación y almacenamiento de audio.

func NewAudioProcessingService

func NewAudioProcessingService(log logger.Logger, storage port.Storage,
	downloader downloader.Downloader,
	operationStore port.OperationRepository,
	metadataStore port.MetadataRepository,
	messaging port.MessageQueue,
	config *config.Config) *AudioProcessingService

NewAudioProcessingService crea una nueva instancia de AudioProcessingService con las configuraciones proporcionadas.

func (*AudioProcessingService) ProcessAudio

func (a *AudioProcessingService) ProcessAudio(ctx context.Context, operationID string, youtubeMetadata *api.VideoDetails) error

ProcessAudio procesa el audio descargando, codificando y almacenando en S3, con reintentos en caso de fallos.

func (*AudioProcessingService) StartOperation

func (a *AudioProcessingService) StartOperation(ctx context.Context, songID string) (string, string, error)

StartOperation inicia una nueva operación de procesamiento de audio y guarda su estado inicial.

type AudioProcessor

type AudioProcessor interface {
	StartOperation(ctx context.Context, song string) (string, string, error)
	ProcessAudio(ctx context.Context, operationID string, metadata *api.VideoDetails) error
}

AudioProcessingService es un servicio que maneja la descarga, codificación y almacenamiento de audio.

Jump to

Keyboard shortcuts

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