service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartWebServer

func StartWebServer(data *Data) error

StartWebServer starts the HTTP service and listens for the admin requests

Types

type Configurator

type Configurator interface {
	Configure(*http.Request, *api.Input) (*api.TTSRequestConfig, error)
}

Configurator configures request from header and request and configuration

type Data

type Data struct {
	Port           int
	SyntData       PrData
	SyntCustomData PrData
}

Data is service operation data

type PrData

type PrData struct {
	Processor    Synthesizer
	Configurator Configurator
}

PrData is method process data

type Synthesizer

type Synthesizer interface {
	Work(*api.TTSRequestConfig) (*api.Result, error)
}

Synthesizer main sythesis processor

type TTSConfigutaror

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

TTSConfigutaror tts request configuration

func NewTTSConfigurator

func NewTTSConfigurator(cfg *viper.Viper) (*TTSConfigutaror, error)

NewTTSConfigurator creates the initial request configuration

func (*TTSConfigutaror) Configure

func (c *TTSConfigutaror) Configure(r *http.Request, inText *api.Input) (*api.TTSRequestConfig, error)

Configure prepares request configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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