Documentation ¶
Index ¶
Constants ¶
View Source
const ( QuerySpotlightFlag int = 1 << iota // powers of 2, for combining bit flags // Publications: QueryArticlesFlag QueryBulletinsFlag QueryMethodologiesFlag QueryMethodologyArticlesFlag // Datasets: QueryStaticDatasetsFlag QueryTimeseriesFlag )
Flag values for a query type:
Variables ¶
This section is empty.
Functions ¶
func ReadJSONBody ¶ added in v0.3.0
func ReadJSONBody(ctx context.Context, body io.ReadCloser, v interface{}, w http.ResponseWriter, data log.Data) error
ReadJSONBody reads the bytes from the provided body, and marshals it to the provided model interface.
func WriteJSONBody ¶ added in v0.3.0
WriteJSONBody marshals the provided interface into json, and writes it to the response body.
Types ¶
type AuthHandler ¶ added in v0.2.0
type AuthHandler interface {
Require(required auth.Permissions, handler http.HandlerFunc) http.HandlerFunc
}
AuthHandler provides authorisation checks on requests
Click to show internal directories.
Click to hide internal directories.