routes

package
v0.0.0-...-3322d40 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2015 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIRouter

func APIRouter(w http.ResponseWriter, r *http.Request)

APIRouter is the http request router for all "/api" requests

func AboutHandler

func AboutHandler(w http.ResponseWriter, r *http.Request)

AboutHandler is the http request handler for /about.

func CronExploreHandler

func CronExploreHandler(w http.ResponseWriter, r *http.Request)

CronExploreHandler is the http request handler for /cron/explore. When called from a cron job, it tasks all available Vine feeds to be scraped for user IDs. When called from a task, it scrapes the feed utilizing regular expressions for user IDs to store.

func CronFetchHandler

func CronFetchHandler(w http.ResponseWriter, r *http.Request)

CronFetchHandler is the http request handler for /cron/fetch. It is the endpoint which initiates a data fetch for a specific user, then retasks the user for another data fetch in 24hrs.

func CronFlushHandler

func CronFlushHandler(w http.ResponseWriter, r *http.Request)

CronFlushHandler is the http request handler for /cron/flush. It flushes all "24hr" stats at the end of each day, or as configured in cron.yaml and logs the previous values for analysis and metrics purposes.

func CronImportHandler

func CronImportHandler(w http.ResponseWriter, r *http.Request)

CronImportHandler is the http request handler for /cron/import. Utilizing tasks, it imports raw datastore records and is only for admin testing purposes.

func CronPurgeHandler

func CronPurgeHandler(w http.ResponseWriter, r *http.Request)

CronPurgeHandler is the http request handler for /cron/purge. Using tasks, it purges all datastore records of a specified kind. It is only used for admin testing purposes.

func CronReportHandler

func CronReportHandler(w http.ResponseWriter, r *http.Request)

CronReportHandler is the http request handler for /cron/report. When called from a task, it sends a specific user's email report to the specified email address, then retasks the report for 7 days from now.

func DiscoverHandler

func DiscoverHandler(w http.ResponseWriter, r *http.Request)

DiscoverHandler is the http request handler for /discover.

func DonateHandler

func DonateHandler(w http.ResponseWriter, r *http.Request)

DonateHandler is the http request handler for /donate.

func EmailHandler

func EmailHandler(w http.ResponseWriter, r *http.Request)

EmailHandler is the http request handler for /_ah/mail/*. It parses incoming emails sent to preconfigured mail addresses and handles them accordingly. For instance, sending Vine's "Invite by Email" to share@<domain> will queue the user. More email routes may come in the future.

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler is the http request handler for "/"

func NotFoundHandler

func NotFoundHandler(w http.ResponseWriter, r *http.Request)

NotFoundHandler is the http request handler for /404. It is the default "404" page and is rendered when a request route is not specified.

func PopularFetchHandler

func PopularFetchHandler(w http.ResponseWriter, r *http.Request)

PopularFetchHandler is the http request handler for /cron/popular. It explores the Vine popular feed(s), queues any user that we are not already tracking, and then adds the user to the front page's "popular users" feed utilizing github.com/qedus/nds for memcache persistence.

func RandomHandler

func RandomHandler(w http.ResponseWriter, r *http.Request)

RandomHandler is the http request handler for /random/user. It picks a random user record and redirects the http request to the randomly selected user's profile page.

func SearchHandler

func SearchHandler(w http.ResponseWriter, r *http.Request)

SearchHandler is the http request handler for /search. On POST, it searches across the user database for the specified query. On GET, it renders the search page to initiate a query.

func SignUpHandler

func SignUpHandler(w http.ResponseWriter, r *http.Request)

SignUpHandler is the http request handler for /sign-up. On GET, it renders the sign-up page for users to sign up to the weekly email service. On GET where type=activate, it confirms and activates a user's email address for the email service. Without activating, the user will not receive any email for the report they signed up for. On POST, it stores and validates the user's sign up submission. This also handles enterprise users who are interested in raw access to the Vine dataset.

func StartupHandler

func StartupHandler(w http.ResponseWriter, r *http.Request)

StartupHandler is the http request handler for /_ah/warmup. It is automatically called by AppEngine when a new instance start up.

func TopHandler

func TopHandler(w http.ResponseWriter, r *http.Request)

TopHandler is the http request handler for /top.

func UserExportHandler

func UserExportHandler(w http.ResponseWriter, r *http.Request)

UserExportHandler is the http request handler for /x/userID where userID is a valid user ID that Davine has previously discovered. It exports all the user's data using data.ExportUser.

func UserFetchHandler

func UserFetchHandler(w http.ResponseWriter, r *http.Request)

UserFetchHandler is the http request handler for /u/(userID|vanity). This is the "profile" route that renders all the user's acrued data.

func UserStoreHandler

func UserStoreHandler(w http.ResponseWriter, r *http.Request)

UserStoreHandler is the http request handler for /user/store. It stores the specified Vine user if we have not discovered it already. The JSON response from this route is parsed by the client and the client is redirected to the user's profile if necessary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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