handlers

package
v0.0.0-...-16b0c80 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GradeAPlus Grade = "A+"
	GradeA           = "A"
	GradeB           = "B"
	GradeC           = "C"
	GradeD           = "D"
	GradeE           = "E"
	GradeF           = "F"
)

The Grade constants below indicate the current available grades.

View Source
const (
	// DBPath is the relative (or absolute) path to the bolt database file
	DBPath string = "goreportcard.db"

	// RepoBucket is the bucket in which repos will be cached in the bolt DB
	RepoBucket string = "repos"

	// MetaBucket is the bucket containing the names of the projects with the
	// top 100 high scores, and other meta information
	MetaBucket string = "meta"
)

Variables

This section is empty.

Functions

func AboutHandler

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

AboutHandler handles the about page

func AssetsHandler

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

AssetsHandler handles serving static files

func BadgeHandler

func BadgeHandler(w http.ResponseWriter, r *http.Request, repo string)

BadgeHandler handles fetching the badge images

func CheckHandler

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

CheckHandler handles the request for checking a repo

func FaviconHandler

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

FaviconHandler handles serving the favicon.ico

func HighScoresHandler

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

HighScoresHandler handles the stats page

func HomeHandler

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

HomeHandler handles the homepage

func ReportHandler

func ReportHandler(w http.ResponseWriter, r *http.Request, repo string)

ReportHandler handles the report page

Types

type Grade

type Grade string

Grade represents a grade returned by the server, which is normally somewhere between A+ (highest) and F (lowest).

Jump to

Keyboard shortcuts

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