package
0.0.0-20201215173027-a12daaf43806
Repository: https://github.com/vividcortex/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
walthrough 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 "/greet/\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.
# Constants
Nobody will ever guess this!.