Documentation ¶
Overview ¶
Package mirrors handles managing mirrors in the running application
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MirrorRepo ¶
type MirrorRepo struct { Original string `yaml:"original"` Repo string `yaml:"repo"` Vcs string `yaml:"vcs,omitempty"` }
MirrorRepo represents a single repo mirror
type MirrorRepos ¶
type MirrorRepos []*MirrorRepo
MirrorRepos is a slice of Mirror pointers
func (MirrorRepos) Len ¶
func (o MirrorRepos) Len() int
Len returns the length of the MirrorRepos. This is needed for sorting with the sort package.
func (MirrorRepos) Less ¶
func (o MirrorRepos) Less(i, j int) bool
Less is needed for the sort interface. It compares two MirrorRepos based on their original value.
func (MirrorRepos) Swap ¶
func (o MirrorRepos) Swap(i, j int)
Swap is needed for the sort interface. It swaps the position of two MirrorRepos.
type Mirrors ¶
type Mirrors struct { // Repos contains repo mirror configuration Repos MirrorRepos `yaml:"repos"` }
Mirrors contains global mirrors to local configuration
func ReadMirrorsFile ¶
ReadMirrorsFile loads the contents of an mirrors.yaml file.
func (*Mirrors) MarshalYAML ¶
MarshalYAML is a hook for gopkg.in/yaml.v2. It sorts mirror repos lexicographically for reproducibility.
Click to show internal directories.
Click to hide internal directories.