Documentation ¶
Overview ¶
This package implements all the functions which will answer users' requests
Index ¶
- func AboutHandler(w http.ResponseWriter, req *http.Request)
- func GetUserId(req *http.Request) int64
- func Login(w http.ResponseWriter, req *http.Request)
- func MainPageHandler(w http.ResponseWriter, req *http.Request)
- func MediaThumbnailHandler(w http.ResponseWriter, req *http.Request)
- func RedirectIfNotAdmin(w http.ResponseWriter, req *http.Request) bool
- func RedirectIfNotAuthenticated(w http.ResponseWriter, req *http.Request) bool
- func SignInHandler(w http.ResponseWriter, req *http.Request)
- func Signout(w http.ResponseWriter, req *http.Request)
- func Signup(w http.ResponseWriter, req *http.Request)
- func StreamMedia(w http.ResponseWriter, req *http.Request)
- func SubtitlesServerHandler(w http.ResponseWriter, req *http.Request)
- func VideoDetailHandler(w http.ResponseWriter, req *http.Request)
- func VideoGetAllHandler(w http.ResponseWriter, req *http.Request)
- func VideoGetSubtitles(w http.ResponseWriter, req *http.Request)
- func VideoMenuHandler(w http.ResponseWriter, req *http.Request)
- type About
- type ViewInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AboutHandler ¶
func AboutHandler(w http.ResponseWriter, req *http.Request)
Display the "About" page
func MainPageHandler ¶
func MainPageHandler(w http.ResponseWriter, req *http.Request)
Handle the homepage
func MediaThumbnailHandler ¶
func MediaThumbnailHandler(w http.ResponseWriter, req *http.Request)
IMDB media proxy
func RedirectIfNotAdmin ¶
func RedirectIfNotAdmin(w http.ResponseWriter, req *http.Request) bool
Check if the user has admin rights. If he is not authenticated, he will be redirected to the signin page If he is authenticated but without admin rights, a StatusForbidden code is set The function returns whether or not the user is unauthorized
func RedirectIfNotAuthenticated ¶
func RedirectIfNotAuthenticated(w http.ResponseWriter, req *http.Request) bool
Check if the user is authenticated If he is not authenticated, he will be redirected to the signin page The function returns whether or not the user is unauthorized
func SignInHandler ¶
func SignInHandler(w http.ResponseWriter, req *http.Request)
Display the sign in page
func SubtitlesServerHandler ¶
func SubtitlesServerHandler(w http.ResponseWriter, req *http.Request)
Serve subtitle files
func VideoDetailHandler ¶
func VideoDetailHandler(w http.ResponseWriter, req *http.Request)
Return video informations
func VideoGetAllHandler ¶
func VideoGetAllHandler(w http.ResponseWriter, req *http.Request)
Return a Json object with all the authorized videos
func VideoGetSubtitles ¶
func VideoGetSubtitles(w http.ResponseWriter, req *http.Request)
Call the OpenSubtitles API
func VideoMenuHandler ¶
func VideoMenuHandler(w http.ResponseWriter, req *http.Request)
Display the video homepage