jsonapi

package
v0.0.0-...-5da9300 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2016 License: GPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApiFacts

func AddApiFacts(who ApiFacts, prefix string, router *mux.Router)

func AuthorHandler

func AuthorHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func BestTagsHandler

func BestTagsHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func BlockHandler

func BlockHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func BulletinHandler

func BulletinHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func EndorsementHandler

func EndorsementHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func Handler

func Handler(prefix string, db *pubrecdb.PublicRecord) http.Handler

func MostEndoHandler

func MostEndoHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func NearbyLocHandler

func NearbyLocHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func NewHandler

func NewHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func NewStatsHandler

func NewStatsHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func RangeHandler

func RangeHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

func Router

func Router(prefix string, db *pubrecdb.PublicRecord) *mux.Router

returns the http handler initialized with the api's routes. The prefix should start and end with slashes. For example /api/ is a good prefix.

func StatusHandler

func StatusHandler(db *pubrecdb.PublicRecord, start time.Time) func(http.ResponseWriter, *http.Request)

func TagHandler

func TagHandler(db *pubrecdb.PublicRecord) func(http.ResponseWriter, *http.Request)

Handles serving a bulletin board.

Types

type ApiFacts

type ApiFacts struct {
	UserAgent     string `json:"user-agent",omitempty`
	Operator      string `json:"operator",omitempty`
	Location      string `json:"location",omitempty`
	Administrator string `json:"admin",omitempty`
	ContactInst   string `json:"HowToReach",omitempty`
}

Jump to

Keyboard shortcuts

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