gateway

package
v0.88.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyUser         contextKey = "user"
	ContextKeyRepositoryID contextKey = "repository_id"
	ContextKeyRepository   contextKey = "repository"
	ContextKeyAuthContext  contextKey = "auth_context"
	ContextKeyOperation    contextKey = "operation"
	ContextKeyRef          contextKey = "ref"
	ContextKeyPath         contextKey = "path"
	ContextKeyMatchedHost  contextKey = "matched_host"
)

Variables

This section is empty.

Functions

func AuthenticationHandler

func AuthenticationHandler(authService auth.GatewayService, next http.Handler) http.Handler

func DurationHandler

func DurationHandler(next http.Handler) http.Handler

func EnrichWithOperation

func EnrichWithOperation(sc *ServerContext, next http.Handler) http.Handler

func EnrichWithParts

func EnrichWithParts(bareDomains []string, next http.Handler) http.Handler

func EnrichWithRepositoryOrFallback

func EnrichWithRepositoryOrFallback(c catalog.Interface, authService auth.GatewayService, fallbackProxy http.Handler, next http.Handler) http.Handler

func NewHandler

func NewHandler(region string, catalog catalog.Interface, multipartTracker multipart.Tracker, blockStore block.Adapter, authService auth.GatewayService, bareDomains []string, stats stats.Collector, pathProvider upload.PathProvider, fallbackURL *url.URL, auditLogLevel string, traceRequestHeaders bool) http.Handler

func OperationLookupHandler

func OperationLookupHandler(next http.Handler) http.Handler

func PathOperationHandler

func PathOperationHandler(sc *ServerContext, handler operations.PathOperationHandler) http.Handler

func RepoOperationHandler

func RepoOperationHandler(sc *ServerContext, handler operations.RepoOperationHandler) http.Handler

Types

type RequestParts added in v0.52.0

type RequestParts struct {
	Repository  string
	Ref         string
	Path        string
	MatchedHost bool
}

func ParseRequestParts added in v0.52.0

func ParseRequestParts(host string, urlPath string, bareDomains []string) RequestParts

ParseRequestParts returns the repo id, ref and path according to whether the request is path-style or virtual-host-style.

type ServerContext

type ServerContext struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package sig This file implements helper functions to validate Streaming AWS Signature Version '4' authorization header.
Package sig This file implements helper functions to validate Streaming AWS Signature Version '4' authorization header.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL