handler

package
v0.0.0-...-e9cad45 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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