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

Function makeMetadataDBOfflineHandler

rest/handler.go:160–166  ·  view source on GitHub ↗

makeMetadataDBOfflineHandler creates an http.Handler that will run a handler with the given method even if the target DB couldn't be instantiated

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

Source from the content-addressed store, hash-verified

158
159// makeMetadataDBOfflineHandler creates an http.Handler that will run a handler with the given method even if the target DB couldn't be instantiated
160func makeMetadataDBOfflineHandler(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod) http.Handler {
161 return makeHandlerWithOptions(server, privs, accessPermissions, responsePermissions, method, handlerOptions{
162 runOffline: true,
163 allowNilDBContext: true,
164 skipLogDuration: true,
165 })
166}
167
168// makeHandlerSpecificAuthScope creates an http.Handler that will run a handler with the given method. It also takes in a callback function which when
169// given the endpoint payload returns an auth scope.

Callers 1

CreateAdminRouterFunction · 0.85

Calls 1

makeHandlerWithOptionsFunction · 0.85

Tested by

no test coverage detected