Documentation ¶
Index ¶
- func AddSubscribers(productId int64) error
- func CountHashTag(name string) int
- func CreateSubscriptionPlan(productId int64, amount int64, currency string) (string, error)
- 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 HandleFileAttachment(w http.ResponseWriter, r *http.Request) error
- func HandleFlag(w http.ResponseWriter, r *http.Request) error
- func HandleGetSuggestion(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 HandleSubscription(w http.ResponseWriter, r *http.Request) error
- func HandleSubscriptionShow(w http.ResponseWriter, r *http.Request) error
- func HandleUnSubscription(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 ListSubscriptions(userId int64) ([]*products.Story, error)
- func MetaHashTag(hashtags []string) string
- func RemoveHashTag(name string) string
- func RemoveSubscribers(productId int64) error
- func Shareproduct(story *products.Story)
- func TweetStory(story *products.Story)
- func TweetTopStory()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSubscribers ¶
AddSubscribers adds subscribers to the product
func CountHashTag ¶
CountHashTag returns the number of hashtag in the string
func CreateSubscriptionPlan ¶
CreateSubscriptionPlan creates a subscription plan for square
func HandleCreate ¶
func HandleCreate(w http.ResponseWriter, r *http.Request) error
HandleCreate handles the POST of the create form for products
func HandleCreateShow ¶
func HandleCreateShow(w http.ResponseWriter, r *http.Request) error
HandleCreateShow serves the create form via GET for products.
func HandleDestroy ¶
func HandleDestroy(w http.ResponseWriter, r *http.Request) error
HandleDestroy responds to /products/n/destroy by deleting the story.
func HandleDownvote ¶
func HandleDownvote(w http.ResponseWriter, r *http.Request) error
HandleDownvote handles POST to /products/123/downvote
func HandleFileAttachment ¶
func HandleFileAttachment(w http.ResponseWriter, r *http.Request) error
HandleFileAttachment handles file upload for the post from the editor
func HandleFlag ¶
func HandleFlag(w http.ResponseWriter, r *http.Request) error
HandleFlag handles POST to /products/123/flag
func HandleGetSuggestion ¶
func HandleGetSuggestion(w http.ResponseWriter, r *http.Request) error
HandleGetSuggestion handles the suggestion for the editor
func HandleIndex ¶
func HandleIndex(w http.ResponseWriter, r *http.Request) error
HandleIndex repsponds to GET /stories
func HandleListCode ¶
func HandleListCode(w http.ResponseWriter, r *http.Request) error
HandleListCode displays a list of products linking to repos (github etc) responds to GET /products/code
func HandleListUpvoted ¶
func HandleListUpvoted(w http.ResponseWriter, r *http.Request) error
HandleListUpvoted displays a list of products 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 products
func HandleSubscription ¶
func HandleSubscription(w http.ResponseWriter, r *http.Request) error
HandleSubscription adds subscribers to the product by responding to the POST request
func HandleSubscriptionShow ¶
func HandleSubscriptionShow(w http.ResponseWriter, r *http.Request) error
HandleSubscriptionShow shows the subscriptions page by responding to the GET request
func HandleUnSubscription ¶
func HandleUnSubscription(w http.ResponseWriter, r *http.Request) error
HandleUnSubscription removes subscribers to the product by responding to the POST request
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 /products/123/upvote
func ListSubscriptions ¶
ListSubscriptions returns the list of subscriptions for the user
func MetaHashTag ¶
MetaHashTag removes #from hashtag and returns a single string formatted for meta Keywords
func RemoveHashTag ¶
RemoveHashTag removes hashtag from the string and returns the string
func RemoveSubscribers ¶
RemoveSubscribers removes subscribers to the product
func Shareproduct ¶
Shareproduct shares the product to social media
Types ¶
This section is empty.