Directories ¶
Path | Synopsis |
---|---|
Package auth wraps around an http.Handler, providing automatic rate-limiting and user authentication.
|
Package auth wraps around an http.Handler, providing automatic rate-limiting and user authentication. |
apitok
Package apitok implements rate limiting api calls based on tokens/ips
|
Package apitok implements rate limiting api calls based on tokens/ips |
sig
Package sig is a package for creating and verifying signed arbitrary data
|
Package sig is a package for creating and verifying signed arbitrary data |
usertok
Package usertok creates tokens which authenticate and identify users in a stateless way
|
Package usertok creates tokens which authenticate and identify users in a stateless way |
Package common is used to hold things that multiple packags within the mediocre-api toolkit will need to use or reference
|
Package common is used to hold things that multiple packags within the mediocre-api toolkit will need to use or reference |
apihelper
Package apihelper contains some methods which make working with the http package a bit nicer
|
Package apihelper contains some methods which make working with the http package a bit nicer |
commontest
Package commontest holds methods which are helpful when writing tests within mediocre-api
|
Package commontest holds methods which are helpful when writing tests within mediocre-api |
resphelper
Package resphelper provides a number of methods for working with radix.v2 Resp structs
|
Package resphelper provides a number of methods for working with radix.v2 Resp structs |
Package fwd implements forwarding requests from one http endpoint to another.
|
Package fwd implements forwarding requests from one http endpoint to another. |
Package pickyjson is useful for extracting simple json types with certain constraints.
|
Package pickyjson is useful for extracting simple json types with certain constraints. |
prefab
|
|
Package room implements an abstraction for a basic room system.
|
Package room implements an abstraction for a basic room system. |
broadcast
Package broadcast implements a generic system where a user can generate content which can then be consumed by multiple other users.
|
Package broadcast implements a generic system where a user can generate content which can then be consumed by multiple other users. |
Package user implements an abstraction for a basic user system.
|
Package user implements an abstraction for a basic user system. |
Package xff implements a middleware http.Handler which parses any X-Forwarded-For headers it sees in the *http.Request and sets the RemoteAddr to the correct value based on them s := http.NewServeMux() // Set Handle and HandleFuncs here x := xff.NewXFF(s) // All *http.Request instances in the handlers for s will have the correct // RemoteAddr field value now http.ListenAndServe(":8080", x)
|
Package xff implements a middleware http.Handler which parses any X-Forwarded-For headers it sees in the *http.Request and sets the RemoteAddr to the correct value based on them s := http.NewServeMux() // Set Handle and HandleFuncs here x := xff.NewXFF(s) // All *http.Request instances in the handlers for s will have the correct // RemoteAddr field value now http.ListenAndServe(":8080", x) |
Click to show internal directories.
Click to hide internal directories.