ipcast.go 633 B

123456789101112131415161718192021222324252627
  1. package ipcast
  2. import (
  3. "github.com/gin-gonic/gin"
  4. v1 "lcfns/api/v1"
  5. )
  6. type IpcastRouter struct {
  7. }
  8. func (c *IpcastRouter) InitInfoRouter(priRouter, pubRouter *gin.RouterGroup) {
  9. var ipApi = v1.ApiGroupApp.IpcastApiGroup.IpcastApi
  10. ipGroup := priRouter.Group("ipcast")
  11. {
  12. ipGroup.GET("list", ipApi.List)
  13. ipGroup.POST("play", ipApi.Play)
  14. ipGroup.DELETE("stop", ipApi.Stop)
  15. ipGroup.GET("status", ipApi.Status)
  16. ipGroup.GET("ping", ipApi.Ping)
  17. ipGroup.POST("volume", ipApi.Volume)
  18. ipGroup.POST("playAudio", ipApi.PlayAudio)
  19. }
  20. pub := pubRouter.Group("ipcast")
  21. {
  22. pub.GET("AudioSource/:id", ipApi.AudioSource)
  23. }
  24. }