router

package
v0.0.0-...-9bc110c Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GinRouter

type GinRouter struct {
	Playlists    []*soundcloud.Playlist
	Tracks       []*soundcloud.Track
	PlaylistsMap *sync.Map
	Fetcher      *fetch.Client
}

GinRouter is a simple router that embeds the data

func (*GinRouter) AddRoutes

func (r *GinRouter) AddRoutes(e *gin.Engine)

AddRoutes will bind routes to an existing engine

func (*GinRouter) GetAllTracks

func (r *GinRouter) GetAllTracks(c *gin.Context)

GetAllTracks will return all the tracks in JSON format

func (*GinRouter) GetPlaylistTracks

func (r *GinRouter) GetPlaylistTracks(c *gin.Context)

GetPlaylistTracks will retrieve the playlist tracks

func (*GinRouter) GetPlaylists

func (r *GinRouter) GetPlaylists(c *gin.Context)

GetPlaylists will return the playlists in JSON format

func (*GinRouter) GetStream

func (r *GinRouter) GetStream(c *gin.Context)

GetStream gets a streamable URL

Jump to

Keyboard shortcuts

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