Documentation
¶
Overview ¶
Package server implements the mog protocol.
Index ¶
- func FS(useLocal bool) http.FileSystem
- func Index(w http.ResponseWriter, r *http.Request)
- func JSON(h func(url.Values, httprouter.Params) (interface{}, error)) httprouter.Handle
- func ListenAndServe(stateFile, addr string, devMode bool) error
- type Playlist
- type PlaylistInfo
- type Seek
- type Server
- func (srv *Server) Cmd(form url.Values, ps httprouter.Params) (interface{}, error)
- func (srv *Server) Data(form url.Values, ps httprouter.Params) (interface{}, error)
- func (srv *Server) GetInstance(name, key string) (protocol.Instance, error)
- func (srv *Server) GetMux(devMode bool) *http.ServeMux
- func (srv *Server) ListenAndServe(addr string, devMode bool) error
- func (srv *Server) OAuth(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (srv *Server) PlaylistChange(form url.Values, ps httprouter.Params) (interface{}, error)
- func (srv *Server) ProtocolAdd(form url.Values, ps httprouter.Params) (interface{}, error)
- func (srv *Server) ProtocolRefresh(form url.Values, ps httprouter.Params) (interface{}, error)
- func (srv *Server) ProtocolRemove(form url.Values, ps httprouter.Params) (interface{}, error)
- func (srv *Server) QueueChange(form url.Values, ps httprouter.Params) (interface{}, error)
- func (srv *Server) WebSocket(ws *websocket.Conn)
- type SongID
- type State
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FS ¶
func FS(useLocal bool) http.FileSystem
FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func JSON ¶
func JSON(h func(url.Values, httprouter.Params) (interface{}, error)) httprouter.Handle
func ListenAndServe ¶
Types ¶
type PlaylistInfo ¶
type PlaylistInfo []listItem
type Seek ¶ added in v0.0.2
type Seek struct {
// contains filtered or unexported fields
}
type Server ¶
type Server struct { Queue Playlist Playlists map[string]Playlist Repeat bool Random bool Protocols map[string]map[string]protocol.Instance // Current song data. PlaylistIndex int // contains filtered or unexported fields }
func (*Server) GetInstance ¶
func (*Server) ListenAndServe ¶
ListenAndServe listens on the TCP network address addr and then calls Serve to handle requests on incoming connections.
func (*Server) OAuth ¶
func (srv *Server) OAuth(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func (*Server) PlaylistChange ¶
func (*Server) ProtocolAdd ¶
func (*Server) ProtocolRefresh ¶
func (*Server) ProtocolRemove ¶
func (*Server) QueueChange ¶
Click to show internal directories.
Click to hide internal directories.