grpc

package
v0.0.0-...-f378178 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const ICouldNotProcessYourRequestEN = "I could not process your request"

Variables

View Source
var PlayRegs = map[string]func(cmd, token, serverIP string, srv *Server) (textResponse string, isError bool, items []*api.LibraryItem){
	`^play (.*) from my library$`: handlePlayLibraryCommand,
	`^play some music by (.*)$`:   handlePlayLibraryCommand,
	`^play (.*) by (.*)$`:         handlePlayLibraryCommand,
}

Functions

func PlayForward

func PlayForward(cmd, token string) (textResponse string, isError bool, items []*api.LibraryItem)

func UnknownCmdForward

func UnknownCmdForward(cmd, token string) (textResponse string, isError bool, items []*api.LibraryItem)

Types

type Server

type Server struct {
	// UUID - State
	NodeStates        *node.StateType
	MusicDir          string
	HTTPServerAddress string
	Authenticator     *auth.Authenticator
	Library           *library.Library
	IndexTicker       *time.Ticker
}

func NewGRPCServer

func NewGRPCServer(musicDir, httpServerAddress string, authenticator *auth.Authenticator) (s *Server)

func (*Server) ClientConfig

func (s *Server) ClientConfig(ctx context.Context, request *api.ClientMessage) (reply *api.ClientConfigMessage, err error)

func (*Server) HandleServerSideCommand

func (s *Server) HandleServerSideCommand(ctx context.Context, request *api.TTSRequest) (reply *api.OpenVAServerResponse, err error)

func (*Server) HeartBeat

func (s *Server) HeartBeat(stream api.OpenVAService_HeartBeatServer) (err error)

func (*Server) STT

func (s *Server) STT(stream api.OpenVAService_STTServer) (err error)

func (*Server) StartPeriodicIndexUpdater

func (s *Server) StartPeriodicIndexUpdater()

func (*Server) Stop

func (s *Server) Stop()

func (*Server) TTSStringToMP3

func (s *Server) TTSStringToMP3(ctx context.Context, request *api.TTSRequest) (reply *api.TTSReply, err error)

Jump to

Keyboard shortcuts

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