mirrors

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BuildFullURL added in v0.7.0

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 added in v0.7.0

func BuildHTTPSURL(url string) (string, error)

BuildHTTPSURL constructs an HTTPS URL using templates

func BuildHTTPURL added in v0.7.0

func BuildHTTPURL(url string) (string, error)

BuildHTTPURL constructs an HTTP URL using templates

func BuildListenAddress added in v0.7.0

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

BuildListenAddress constructs a listen address using templates

func BuildPathWithQuery added in v0.7.0

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

BuildPathWithQuery constructs a path with query using templates

func GenerateMirrorListByPredefined

func GenerateMirrorListByPredefined(osType int) (mirrors []string)

func GetFullMirrorURL

func GetFullMirrorURL(mirror define.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 added in v0.7.0

type ListenAddressTemplateData struct {
	Host string
	Port string
}

ListenAddressTemplateData holds data for listen address template execution

type PathTemplateData added in v0.7.0

type PathTemplateData struct {
	Path  string
	Query string
}

PathTemplateData holds data for path template execution

type URLTemplateData added in v0.7.0

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