Documentation ¶
Index ¶
- func AuthorizeClientHandler(w http.ResponseWriter, r *http.Request)
- func AuthorizeUserHandler(w http.ResponseWriter, r *http.Request)
- func CorsHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
- func CreateClientHandler(w http.ResponseWriter, r *http.Request)
- func CreateUserHandler(w http.ResponseWriter, r *http.Request)
- func IdentifyClientHandler(w http.ResponseWriter, r *http.Request)
- func JSONHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
- func Middleware(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
- func PostHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
- func PreflightRequestHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
- func ResetHandler(w http.ResponseWriter, r *http.Request)
- func ResetTokenHandler(w http.ResponseWriter, r *http.Request)
- func SetupSMTP(smtpfrom string, smtppass string, pukkalink string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizeClientHandler ¶
func AuthorizeClientHandler(w http.ResponseWriter, r *http.Request)
AuthorizeClientHandler - authorize a client for a user given ClientAccessRequest
func AuthorizeUserHandler ¶
func AuthorizeUserHandler(w http.ResponseWriter, r *http.Request)
AuthorizeUserHandler - authorize a user given email and password
func CorsHandler ¶
func CorsHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
CorsHandler - set all CORS headers
func CreateClientHandler ¶
func CreateClientHandler(w http.ResponseWriter, r *http.Request)
CreateClientHandler - create a new client
func CreateUserHandler ¶
func CreateUserHandler(w http.ResponseWriter, r *http.Request)
CreateUserHandler - create a new user
func IdentifyClientHandler ¶
func IdentifyClientHandler(w http.ResponseWriter, r *http.Request)
IdentifyClientHandler - identify a client given ClientIdentificationRequest
func JSONHandler ¶
func JSONHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
JSONHandler - ensure all requests have JSON payloads
func Middleware ¶
func Middleware(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
Middleware - chain all middleware handlers in one nice convenient function :))
func PostHandler ¶
func PostHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
PostHandler - ensure all requests to API are posts
func PreflightRequestHandler ¶
func PreflightRequestHandler(fn func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)
PreflightRequestHandler - respond with OK on CORS preflight check
func ResetHandler ¶
func ResetHandler(w http.ResponseWriter, r *http.Request)
ResetHandler - handle reset password requests
func ResetTokenHandler ¶
func ResetTokenHandler(w http.ResponseWriter, r *http.Request)
ResetTokenHandler - handle requests for a reset password token
Types ¶
This section is empty.