Help us shape the future of Go! Take the 2026 Go Developer Survey

modules

package
v0.20.17 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindExternalModuleImages

func FindExternalModuleImages(
	params *params.PullParams,
	mod *Module,
	filter *Filter,
	authProvider authn.Authenticator,
	insecure, skipVerifyTLS bool,
) (moduleImages []string, moduleImagesWithExternal, releaseImages map[string]struct{}, err error)

func FindModuleExtraImages added in v0.19.0

func FindModuleExtraImages(
	params *params.PullParams,
	mod *Module,
	moduleImages []string,
	authProvider authn.Authenticator,
	insecure, skipVerifyTLS bool,
) (extraImages map[string]struct{}, err error)

FindModuleExtraImages extracts extra_images.json from module images and returns extra images map

Types

type ExactTagConstraint added in v0.16.0

type ExactTagConstraint struct {
	// contains filtered or unexported fields
}

func NewExactTagConstraint added in v0.16.0

func NewExactTagConstraint(tag string) *ExactTagConstraint

func NewExactTagConstraintWithChannel added in v0.16.0

func NewExactTagConstraintWithChannel(tag string, channel string) *ExactTagConstraint

func (*ExactTagConstraint) Channel added in v0.16.0

func (e *ExactTagConstraint) Channel() string

func (*ExactTagConstraint) HasChannelAlias added in v0.16.0

func (e *ExactTagConstraint) HasChannelAlias() bool

func (*ExactTagConstraint) IsExact added in v0.16.0

func (e *ExactTagConstraint) IsExact() bool

func (*ExactTagConstraint) Match added in v0.16.0

func (e *ExactTagConstraint) Match(version interface{}) bool

func (*ExactTagConstraint) Tag added in v0.16.0

func (e *ExactTagConstraint) Tag() string

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Filter for modules by black and whitelists. Maps module names to minimal versions of these modules to be pulled. By default, this is a whitelist filter, but that can be changed via SetType.

func NewFilter

func NewFilter(filterExpressions []string, filterType FilterType) (*Filter, error)

func (*Filter) GetConstraint added in v0.16.0

func (f *Filter) GetConstraint(moduleName string) (VersionConstraint, bool)

func (*Filter) Len

func (f *Filter) Len() int

func (*Filter) Match added in v0.10.0

func (f *Filter) Match(mod *Module) bool

func (*Filter) ShouldMirrorReleaseChannels added in v0.16.0

func (f *Filter) ShouldMirrorReleaseChannels(moduleName string) bool

func (*Filter) UseLogger added in v0.10.0

func (f *Filter) UseLogger(logger params.Logger) *Filter

func (*Filter) VersionsToMirror added in v0.16.0

func (f *Filter) VersionsToMirror(mod *Module) []string

type FilterType added in v0.10.0

type FilterType int
const (
	FilterTypeWhitelist FilterType = iota
	FilterTypeBlacklist
)

type Module

type Module struct {
	Name         string
	RegistryPath string
	Releases     []string
}

func ForRepo added in v0.10.0

func ForRepo(repo string, registryAuth authn.Authenticator, insecure, skipVerifyTLS bool) ([]Module, error)

func (*Module) Versions added in v0.12.0

func (m *Module) Versions() []*semver.Version

type SemanticVersionConstraint added in v0.16.0

type SemanticVersionConstraint struct {
	// contains filtered or unexported fields
}

func NewSemanticVersionConstraint added in v0.16.0

func NewSemanticVersionConstraint(c string) (*SemanticVersionConstraint, error)

func (*SemanticVersionConstraint) HasChannelAlias added in v0.16.0

func (s *SemanticVersionConstraint) HasChannelAlias() bool

func (*SemanticVersionConstraint) IsExact added in v0.16.0

func (s *SemanticVersionConstraint) IsExact() bool

func (*SemanticVersionConstraint) Match added in v0.16.0

func (s *SemanticVersionConstraint) Match(version interface{}) bool

type VersionConstraint added in v0.16.0

type VersionConstraint interface {
	Match(version interface{}) bool
	IsExact() bool
	HasChannelAlias() bool
}

Jump to

Keyboard shortcuts

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