Documentation ¶
Index ¶
- Constants
- Variables
- func Accepts(r *http.Request, defaultAccept string, validAccepts ...string) (string, int, error)
- func PaginationFromRequest(r *http.Request, defaultCount int) (int, int)
- func ReturnJSONError(w http.ResponseWriter, status int, errStr string, vars ...interface{}) error
- type Authorization
- type Authorizer
- type Module
- type Server
Constants ¶
View Source
const ( HeaderAccept = "Accept" HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers" HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods" HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin" HeaderContentType = "Content-Type" HeaderPermissionsPolicy = "Permissions-Policy" MimeApplicationJSON = "application/json" PermissionsPolicyBlockFLOC = "interest-cohort=()" )
Variables ¶
View Source
var (
ErrMalformedAccept = errors.New("malformed Accept header")
)
Functions ¶
func PaginationFromRequest ¶
func ReturnJSONError ¶
func ReturnJSONError(w http.ResponseWriter, status int, errStr string, vars ...interface{}) error
Types ¶
type Authorization ¶
type Authorizer ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.