Documentation ¶
Index ¶
- func App() http.Handler
- func ContactListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ContactSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func CreateListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func CreatePhoto(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func CreateSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func CreateSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func DeleteListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func DeleteSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func DeleteSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func Error(w http.ResponseWriter, code int)
- func GetCurrentUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func LogoutUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func OriginValid(r *http.Request) bool
- func ParseJSONFromBody(r *http.Request, v interface{}) error
- func ReadListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ReadListings(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ReadSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ReadSavedSearches(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ReadSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ReadSeeks(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func RedirectUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func Router() http.Handler
- func SameOrigin(u1, u2 *url.URL) bool
- func Serve(w http.ResponseWriter, v interface{})
- func UpdateListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func UpdateListingStar(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func UpdateSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func UpdateSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContactListing ¶
func ContactListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ContactListing reads the listing from the params and sends notification and confirmation emails to the listing owner and current user
func ContactSeek ¶
func ContactSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ContactSeek reads the seek from the params and sends notification and confirmation emails to the seek owner and current user
func CreateListing ¶
func CreateListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
CreateListing creates a new listing based on the contents of r, owned by the current user, and then writes it to w with its keyId set
func CreatePhoto ¶
func CreatePhoto(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
CreatePhoto uploads the photo in r to Amazon S3 and writes its location to w
func CreateSavedSearch ¶
func CreateSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
CreateSavedSearch creates a new saved search based on the contents of r, owned by the current user, and then writes it to w with its keyId set
func CreateSeek ¶
func CreateSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
CreateSeek creates a new seek based on the contents of r, owned by the current user, and then writes it to w with its keyId set
func DeleteListing ¶
func DeleteListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
DeleteListing deletes the requested listing if it is owned by the current user
func DeleteSavedSearch ¶
func DeleteSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
DeleteSavedSearch delete the requested saved search if it is owned by the current user
func DeleteSeek ¶
func DeleteSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
DeleteSeek deletes the requested seek if it is owned by the current user
func Error ¶
func Error(w http.ResponseWriter, code int)
Error writes an HTTP error with default status text. It does not end the stream
func GetCurrentUser ¶
func GetCurrentUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
GetCurrentUser returns the current user, or an empty JSON object if not logged in
func LogoutUser ¶
func LogoutUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
LogoutUser logs the user out from CAS, if they are logged in, and redirects to app root
func OriginValid ¶
OriginValid returns true iff the request has valid origin or referrer headers https://goo.gl/nGnXwq
func ParseJSONFromBody ¶
ParseJSONFromBody reads r as a JSON string and writes its attributes to v
func ReadListing ¶
func ReadListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ReadListing writes a listing identified in r to w
func ReadListings ¶
func ReadListings(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ReadListings performs a customizable request defined by r for a collection of listings, and writes them to w
func ReadSavedSearch ¶
func ReadSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ReadSavedSearch writes a saved search identified in r to w
func ReadSavedSearches ¶
func ReadSavedSearches(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ReadSavedSearches performs a request for the current user's saved searches, and writes them to w
func ReadSeek ¶
func ReadSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ReadSeek writes the seek identified in r to w
func ReadSeeks ¶
func ReadSeeks(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ReadSeeks performs a customizable request defined by r for a collection of seeks, and writes them to w
func RedirectUser ¶
func RedirectUser(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
RedirectUser redirects the user to CAS authentication if they are not logged in, and back to the "return" parameter otherwise
func SameOrigin ¶
SameOrigin returns true iff two URLs have the same origin https://github.com/cbonello/revel-csrf/blob/master/csrf.go#L100
func Serve ¶
func Serve(w http.ResponseWriter, v interface{})
Serve converts v to a JSON string and writes to w. Writes an InternalServerError on error
func UpdateListing ¶
func UpdateListing(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
UpdateListing updates the requested listing if it is owned by the current user
func UpdateListingStar ¶
func UpdateListingStar(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
UpdateListingStar adds or removes a star to a listing for the current user
func UpdateSavedSearch ¶
func UpdateSavedSearch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
UpdateSavedSearch updates the requested saved search if it is owned by the current user
func UpdateSeek ¶
func UpdateSeek(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
UpdateSeek updates the requested seek if it is owned by the current user
Types ¶
This section is empty.