zoom

package
v0.0.0-...-4c7982d Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute starts the server

func StartWorkerService

func StartWorkerService(data *ServiceData) error

StartWorkerService starts the event queue listener service to listen for events

Types

type AudioDuration

type AudioDuration interface {
	Get(string, io.Reader) (time.Duration, error)
}

AudioDuration provides audio len for file/io.Reader

type FilesGetter

type FilesGetter interface {
	List(ID string) ([]string, error)
}

FilesGetter retrieves file for ID

type ServiceData

type ServiceData struct {
	MessageSender       messages.Sender
	InformMessageSender messages.Sender
	Publisher           messages.Publisher
	StatusSaver         status.Saver
	StatusProvider      StatusProvider
	ResultSaver         manager.ResultSaver
	FilesGetter         FilesGetter
	Loader              result.FileLoader
	AudioLen            AudioDuration
	FileSaver           upload.FileSaver
	RequestSaver        upload.RequestSaver
	DB                  WorkPersistence
	DecodeMultiCh       <-chan amqp.Delivery
	JoinAudioCh         <-chan amqp.Delivery
	JoinResultsCh       <-chan amqp.Delivery
	OneCompletedCh      <-chan amqp.Delivery
	OneStatusCh         <-chan amqp.Delivery
	// contains filtered or unexported fields
}

ServiceData keeps data required for service work

type StatusProvider

type StatusProvider interface {
	Get(ID string) (*stapi.TranscriptionResult, error)
}

StatusProvider returns status by ID

type WorkPersistence

type WorkPersistence interface {
	Save(*persistence.WorkData) error
	Get(ID string) (*persistence.WorkData, error)
}

WorkPersistence save, gets data to DB

Jump to

Keyboard shortcuts

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