Documentation ¶
Index ¶
- func CreateKeyword(w http.ResponseWriter, r *http.Request)
- func CreatePlaylist(w http.ResponseWriter, r *http.Request)
- func CreateVideoInPlaylist(w http.ResponseWriter, r *http.Request)
- func DeauthorizeToPlaylist(w http.ResponseWriter, r *http.Request)
- func DeleteVideo(w http.ResponseWriter, r *http.Request)
- func GetKeywords(w http.ResponseWriter, r *http.Request)
- func GetPlaylistByPublicID(w http.ResponseWriter, r *http.Request)
- func GetPublicPlaylists(w http.ResponseWriter, r *http.Request)
- func RequestAccessToPlaylist(w http.ResponseWriter, r *http.Request)
- func WriteErrorReply(w http.ResponseWriter, httpCode int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKeyword ¶
func CreateKeyword(w http.ResponseWriter, r *http.Request)
CreateKeyword insert a new keyword to the database, if it already exists, returns the existing one.
func CreatePlaylist ¶
func CreatePlaylist(w http.ResponseWriter, r *http.Request)
CreatePlaylist Insert a new playlist in the database based on the data delivered in JSON format.
func CreateVideoInPlaylist ¶
func CreateVideoInPlaylist(w http.ResponseWriter, r *http.Request)
CreateVideoInPlaylist Insert a video in a given playlist if the user has access to do so
func DeauthorizeToPlaylist ¶
func DeauthorizeToPlaylist(w http.ResponseWriter, r *http.Request)
DeauthorizeToPlaylist set the cookie related to the given playlist to expire
func DeleteVideo ¶
func DeleteVideo(w http.ResponseWriter, r *http.Request)
DeleteVideo this is the handler that takes care of the hability to delete a given video from a specific playlist
func GetKeywords ¶
func GetKeywords(w http.ResponseWriter, r *http.Request)
GetKeywords return a list of (max 10) keywords to be used as part of a new playlist
func GetPlaylistByPublicID ¶
func GetPlaylistByPublicID(w http.ResponseWriter, r *http.Request)
GetPlaylistByPublicID returns a given playlist by it's public ID.
func GetPublicPlaylists ¶
func GetPublicPlaylists(w http.ResponseWriter, r *http.Request)
GetPublicPlaylists returns a list of playlist based on the Limit and offset.
func RequestAccessToPlaylist ¶
func RequestAccessToPlaylist(w http.ResponseWriter, r *http.Request)
RequestAccessToPlaylist authorize or deny access to a given playlist.
func WriteErrorReply ¶
func WriteErrorReply(w http.ResponseWriter, httpCode int)
WriteErrorReply create an error response to the user and add it to the responsewriter
Types ¶
This section is empty.