storyactions

package
Version: v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2017 License: MIT Imports: 20 Imported by: 0

Documentation

Index

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

func TweetStory

func TweetStory(story *stories.Story)

TweetStory tweets the given story

func TweetTopStory

func TweetTopStory()

TweetTopStory tweets the top story

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL