handlers

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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(host string, 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