Documentation ¶
Index ¶
- Constants
- Variables
- func PlayForward(cmd, token string) (textResponse string, isError bool, items []*api.LibraryItem)
- func UnknownCmdForward(cmd, token string) (textResponse string, isError bool, items []*api.LibraryItem)
- type Server
- func (s *Server) ClientConfig(ctx context.Context, request *api.ClientMessage) (reply *api.ClientConfigMessage, err error)
- func (s *Server) HandleServerSideCommand(ctx context.Context, request *api.TTSRequest) (reply *api.OpenVAServerResponse, err error)
- func (s *Server) HeartBeat(stream api.OpenVAService_HeartBeatServer) (err error)
- func (s *Server) STT(stream api.OpenVAService_STTServer) (err error)
- func (s *Server) StartPeriodicIndexUpdater()
- func (s *Server) Stop()
- func (s *Server) TTSStringToMP3(ctx context.Context, request *api.TTSRequest) (reply *api.TTSReply, err error)
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) StartPeriodicIndexUpdater ¶
func (s *Server) StartPeriodicIndexUpdater()
func (*Server) TTSStringToMP3 ¶
Click to show internal directories.
Click to hide internal directories.