MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / makeHandler

Function makeHandler

rest/handler.go:141–143  ·  view source on GitHub ↗

makeHandler creates an http.Handler that will run a handler with the given method

(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod)

Source from the content-addressed store, hash-verified

139
140// makeHandler creates an http.Handler that will run a handler with the given method
141func makeHandler(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod) http.Handler {
142 return makeHandlerWithOptions(server, privs, accessPermissions, responsePermissions, method, handlerOptions{})
143}
144
145// makeSilentHandler creates an http.Handler that will run a handler with the given method only logging at debug
146func makeSilentHandler(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod) http.Handler {

Callers 4

createCommonRouterFunction · 0.85
CreatePublicHandlerFunction · 0.85
CreateAdminRouterFunction · 0.85
createDiagnosticRouterFunction · 0.85

Calls 1

makeHandlerWithOptionsFunction · 0.85

Tested by

no test coverage detected