Skip to content

Commit

Permalink
remove unused EndpointConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Cordell <[email protected]>
  • Loading branch information
ecordell committed Feb 22, 2017
1 parent 200eb3d commit 109fd2f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,7 @@ func filterImagePrefixes(requiredPrefixes []string, err error, handler http.Hand
})
}

// EndpointConfig stores settings used to create a ServerHandler
type EndpointConfig struct {
OperationName string
ServerHandler utils.ContextHandler
ErrorIfGUNInvalid error
IncludeCacheHeaders bool
CacheControlConfig utils.CacheControlConfig
PermissionsRequired []string
AuthWrapper utils.AuthWrapper
RepoPrefixes []string
}

// CreateHandler creates a server handler from an EndpointConfig
// CreateHandler creates a server handler, wrapping with auth, caching, and monitoring
func CreateHandler(operationName string, serverHandler utils.ContextHandler, errorIfGUNInvalid error, includeCacheHeaders bool, cacheControlConfig utils.CacheControlConfig, permissionsRequired []string, authWrapper utils.AuthWrapper, repoPrefixes []string) http.Handler {
var wrapped http.Handler
wrapped = authWrapper(serverHandler, permissionsRequired...)
Expand Down

0 comments on commit 109fd2f

Please sign in to comment.