handlers

package
v0.0.0-...-a2918ff Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2016 License: Apache-2.0 Imports: 21 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 ByName

type ByName []score

ByName implements sorting for checks alphabetically by name

func (ByName) Len

func (a ByName) Len() int

func (ByName) Less

func (a ByName) Less(i, j int) bool

func (ByName) Swap

func (a ByName) Swap(i, j int)

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