web

package
v0.0.0-...-914d8c5 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SESSION_USER_ID = "user_id"
)

Variables

This section is empty.

Functions

func AuthTest

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

This Handler is used only to check if the user is indeed authenticated

func DeleteManga

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

Handler to delete manga

func DeleteMangas

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

Handler to delete mangas

func DeleteNotification

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

Handler to delete a notification

func Manga

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

Handler to fetch a manga

func Mangas

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

Handler to fetch the list of mangas

func NewMangas

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

Handler to fetch the list of mangas

func NewOAuth

func NewOAuth() negroni.Handler

Returns a new Negroni middleware using Google OAuth2

func NewRouter

func NewRouter() *mux.Router

Returns the routers for novels, feeds and notifications

func NewSignInRouter

func NewSignInRouter() *mux.Router

Returns a router for signing in Google account

func Notification

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

Handler to fetch a notification

func Notifications

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

Handler to fetch the list of notifications

func SaveManga

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

Handler to save a manga

func SaveMangas

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

Handler to delete mangas

func SignIn

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

Handler to sign in Google account

func SignOut

func SignOut() negroni.HandlerFunc

Handler that redirects user to the login page

func UpdateManga

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

Handler to update a manga

func Users

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

func WrapWithCheckAuth

func WrapWithCheckAuth(handlerFunc http.HandlerFunc) http.HandlerFunc

Wrap the HandlerFunc by checking if the user is indeed authenticated

Types

type JsonErr

type JsonErr struct {
	Code int
	Text string
}

Error structure

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

type UserInfo

type UserInfo struct {
	Id      string
	Email   string
	Picture string
}

The user info for Google account

Jump to

Keyboard shortcuts

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