Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidHost ¶
ValidHost returns if a given host is a Azure container registry. List from https://github.com/kubernetes/kubernetes/blob/v1.23.1/pkg/credentialprovider/azure/azure_credentials.go#L55
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an Azure ACR client which can log into the registry and return authorization information.
func NewClient ¶
func NewClient() *Client
NewClient creates a new ACR client with default configurations.
func (*Client) Login ¶
func (c *Client) Login(ctx context.Context, autoLogin bool, image string, ref name.Reference) (authn.Authenticator, error)
Login attempts to get the authentication material for ACR. The caller can ensure that the passed image is a valid ACR image using ValidHost().
func (*Client) WithScheme ¶
WithScheme sets the scheme of the http request that the client makes.
func (*Client) WithTokenCredential ¶
func (c *Client) WithTokenCredential(tc azcore.TokenCredential) *Client
WithTokenCredential sets the token credential used by the ACR client.
type FakeTokenCredential ¶
func (*FakeTokenCredential) GetToken ¶
func (tc *FakeTokenCredential) GetToken(ctx context.Context, options policy.TokenRequestOptions) (azcore.AccessToken, error)
Click to show internal directories.
Click to hide internal directories.