encode

package
v0.0.0-...-4c964c4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncodedPathSeparator = "%2F"
)

Variables

This section is empty.

Functions

func GitPathBefore

func GitPathBefore(next http.Handler) http.Handler

GitPathBefore wraps an http.HandlerFunc in a layer that encodes a path coming as part of the GIT api (e.g. "space1/repo.git") before executing the provided http.HandlerFunc.

func TerminatedPathBefore

func TerminatedPathBefore(prefixes []string, next http.Handler) http.Handler

TerminatedPathBefore wraps an http.HandlerFunc in a layer that encodes a terminated path (e.g. "/space1/space2/+") before executing the provided http.HandlerFunc. The first prefix that matches the URL.Path will be used during encoding (prefix is ignored during encoding).

func TerminatedRegexPathBefore

func TerminatedRegexPathBefore(regexPrefixes []string, next http.Handler) http.Handler

TerminatedRegexPathBefore is similar to TerminatedPathBefore but supports regex prefixes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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