package
1.0.1
Repository: https://github.com/zenazn/goji.git
Documentation: pkg.go.dev

# README

Gritter

Gritter is an example application built using Goji, where people who have nothing better to do can post short 140-character "greets."

A good place to start is with main.go, which contains a well-commented walkthrough of Goji's features. Gritter uses a couple custom middlewares, which have been arbitrarily placed in middleware.go. Finally some uninteresting "database models" live in models.go.

# Functions

AdminFinances would answer the question 'How are we doing?' (GET "/admin/finances").
AdminRoot is root (GET "/admin/root").
GetGreet finds a particular greet by ID (GET "/greets/\d+").
GetUser finds a given user and her greets (GET "/user/:name").
NewGreet creates a new greet (POST "/greets").
NotFound is a 404 handler.
PlainText sets the content-type of responses to text/plain.
Root route (GET "/").
SuperSecure is HTTP Basic Auth middleware for super-secret admin page.
WaitForIt is a particularly slow handler (GET "/waitforit").

# Constants

Nobody will ever guess this!.

# Variables

Store all our greets in a big list in memory, because, let's be honest, who's actually going to use a service that only allows you to post 140-character messages?.
All the users we know about! There aren't very many...

# Structs

A Greet is a 140-character micro-blogpost that has no resemblance whatsoever to the noise a bird makes.
A User is a person.