Documentation
¶
Overview ¶
Copyright 2026 Reto Gantenbein SPDX-License-Identifier: Apache-2.0
Copyright 2022 Reto Gantenbein SPDX-License-Identifier: Apache-2.0
Copyright 2022 Reto Gantenbein SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LandingHandler ¶
func LandingHandler(config *RepoConfig, publicAddr string) echo.HandlerFunc
LandingHandler returns an Echo handler that renders an HTML overview page listing all configured repositories, their mirrors, and package manager snippets. publicAddr is the address (host or host:port) rendered in config snippets.
func LoadConfig ¶
func LoadConfig(config *RepoConfig, path string) error
Types ¶
type PkgProxy ¶
type PkgProxy interface {
Cache(echo.HandlerFunc) echo.HandlerFunc
ForwardProxy(echo.HandlerFunc) echo.HandlerFunc
}
func New ¶
func New(config *PkgProxyConfig) PkgProxy
type PkgProxyConfig ¶
type PkgProxyConfig struct {
CacheBasePath string
RepositoryConfig *RepoConfig
// To customize the transport to remote.
// Examples: If custom TLS certificates are required.
Transport http.RoundTripper
}
type RepoConfig ¶
type RepoConfig struct {
Repositories map[string]Repository `yaml:"repositories"`
}
RepoConfig defines the upstream package repositories
Click to show internal directories.
Click to hide internal directories.