controller

package
v0.0.0-...-03a5e5a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMovies

func AllMovies(order int) []model.Movie

returns all movies in specified order

func DeleteMovie

func DeleteMovie(w http.ResponseWriter, r *http.Request)

function to remove a movie from database

func GetMovie

func GetMovie(w http.ResponseWriter, r *http.Request)

function to get movie by id

func InsertMovie

func InsertMovie(w http.ResponseWriter, r *http.Request)

Function to insert/create a new movie into the db

func MoviesById

func MoviesById(w http.ResponseWriter, r *http.Request)

Function to return all movies from the database ordered by ID

func MoviesByRating

func MoviesByRating(w http.ResponseWriter, r *http.Request)

Same as MoviesById but ordered by rating

func UpdateMovie

func UpdateMovie(w http.ResponseWriter, r *http.Request)

function to update the data associated with a movie (given movie ID)

func UploadFile

func UploadFile(w http.ResponseWriter, r *http.Request)

Upload file to /tmp/uploaded_rankings directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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