service

package
v0.0.0-...-df3562f Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAudioNotFound = errors.New("Audio not found")

Functions

This section is empty.

Types

type AudioFile

type AudioFile interface {
	Duration(ctx context.Context, audioContent []byte) (time.Duration, error)
}

type AudioRepository

type AudioRepository interface {
	AddAudio(ctx context.Context, lang5 *libdomain.Lang5, text, audioContent string, audioLength time.Duration) (*domain.AudioID, error)

	FindAudioByAudioID(ctx context.Context, audioID *domain.AudioID) (*domain.AudioModel, error)

	FindByLangAndText(ctx context.Context, lang5 *libdomain.Lang5, text string) (*domain.AudioModel, error)

	FindAudioIDByText(ctx context.Context, lang5 *libdomain.Lang5, text string) (*domain.AudioID, error)
}

type RepositoryFactory

type RepositoryFactory interface {
	NewAudioRepository(ctx context.Context) AudioRepository
}

type SynthesizerClient

type SynthesizerClient interface {
	Synthesize(ctx context.Context, lang5 *libdomain.Lang5, voice, text string) (string, error)
}

type TransactionManager

type TransactionManager interface {
	Do(ctx context.Context, fn func(rf RepositoryFactory) error) error
}

Jump to

Keyboard shortcuts

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