Documentation ¶
Index ¶
- Constants
- func GetTokenStorePath() string
- func NewContainerClient(subscriptionID string) (containerinstance.ContainersClient, error)
- func NewContainerGroupsClient(subscriptionID string) (containerinstance.ContainerGroupsClient, error)
- func NewFileShareClient(subscriptionID string) (storage.FileSharesClient, error)
- func NewGroupsClient(subscriptionID string) (resources.GroupsClient, error)
- func NewStorageAccountsClient(subscriptionID string) (storage.AccountsClient, error)
- func NewSubscriptionsClient() (subscription.SubscriptionsClient, error)
- type AzureLoginService
- type CloudEnvironment
- type CloudEnvironmentAuthentication
- type CloudEnvironmentService
- type LocalServer
- type StorageLogin
- type StorageLoginImpl
- type TokenInfo
Constants ¶
const ( // AzurePublicCloudName is the moniker of the Azure public cloud AzurePublicCloudName = "AzureCloud" // AcrSuffixKey is the well-known name of the DNS suffix for Azure Container Registries AcrSuffixKey = "acrLoginServer" // CloudMetadataURLVar is the name of the environment variable that (if defined), points to a URL that should be used by Docker CLI to retrieve cloud metadata CloudMetadataURLVar = "ARM_CLOUD_METADATA_URL" // DefaultCloudMetadataURL is the URL of the cloud metadata service maintained by Azure public cloud DefaultCloudMetadataURL = "https://management.azure.com/metadata/endpoints?api-version=2019-05-01" )
const UserAgentName = "docker-cli"
UserAgentName is the default user agent used by the cli
Variables ¶
This section is empty.
Functions ¶
func NewContainerClient ¶
func NewContainerClient(subscriptionID string) (containerinstance.ContainersClient, error)
NewContainerClient get client to manipulate containers
func NewContainerGroupsClient ¶
func NewContainerGroupsClient(subscriptionID string) (containerinstance.ContainerGroupsClient, error)
NewContainerGroupsClient get client toi manipulate containerGrouos
func NewFileShareClient ¶ added in v0.1.15
func NewFileShareClient(subscriptionID string) (storage.FileSharesClient, error)
NewFileShareClient get client to manipulate file shares
func NewGroupsClient ¶
func NewGroupsClient(subscriptionID string) (resources.GroupsClient, error)
NewGroupsClient get client to manipulate groups
func NewStorageAccountsClient ¶
func NewStorageAccountsClient(subscriptionID string) (storage.AccountsClient, error)
NewStorageAccountsClient get client to manipulate storage accounts
func NewSubscriptionsClient ¶
func NewSubscriptionsClient() (subscription.SubscriptionsClient, error)
NewSubscriptionsClient get subscription client
Types ¶
type AzureLoginService ¶
type AzureLoginService interface { Login(ctx context.Context, requestedTenantID string, cloudEnvironment string) error LoginServicePrincipal(clientID string, clientSecret string, tenantID string, cloudEnvironment string) error Logout(ctx context.Context) error GetCloudEnvironment() (CloudEnvironment, error) GetValidToken() (oauth2.Token, string, error) }
AzureLoginService Service to log into azure and get authentifier for azure APIs
func NewAzureLoginService ¶
func NewAzureLoginService() (AzureLoginService, error)
NewAzureLoginService creates a NewAzureLoginService
type CloudEnvironment ¶ added in v1.0.9
type CloudEnvironment struct { Name string `json:"name"` Authentication CloudEnvironmentAuthentication `json:"authentication"` ResourceManagerURL string `json:"resourceManager"` Suffixes map[string]string `json:"suffixes"` }
CloudEnvironment describes Azure sovereign cloud instance (e.g. Azure public, Azure US government, Azure China etc.)
func (*CloudEnvironment) GetAuthorizeRequestFormat ¶ added in v1.0.9
func (ce *CloudEnvironment) GetAuthorizeRequestFormat() string
GetAuthorizeRequestFormat returns a string format that can be used to construct authorization code request in an OAuth2 flow. The URL uses login endpoint appropriate for given cloud environment.
func (*CloudEnvironment) GetTenantQueryURL ¶ added in v1.0.9
func (ce *CloudEnvironment) GetTenantQueryURL() string
GetTenantQueryURL returns an URL that can be used to fetch the list of Azure Active Directory tenants from a given cloud environment
func (*CloudEnvironment) GetTokenRequestFormat ¶ added in v1.0.9
func (ce *CloudEnvironment) GetTokenRequestFormat() string
GetTokenRequestFormat returns a string format that can be used to construct a security token request against Azure Active Directory
func (*CloudEnvironment) GetTokenScope ¶ added in v1.0.9
func (ce *CloudEnvironment) GetTokenScope() string
GetTokenScope returns a token scope that fits Docker CLI Azure management API usage
type CloudEnvironmentAuthentication ¶ added in v1.0.9
type CloudEnvironmentAuthentication struct { LoginEndpoint string `json:"loginEndpoint"` Audiences []string `json:"audiences"` Tenant string `json:"tenant"` }
CloudEnvironmentAuthentication data for logging into, and obtaining tokens for, Azure sovereign clouds
type CloudEnvironmentService ¶ added in v1.0.9
type CloudEnvironmentService interface {
Get(name string) (CloudEnvironment, error)
}
CloudEnvironmentService exposed metadata about Azure cloud environments
var ( // CloudEnvironments is the default instance of the CloudEnvironmentService CloudEnvironments CloudEnvironmentService )
type LocalServer ¶
type LocalServer struct {
// contains filtered or unexported fields
}
LocalServer is an Azure login server
func NewLocalServer ¶
func NewLocalServer(queryCh chan localResponse) (*LocalServer, error)
NewLocalServer creates an Azure login server
func (*LocalServer) Addr ¶
func (s *LocalServer) Addr() string
Addr returns the address that the local Azure server is service to
type StorageLogin ¶ added in v0.1.15
type StorageLogin interface { // GetAzureStorageAccountKey retrieves the storage account ket from the current azure login GetAzureStorageAccountKey(ctx context.Context, accountName string) (string, error) }
StorageLogin helper for Azure Storage Login
type StorageLoginImpl ¶ added in v0.1.17
type StorageLoginImpl struct {
AciContext store.AciContext
}
StorageLoginImpl implementation of StorageLogin
func (StorageLoginImpl) GetAzureStorageAccountKey ¶ added in v0.1.17
func (helper StorageLoginImpl) GetAzureStorageAccountKey(ctx context.Context, accountName string) (string, error)
GetAzureStorageAccountKey retrieves the storage account ket from the current azure login