Documentation ¶
Index ¶
- Constants
- func AuthTest(w http.ResponseWriter, r *http.Request)
- func DeleteNotification(w http.ResponseWriter, r *http.Request)
- func DeleteNovel(w http.ResponseWriter, r *http.Request)
- func GetUserId(r *http.Request, c chan string)
- func NewOAuth() negroni.Handler
- func NewRouter() *mux.Router
- func NewSignInRouter() *mux.Router
- func Notification(w http.ResponseWriter, r *http.Request)
- func Notifications(w http.ResponseWriter, r *http.Request)
- func Novel(w http.ResponseWriter, r *http.Request)
- func Novels(w http.ResponseWriter, r *http.Request)
- func SaveNovel(w http.ResponseWriter, r *http.Request)
- func SearchNovels(w http.ResponseWriter, r *http.Request)
- func SignIn(w http.ResponseWriter, r *http.Request)
- func UpdateNovel(w http.ResponseWriter, r *http.Request)
- type JsonErr
- type Route
- type Routes
- type UserInfo
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 DeleteNotification ¶
func DeleteNotification(w http.ResponseWriter, r *http.Request)
Handler to delete a notification
func DeleteNovel ¶
func DeleteNovel(w http.ResponseWriter, r *http.Request)
Handler to delete a novel
func GetUserId ¶
Get the user ID from a given token. It will make a GET request to https://www.googleapis.com/oauth2/v1/userinfo?access_token=...
func NewSignInRouter ¶
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 Novels ¶
func Novels(w http.ResponseWriter, r *http.Request)
Handler to fetch the list of novels
func SearchNovels ¶ added in v0.0.3
func SearchNovels(w http.ResponseWriter, r *http.Request)
Handler to search novels
func UpdateNovel ¶
func UpdateNovel(w http.ResponseWriter, r *http.Request)
Handler to update a novel
Types ¶
Click to show internal directories.
Click to hide internal directories.