Documentation ¶
Index ¶
- func CreateSeries(w http.ResponseWriter, r *http.Request, database *sql.DB, appDirectory *string)
- func CreateSplash(w http.ResponseWriter, r *http.Request)
- func CreateVideo(w http.ResponseWriter, r *http.Request, database *sql.DB, appDirectory *string)
- func DeleteSeries(w http.ResponseWriter, r *http.Request, database *sql.DB, appDirectory *string)
- func DeleteSplash(w http.ResponseWriter, r *http.Request)
- func DeleteVideo(w http.ResponseWriter, r *http.Request, database *sql.DB, appDirectory *string)
- func ReadCover(w http.ResponseWriter, r *http.Request, database *sql.DB, appDirectory *string)
- func ReadSeries(w http.ResponseWriter, r *http.Request, database *sql.DB)
- func ReadSeriesEpisodes(w http.ResponseWriter, r *http.Request, database *sql.DB)
- func ReadSplash(w http.ResponseWriter, r *http.Request)
- func ReadVideo(w http.ResponseWriter, r *http.Request, database *sql.DB)
- func StreamHandler(w http.ResponseWriter, r *http.Request, database *sql.DB, appDirectory *string)
- func UpdateSplash(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSeries ¶
Uploads a series, its episodes, and its cover to the database and stores them within the storage folder.
Specifications: ¶
- Method : POST
- Endpoint : /series
- Auth? : False
HTTP request multipart form: ¶
- video-files : REQUIRED. Uploaded video files.
- name : REQUIRED. Name of the soon-to-be uploaded series.
- description : REQUIRED. Description of the series.
HTTP response JSON contents: ¶
- status_code : HTTP status code.
- message : If error, Message detailing the error.
- data : Series id, title
func CreateSplash ¶
func CreateSplash(w http.ResponseWriter, r *http.Request)
Uploads a new splash art to a series.
func CreateVideo ¶
Allows the client to upload a video to the file system and store its information to the database.
Specifications: ¶
- Method : POST
- Endpoint : /videos
- Auth? : False
HTTP form data: ¶
- series-id : REQUIRED. Series id.
- title : REQUIRED. Video title.
HTTP response JSON contents: ¶
- status_code : HTTP status code.
- message : If error, message detailing the error.
func DeleteSeries ¶
Deletes a series, its episodes, and its cover from the database and storage folders.
Specifications: ¶
- Method : DELETE
- Endpoint : /series/{id}
- Auth? : False
HTTP request path parameters: ¶
- id : REQUIRED. UUID of the series.
HTTP response JSON contents: ¶
- status_code : HTTP status code.
- message : If error, Message detailing the error.
func DeleteSplash ¶
func DeleteSplash(w http.ResponseWriter, r *http.Request)
Delete an existing series's splash art.
func DeleteVideo ¶
Deletes a video from the database and file system.
Specifications: ¶
- Method : DELETE
- Endpoint : /videos/{id}
- Auth? : False
HTTP request path parameters: ¶
- id : REQUIRED. UUID of the video.
func ReadCover ¶
Returns the covers stored in the database and file-system. If none are present, return a placeholder cover.
Specifications: ¶
- Method : GET
- Endpoint : /series/{id}/cover
- Auth? : False
HTTP request path parameters: ¶
- id : REQUIRED. UUID of the series.
func ReadSeries ¶
Gets and returns an array of series stored in the database.
Specifications: ¶
- Method : GET
- Endpoint : /series/{id}
- Auth? : False
HTTP request query parameters: ¶
- series_id : OPTIONAL. UUID of the series.
HTTP response JSON contents: ¶
- status_code : HTTP status code.
- message : If error, Message detailing the error.
- data : Series contents, each returning id, episode count, title, description.
func ReadSeriesEpisodes ¶
Gets and returns an array of episodes of a series stored in the database.
Specifications: ¶
- Method : GET
- Endpoint : /series/{id}/episodes
- Auth? : False
HTTP request path parameters: ¶
- id : REQUIRED. UUID of the series.
HTTP response JSON contents: ¶
- status_code : HTTP status code.
- message : If error, Message detailing the error.
- data : Series episodes, each returning id, episode.
func ReadSplash ¶
func ReadSplash(w http.ResponseWriter, r *http.Request)
Return an existing series's splash art.
func ReadVideo ¶
Allows the client to retrieve the details of a specific uploaded video via passed in id.
Specifications: ¶
- Method : GET
- Endpoint : /videos/{id}
- Auth? : False
HTTP request path parameters: ¶
- id : REQUIRED. UUID of the video.
HTTP response JSON contents: ¶
- status_code : HTTP status code.
- message : If error, message detailing the error.
- data : id, series_id, title (if empty, json data is empty)
func StreamHandler ¶
Returns a video stream to the client using the id.
Specifications: ¶
- Method : GET
- Endpoint : /stream/{id}
- Auth? : False
HTTP request path parameters: ¶
- id : REQUIRED. UUID of the video.
func UpdateSplash ¶
func UpdateSplash(w http.ResponseWriter, r *http.Request)
Update an existing series's splash art.
Types ¶
This section is empty.