Documentation ¶
Index ¶
- func APIRouter(w http.ResponseWriter, r *http.Request)
- func AboutHandler(w http.ResponseWriter, r *http.Request)
- func CronExploreHandler(w http.ResponseWriter, r *http.Request)
- func CronFetchHandler(w http.ResponseWriter, r *http.Request)
- func CronFlushHandler(w http.ResponseWriter, r *http.Request)
- func CronImportHandler(w http.ResponseWriter, r *http.Request)
- func CronPurgeHandler(w http.ResponseWriter, r *http.Request)
- func CronReportHandler(w http.ResponseWriter, r *http.Request)
- func DiscoverHandler(w http.ResponseWriter, r *http.Request)
- func DonateHandler(w http.ResponseWriter, r *http.Request)
- func EmailHandler(w http.ResponseWriter, r *http.Request)
- func IndexHandler(w http.ResponseWriter, r *http.Request)
- func NotFoundHandler(w http.ResponseWriter, r *http.Request)
- func PopularFetchHandler(w http.ResponseWriter, r *http.Request)
- func RandomHandler(w http.ResponseWriter, r *http.Request)
- func SearchHandler(w http.ResponseWriter, r *http.Request)
- func SignUpHandler(w http.ResponseWriter, r *http.Request)
- func StartupHandler(w http.ResponseWriter, r *http.Request)
- func TopHandler(w http.ResponseWriter, r *http.Request)
- func UserExportHandler(w http.ResponseWriter, r *http.Request)
- func UserFetchHandler(w http.ResponseWriter, r *http.Request)
- func UserStoreHandler(w http.ResponseWriter, r *http.Request)
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.