package
0.0.0-20210313184923-e9cad45b815e
Repository: https://github.com/collabyt/backend.git
Documentation: pkg.go.dev
# Functions
CreateKeyword creates a new keyword in the database if it doesn't existalready.
CreateKeywordsRelation Execute one single SQL instruction relating existing keywords from the database with a unique Playlist.
CreatePlaylist create a new playlist, either public or private.
CreateSession stores in the database the created session for further database validation.
CreateVideoInPlaylist Creates a video in the database including it's relation with the playlist to which the video belongs.
CreateVideosFromPlaylist insert into the database all the videos inserted with the playlist.
DeleteSessionBySessionID erase from the database the Session by it's session ID string.
DeleteVideo deletes a video from the database.
GetKeywordsByID Given a slice of id's, this will return a list a keywords with all keyword from such slice.
GetKeywordsByPartialWord returns a list of keyword with a maximum amount of 10.
GetKeywordsByPlaylistID get all keywords that are associated with a given Playlist.
GetPlaylistByPublicID returns a single playlist including all it's videos and keywords.
GetPublicPlaylistsByLimitAndOffset given a limit and offset, returns a list of PUBLIC playlists from the database.
GetSessionBySessionID get the session from their base64 string.
GetVideosByPlaylistID retrieve all videos that belong to a specific playlist using the id from the database.
# Structs
Auth type holds the information given by the user to authenticate into a specific playlist.
Error represent a instance of a error that ocurred at some point in the application.
Keyword represent a single keyword database object with his own ID.
Playlist represent a single playlist to be created or reproduced.
Session is the structure of a valid session in the database or cookie.
Video refers to a video, which is a part of a playlist.