handlers.go 638 B

12345678910111213141516171819202122232425
  1. package main
  2. type Status struct{
  3. Playing bool //If the device is playing
  4. PlayingFileName string //The playing filename
  5. PlayingFileURL string //The playing URL
  6. PlayingPosition int //The number of seconds that is currently playing
  7. Volume int //The volume currently is playing at, in percentage
  8. Status string //Status of the device, support {downloading, converting, playing, paused}
  9. }
  10. func handleIndex(w http.ResponseWriter, r *http.Request){
  11. //Serve the index
  12. sendOK(w)
  13. }
  14. func handleStatus(w http.ResponseWriter, r *http.Request){
  15. }
  16. func handleEndpoints(w http.ResponseWriter, r *http.Request){
  17. }