upload

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//HeaderSaveTags http header name for providing tags for saving to DB
	HeaderSaveTags = "x-tts-save-tags"
)

Variables

This section is empty.

Functions

func StartWebServer

func StartWebServer(data *Data) error

StartWebServer starts echo web service

Types

type Data

type Data struct {
	Port         int
	Configurator *TTSConfigutaror
	Saver        FileSaver
	ReqSaver     RequestSaver
	MsgSender    MsgSender
}

Data keeps data required for service work

type FileSaver

type FileSaver interface {
	Save(name string, r io.Reader) error
}

FileSaver provides save file functionality

type MsgSender

type MsgSender interface {
	Send(msg amessages.Message, queue, replyQueue string) error
}

MsgSender provides send msg functionality

type RequestSaver

type RequestSaver interface {
	Save(req *persistence.ReqData) error
}

RequestSaver saves requests to DB

type TTSConfigutaror

type TTSConfigutaror struct {
	// contains filtered or unexported fields
}

TTSConfigutaror tts request configuration

func NewTTSConfigurator

func NewTTSConfigurator(format, voice string, voices []string) (*TTSConfigutaror, error)

NewTTSConfigurator creates the initial request configuration

func (*TTSConfigutaror) Configure

func (c *TTSConfigutaror) Configure(e echo.Context) (*persistence.ReqData, error)

Configure prepares request configuration

Jump to

Keyboard shortcuts

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