handlers

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcmeMiddleware added in v1.59.0

func AcmeMiddleware(handler http.Handler, s source.Source, gitlabURL string) http.Handler

func ArtifactMiddleware added in v1.58.0

func ArtifactMiddleware(handler http.Handler, h *Handlers) http.Handler

func HTTPSRedirectMiddleware added in v1.58.0

func HTTPSRedirectMiddleware(handler http.Handler, redirect bool) http.Handler

func Ratelimiter added in v1.49.0

func Ratelimiter(handler http.Handler, config *config.RateLimit) http.Handler

Ratelimiter configures the ratelimiter middleware TODO: make this unexported once https://gitlab.com/gitlab-org/gitlab-pages/-/issues/670 is done

Types

type Handlers

type Handlers struct {
	Auth     internal.Auth
	Artifact internal.Artifact
}

Handlers take care of handling specific requests

func New

func New(auth internal.Auth, artifact internal.Artifact) *Handlers

New when provided the arguments defined herein, returns a pointer to an Handlers that is used to handle requests.

func (*Handlers) HandleArtifactRequest

func (a *Handlers) HandleArtifactRequest(w http.ResponseWriter, r *http.Request) bool

HandleArtifactRequest handles all artifact related requests, will return true if request was handled here

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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