Extract logic into transcribe service
This commit is contained in:
@@ -16,3 +16,13 @@ type File struct {
|
||||
Size int64
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
func (f *File) CopyWithStorage(newId, storage string) *File {
|
||||
return &File{
|
||||
Id: newId,
|
||||
Storage: storage,
|
||||
FileName: f.FileName,
|
||||
Size: f.Size,
|
||||
CreatedAt: time.Now(),
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,6 @@ type TranscribeJob struct {
|
||||
const (
|
||||
StateCreated = "created"
|
||||
StateConverted = "converted"
|
||||
StateUploaded = "uploaded"
|
||||
StateTranscribe = "transcribe"
|
||||
StateDone = "done"
|
||||
StateFailed = "failed"
|
||||
|
Reference in New Issue
Block a user