mirrors

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFullURL

func BuildFullURL(scheme, host, path, query string) (string, error)

BuildFullURL constructs a full URL with scheme, host, path, and optional query using templates

func BuildHTTPSURL

func BuildHTTPSURL(url string) (string, error)

BuildHTTPSURL constructs an HTTPS URL using templates

func BuildHTTPURL

func BuildHTTPURL(url string) (string, error)

BuildHTTPURL constructs an HTTP URL using templates

func BuildListenAddress

func BuildListenAddress(host, port string) (string, error)

BuildListenAddress constructs a listen address using templates

func BuildPathWithQuery

func BuildPathWithQuery(path, query string) (string, error)

BuildPathWithQuery constructs a path with query using templates

func GetFullMirrorURL

func GetFullMirrorURL(mirror distro.UrlWithAlias) string

func GetGeoMirrorUrlsByMode

func GetGeoMirrorUrlsByMode(mode int) (mirrors []string)

func GetMirrorURLByAliases

func GetMirrorURLByAliases(osType int, alias string) string

func GetPredefinedConfiguration

func GetPredefinedConfiguration(proxyMode int) (string, *regexp.Regexp)

func GetUbuntuMirrorUrlsByGeo

func GetUbuntuMirrorUrlsByGeo() (mirrors []string, err error)

Types

type ListenAddressTemplateData

type ListenAddressTemplateData struct {
	Host string
	Port string
}

ListenAddressTemplateData holds data for listen address template execution

type PathTemplateData

type PathTemplateData struct {
	Path  string
	Query string
}

PathTemplateData holds data for path template execution

type URLTemplateData

type URLTemplateData struct {
	Scheme string
	Host   string
	Path   string
	Query  string
	URL    string
}

URLTemplateData holds data for URL template execution

Jump to

Keyboard shortcuts

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