Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOCIRepositoryStore ¶
func GetOCIRepositoryStore(ctx context.Context, registryDomain, repositoryName string, credsPolicy ociauthconfig.CredentialsConfigs) (ociRepositoryStore, error)
GetOCIRepositoryStore instantiates a getproviders.OCIRepositoryStore implementation to use when accessing the given repository on the given registry, using the given OCI credentials policy to decide which credentials to use.
This function attempts to reuse previously-instantiated stores for a given registry domain and repository name, and so it effectively assumes that all calls through the life of the program will have the same credsPolicy argument. That assumption should hold because in practice we only create a single credsPolicy per execution, based on the CLI Configuration, and use it in both module_source.go and provider_source.go.
Types ¶
type OCICredsPolicyBuilder ¶
type OCICredsPolicyBuilder func(context.Context) (ociauthconfig.CredentialsConfigs, error)
OCICredsPolicyBuilder is the type of a callback function that the [providerSource] and [remoteModulePackageFetcher] functions will use if any of the configured provider installation methods or the module installer need to interact with OCI Distribution registries.
We represent this indirectly as a callback function so that we can skip doing this work in the common case where we won't need to interact with OCI registries at all.