Refactor project structure

This commit is contained in:
2025-08-12 14:15:26 +03:00
parent 983de269ad
commit e1cb261570
8 changed files with 30 additions and 30 deletions

View File

@@ -0,0 +1,36 @@
package contract
import (
"fmt"
"time"
"git.vakhrushev.me/av/transcriber/internal/entity"
)
type JobNotFoundError struct {
State string
Message string
}
func (e *JobNotFoundError) Error() string {
return fmt.Sprintf("%s - %s", e.State, e.Message)
}
type FileRepository interface {
Create(file *entity.File) error
GetByID(id string) (*entity.File, error)
}
type TranscriptJobRepository interface {
Create(job *entity.TranscribeJob) error
Save(job *entity.TranscribeJob) error
GetByID(id string) (*entity.TranscribeJob, error)
FindAndAcquire(state, acquisitionId string, rottingTime time.Time) (*entity.TranscribeJob, error)
}
type ObjectStorage interface {
}
type FileConverter interface {
Convert(src, dest string) error
}