package
1.0.21
Repository: https://github.com/skuid/spec.git
Documentation: pkg.go.dev

# Functions

AccessControlAllowOrigin is a middleware for adding an access control header to requests.
AddHeaders is a middleware for adding arbitrary headers.
Apply wraps a list of middlewares around a handler and returns it.
Client returns a pointer to the dogstatsd Client, useful for logging metrics.
ContextWithSiteAndUserInfo places a user ID value, site Id, site subdomain, and admin bool into a context using the same context user key.
ContextWithUser places a user ID value, org Id value, and admin bool into a context using the same context user key.
DataDogEventLogger will take an already-constructed zap.Logger and a datadog statsd.Client and return a Logger that will also "tee" its output to DataDog Events.
No description provided by the author
GetLogLevel get a zapcore level from an string levels can be debug, info, warning, error, dpanic, panic, fatal.
HandleGrpc passes gRPC requests to the given *grpc.Server and passes http requests on to the http handler.
InitClient accepts config parameters and builds the dogstatsd Client, accessible by the getter Client() An error is returned only if a problem is encountered setting up the Client.
InstrumentRoute is a middleware for adding metrics to a route.
IsAdminFromContext returns a boolean indicating whether the user is an admin or not.
Logging is a mux middleware for adding a request log.
NewStandardZapConfig returns a sensible [config](https://godoc.org/go.uber.org/zap#Config) for a Zap logger.
NewStandardZapLevelConfig returns a sensible [config](https://godoc.org/go.uber.org/zap#Config) for a Zap logger.
OrgIDFromContext retrieves an organization ID value stored in a context.
SubdomainFromContext retrieves an organization's subdomain value stored in a context.
UserIDFromContext retrieves an organization ID value stored in a context.

# Structs

DataDogWriter implements io.Writer.

# Type aliases

Middleware is a type for decorating requests.