gofr

package module
v0.0.0-...-585e8d0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2017 License: GPL-2.0 Imports: 21 Imported by: 0

README

Gofr

Gofr is a Feed Reader (Google Reader clone) for Google App Engine. It grew out of my frustration with the relational backend of grr and my inability to optimize it beyond unsatisfactory results.

Gofr is written in Go, and uses the Google Cloud Datastore. It was one of the finalists in Google Cloud Developer Challenge 2013.

Screenshot

Features

  • Folders
  • Tagging
  • Article and subscription filtering
  • Keyboard navigation support with extensive support for Google Reader's keyboard shortcuts (press ? to view available shortcuts)
  • OPML import/export
  • Article sharing to Google+, Facebook and Twitter
  • Mobile browser support
  • High-density screen support

Installation

To run locally on development server:

  1. Clone the repository: git clone https://github.com/pokebyte/Gofr.git
  2. Install the go-charset library: go get github.com/paulrosania/go-charset/charset
  3. Run the development server: goapp serve Gofr/

To deploy:

  1. Clone the repository: git clone https://github.com/pokebyte/Gofr.git
  2. Change into the new directory: cd Gofr
  3. Edit app.yaml and change the name of the application (initially "gofr-io") to one of your choosing
  4. Deploy to production: goapp deploy

Dev Server Notes

When running in production, Gofr routinely (every 10 minutes, configurable in cron.yaml) runs a cron job to update feeds. Since the development server does not support cron jobs, the feeds will need to be updated manually by logging in to the application as an Administrator, and opening the cron job URL in a web browser: http://localhost:8080/cron/updateFeeds.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAnonHTMLRoute

func RegisterAnonHTMLRoute(pattern string, handler HTMLRouteHandler)

func RegisterCronRoute

func RegisterCronRoute(pattern string, handler CronRouteHandler)

func RegisterHTMLRoute

func RegisterHTMLRoute(pattern string, handler HTMLRouteHandler)

func RegisterJSONRoute

func RegisterJSONRoute(pattern string, handler JSONRouteHandler)

func RegisterJSONRouteSansPreparse

func RegisterJSONRouteSansPreparse(pattern string, handler JSONRouteHandler)

func RegisterTaskRoute

func RegisterTaskRoute(pattern string, handler TaskRouteHandler)

func Run

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

Types

type CronRouteHandler

type CronRouteHandler func(pfc *PFContext) error

type HTMLRouteHandler

type HTMLRouteHandler func(pfc *PFContext)

type JSONRouteHandler

type JSONRouteHandler func(pfc *PFContext) (interface{}, error)

type PFContext

type PFContext struct {
	R         *http.Request
	C         appengine.Context
	W         http.ResponseWriter
	ChannelID string
	UserID    storage.UserID
	User      *storage.User
	LoginURL  string
}

type ReadableError

type ReadableError struct {
	// contains filtered or unexported fields
}

func NewReadableError

func NewReadableError(message string, err *error) ReadableError

func NewReadableErrorWithCode

func NewReadableErrorWithCode(message string, code int, err *error) ReadableError

func (ReadableError) Error

func (e ReadableError) Error() string

type TaskMessage

type TaskMessage struct {
	Message       string      `json:"message"`
	Refresh       bool        `json:"refresh"`
	Silent        bool        `json:"-"`
	Code          int         `json:"code,omitempty"`
	Subscriptions interface{} `json:"subscriptions,omitempty"`
}

type TaskRouteHandler

type TaskRouteHandler func(pfc *PFContext) (TaskMessage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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