service

package
v0.0.0-...-2f4d8a3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 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 Audio

type Audio interface {
	GetAudioModel() domain.AudioModel
}

func NewAudio

func NewAudio(audioModel domain.AudioModel) (Audio, error)

type AudioRepository

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

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

	FindByLangAndText(ctx context.Context, lang5 domain.Lang5, text string) (Audio, error)

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

type RepositoryFactory

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

type RepositoryFactoryFunc

type RepositoryFactoryFunc func(ctx context.Context, db *gorm.DB) (RepositoryFactory, error)

type SynthesizerClient

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

type Transaction

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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