Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.
Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.
Index ¶
- type Authentication
- type CloudEnvironmentName
- type Config
- func (c *Config) GetAuthorizer(ctx context.Context, resource string) (autorest.Authorizer, error)
- func (c *Config) GetMSICredential(ctx context.Context) (*azidentity.ManagedIdentityCredential, error)
- func (c *Config) GetSPCredential(ctx context.Context) (*azidentity.ClientSecretCredential, error)
- func (c *Config) SetAuthConfig(ctx context.Context) error
- type ConfigInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct { ClientID string `json:"clientId,omitempty"` ClientSecret string `json:"clientSecret,omitempty"` SubscriptionID string `json:"subscriptionId,omitempty"` TenantID string `json:"tenantId,omitempty"` UserIdentityClientId string `json:"userIdentityClientId,omitempty"` }
Authentication represents the Authentication file for Azure.
func NewAuthentication ¶
func NewAuthentication(clientID, clientSecret, subscriptionID, tenantID, userAssignedIdentityID string) *Authentication
NewAuthentication returns an Authentication struct from user provided credentials.
type CloudEnvironmentName ¶
type CloudEnvironmentName string
const ( AzurePublicCloud CloudEnvironmentName = "AzurePublicCloud" AzureUSGovernmentCloud CloudEnvironmentName = "AzureUSGovernmentCloud" AzureChinaCloud CloudEnvironmentName = "AzureChinaCloud" )
type Config ¶
type Config struct { AKSCredential *aksCredential AuthConfig *Authentication Cloud cloud.Configuration Authorizer autorest.Authorizer }
func (*Config) GetAuthorizer ¶ added in v1.6.0
GetAuthorizer return autorest authorizer.
func (*Config) GetMSICredential ¶ added in v1.4.10
func (c *Config) GetMSICredential(ctx context.Context) (*azidentity.ManagedIdentityCredential, error)
GetMSICredential retrieve MSI credential
func (*Config) GetSPCredential ¶ added in v1.4.10
func (c *Config) GetSPCredential(ctx context.Context) (*azidentity.ClientSecretCredential, error)
GetSPCredential retrieve SP credential
type ConfigInterface ¶ added in v1.6.0
type ConfigInterface interface { GetMSICredential(ctx context.Context) (*azidentity.ManagedIdentityCredential, error) GetSPCredential(ctx context.Context) (*azidentity.ClientSecretCredential, error) GetAuthorizer(ctx context.Context, resource string) (autorest.Authorizer, error) }
Click to show internal directories.
Click to hide internal directories.