Documentation ¶
Overview ¶
Package core implements the core backend service for the app
Index ¶
- func AuthTokenHandler(w http.ResponseWriter, r *http.Request)
- func StatusHandler(w http.ResponseWriter, r *http.Request)
- type AppError
- func AddSubs(w http.ResponseWriter, r *http.Request) *AppError
- func DelSubs(w http.ResponseWriter, r *http.Request) *AppError
- func GetNotifications(w http.ResponseWriter, r *http.Request) *AppError
- func GetRepos(w http.ResponseWriter, r *http.Request) *AppError
- func GetSubs(w http.ResponseWriter, r *http.Request) *AppError
- func UpdateSub(w http.ResponseWriter, r *http.Request) *AppError
- func UserAdd(w http.ResponseWriter, r *http.Request) *AppError
- func UserGet(w http.ResponseWriter, r *http.Request) *AppError
- func UserUpdate(w http.ResponseWriter, r *http.Request) *AppError
- type GetHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthTokenHandler ¶
func AuthTokenHandler(w http.ResponseWriter, r *http.Request)
AuthTokenHandler verifies the passed token with firebase returns a user object as a JSON if succcessful
func StatusHandler ¶
func StatusHandler(w http.ResponseWriter, r *http.Request)
StatusHandler is used for debugging the app as an admin
Types ¶
type AppError ¶
AppError xports type for a Handler errors
func AddSubs ¶
func AddSubs(w http.ResponseWriter, r *http.Request) *AppError
AddSubs retrieves subscriptions for a given user
func DelSubs ¶
func DelSubs(w http.ResponseWriter, r *http.Request) *AppError
DelSubs retrieves subscriptions for a given user
func GetNotifications ¶
func GetNotifications(w http.ResponseWriter, r *http.Request) *AppError
GetNotifications retrieves notifications sent for a given user
func GetRepos ¶
func GetRepos(w http.ResponseWriter, r *http.Request) *AppError
GetRepos retrieves open issue counts for repositories that a user subscribes to
func GetSubs ¶
func GetSubs(w http.ResponseWriter, r *http.Request) *AppError
GetSubs retrieves subscriptions for a given user
func UpdateSub ¶
func UpdateSub(w http.ResponseWriter, r *http.Request) *AppError
UpdateSub updates subscriptions for a given user
func UserAdd ¶
func UserAdd(w http.ResponseWriter, r *http.Request) *AppError
UserAdd handles creation of a new user
func UserGet ¶
func UserGet(w http.ResponseWriter, r *http.Request) *AppError
UserGet retrieves a given user from the request
func UserUpdate ¶
func UserUpdate(w http.ResponseWriter, r *http.Request) *AppError
UserUpdate updates a user's preferences
type GetHandler ¶
type GetHandler func(http.ResponseWriter, *http.Request) *AppError
GetHandler wraps a handler func with error handling logic http://blog.golang.org/error-handling-and-go
func (GetHandler) ServeHTTP ¶
func (fn GetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)