Documentation ¶
Index ¶
- func HandleCreate(w http.ResponseWriter, r *http.Request) error
- func HandleCreateShow(w http.ResponseWriter, r *http.Request) error
- func HandleDestroy(w http.ResponseWriter, r *http.Request) error
- func HandleDownvote(w http.ResponseWriter, r *http.Request) error
- func HandleFlag(w http.ResponseWriter, r *http.Request) error
- func HandleHome(w http.ResponseWriter, r *http.Request) error
- func HandleIndex(w http.ResponseWriter, r *http.Request) error
- func HandleListCode(w http.ResponseWriter, r *http.Request) error
- func HandleListUpvoted(w http.ResponseWriter, r *http.Request) error
- func HandleShow(w http.ResponseWriter, r *http.Request) error
- func HandleSiteMap(w http.ResponseWriter, r *http.Request) error
- func HandleUpdate(w http.ResponseWriter, r *http.Request) error
- func HandleUpdateShow(w http.ResponseWriter, r *http.Request) error
- func HandleUpvote(w http.ResponseWriter, r *http.Request) error
- func TweetStory(story *stories.Story)
- func TweetTopStory()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCreate ¶
func HandleCreate(w http.ResponseWriter, r *http.Request) error
HandleCreate handles the POST of the create form for stories
func HandleCreateShow ¶
func HandleCreateShow(w http.ResponseWriter, r *http.Request) error
HandleCreateShow serves the create form via GET for stories.
func HandleDestroy ¶
func HandleDestroy(w http.ResponseWriter, r *http.Request) error
HandleDestroy responds to /stories/n/destroy by deleting the story.
func HandleDownvote ¶
func HandleDownvote(w http.ResponseWriter, r *http.Request) error
HandleDownvote handles POST to /stories/123/downvote
func HandleFlag ¶
func HandleFlag(w http.ResponseWriter, r *http.Request) error
HandleFlag handles POST to /stories/123/flag
func HandleHome ¶
func HandleHome(w http.ResponseWriter, r *http.Request) error
HandleHome displays a list of stories using gravity to order them used for the home page for gravity rank see votes.go responds to GET /
func HandleIndex ¶
func HandleIndex(w http.ResponseWriter, r *http.Request) error
HandleIndex displays a list of stories.
func HandleListCode ¶ added in v1.0.1
func HandleListCode(w http.ResponseWriter, r *http.Request) error
HandleListCode displays a list of stories linking to repos (github etc) responds to GET /stories/code
func HandleListUpvoted ¶ added in v1.0.1
func HandleListUpvoted(w http.ResponseWriter, r *http.Request) error
HandleListUpvoted displays a list of stories the user has upvoted in the past
func HandleShow ¶
func HandleShow(w http.ResponseWriter, r *http.Request) error
HandleShow displays a single story.
func HandleSiteMap ¶
func HandleSiteMap(w http.ResponseWriter, r *http.Request) error
HandleSiteMap renders a site map of top stories
func HandleUpdate ¶
func HandleUpdate(w http.ResponseWriter, r *http.Request) error
HandleUpdate handles the POST of the form to update a story
func HandleUpdateShow ¶
func HandleUpdateShow(w http.ResponseWriter, r *http.Request) error
HandleUpdateShow renders the form to update a story.
func HandleUpvote ¶
func HandleUpvote(w http.ResponseWriter, r *http.Request) error
HandleUpvote handles POST to /stories/123/upvote
Types ¶
This section is empty.