Documentation ¶
Index ¶
- type RepoRegistry
- func (r *RepoRegistry) DistroHasRepos(distro, arch string) (repos []rpmmd.RepoConfig, found bool)
- func (r *RepoRegistry) ReposByArchName(distro, arch string, includeTagged bool) ([]rpmmd.RepoConfig, error)
- func (r *RepoRegistry) ReposByImageType(imageType distro.ImageType) ([]rpmmd.RepoConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepoRegistry ¶
type RepoRegistry struct {
// contains filtered or unexported fields
}
RepoRegistry represents a database of distro and architecture specific RPM repositories. Image types are considered only if the loaded repository definition contains any ImageTypeTags.
func New ¶
func New(repoConfigPaths []string) (*RepoRegistry, error)
New returns a new RepoRegistry instance with the data loaded from the given repoConfigPaths
func NewFromDistrosRepoConfigs ¶
func NewFromDistrosRepoConfigs(distrosRepoConfigs rpmmd.DistrosRepoConfigs) *RepoRegistry
func (*RepoRegistry) DistroHasRepos ¶
func (r *RepoRegistry) DistroHasRepos(distro, arch string) (repos []rpmmd.RepoConfig, found bool)
DistroHasRepos returns the repositories for the distro+arch, and a found flag
func (*RepoRegistry) ReposByArchName ¶
func (r *RepoRegistry) ReposByArchName(distro, arch string, includeTagged bool) ([]rpmmd.RepoConfig, error)
reposByArchName returns a slice of rpmmd.RepoConfig instances, which should be used for building image types for the specific architecture and distribution. This includes by default all repositories without any image type tags specified. Depending on the `includeTagged` argument value, repositories with image type tags set will be added to the returned slice or not.
The method does not verify if the given architecture name is actually part of the specific distribution definition.
func (*RepoRegistry) ReposByImageType ¶
func (r *RepoRegistry) ReposByImageType(imageType distro.ImageType) ([]rpmmd.RepoConfig, error)
ReposByImageType returns a slice of rpmmd.RepoConfig instances, which should be used for building the specific image type. All repositories for the associated distribution and architecture, without any ImageTypeTags set, are always part of the returned slice. In addition, if there are repositories tagged with the specific image type name, these are added to the returned slice as well.