request_url_mapper

package
v0.0.0-...-13f148b Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestURLMappingsFlag = "request-url-mappings"
)

Variables

This section is empty.

Functions

func RegisterFlags

func RegisterFlags(f []cli.Flag) []cli.Flag

Types

type RequestURLMapper

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

RequestURLMapper handles URL mapping for addon requests

func NewRequestURLMapper

func NewRequestURLMapper(c *cli.Context) (*RequestURLMapper, error)

NewRequestURLMapper creates a new RequestURLMapper from cli.Context The JSON format is: {"https://external.url": "http://internal.url", ...}

func (*RequestURLMapper) MapURL

func (m *RequestURLMapper) MapURL(url string) string

MapURL replaces the beginning of the URL according to the mappings If no mapping matches, returns the original URL

Jump to

Keyboard shortcuts

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