Documentation ¶
Index ¶
- func ImageRegistryProvider(url string, ref name.Reference) oci.Provider
- type Manager
- func (m *Manager) Login(ctx context.Context, url string, ref name.Reference, opts ProviderOptions) (authn.Authenticator, error)
- func (m *Manager) OIDCLogin(ctx context.Context, registryURL string, opts ProviderOptions) (authn.Authenticator, error)deprecated
- func (m *Manager) WithACRClient(c *azure.Client) *Manager
- func (m *Manager) WithECRClient(c *aws.Client) *Manager
- func (m *Manager) WithGCRClient(c *gcp.Client) *Manager
- type Option
- type ProviderOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a login manager for various registry providers.
func NewManager ¶
NewManager initializes a Manager with default registry clients configurations.
func (*Manager) Login ¶
func (m *Manager) Login(ctx context.Context, url string, ref name.Reference, opts ProviderOptions) (authn.Authenticator, error)
Login performs authentication against a registry and returns the Authenticator. For generic registry provider, it is no-op.
func (*Manager) OIDCLogin
deprecated
func (m *Manager) OIDCLogin(ctx context.Context, registryURL string, opts ProviderOptions) (authn.Authenticator, error)
OIDCLogin attempts to get an Authenticator for the provided URL endpoint.
If you want to construct an Authenticator based on an image reference, you may want to use Login instead.
Deprecated: Use Login instead.
func (*Manager) WithACRClient ¶
WithACRClient allows overriding the default ACR client.
func (*Manager) WithECRClient ¶
WithECRClient allows overriding the default ECR client.
type Option ¶
type Option func(*options)
Option is a functional option for configuring the manager.
func WithProxyURL ¶
WithProxyURL sets the proxy URL for the manager.
type ProviderOptions ¶
type ProviderOptions struct { // AwsAutoLogin enables automatic attempt to get credentials for images in // ECR. AwsAutoLogin bool // GcpAutoLogin enables automatic attempt to get credentials for images in // GCP. GcpAutoLogin bool // AzureAutoLogin enables automatic attempt to get credentials for images in // ACR. AzureAutoLogin bool // Cache is a cache for storing auth configurations. Cache cache.Expirable[cache.StoreObject[authn.Authenticator]] }
ProviderOptions contains options for registry provider login.