Documentation
¶
Index ¶
- Constants
- func GetTokenStorePath() string
- func NewAuthorizerFromLogin() (autorest.Authorizer, error)
- func NewContainerClient(subscriptionID string) (containerinstance.ContainerClient, 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
- func (login AzureLoginService) GetTenantID() (string, error)
- func (login *AzureLoginService) GetValidToken() (oauth2.Token, error)
- func (login *AzureLoginService) Login(ctx context.Context, requestedTenantID string) error
- func (login *AzureLoginService) LoginServicePrincipal(clientID string, clientSecret string, tenantID string) error
- func (login *AzureLoginService) Logout(ctx context.Context) error
- type AzureLoginServiceAPI
- type LocalServer
- type StorageLogin
- type StorageLoginImpl
- type TokenInfo
Constants ¶
const (
// AcrRegistrySuffix suffix for ACR registry images
AcrRegistrySuffix = ".azurecr.io"
)
go login process, derived from code sample provided by MS at https://github.com/devigned/go-az-cli-stuff
Variables ¶
This section is empty.
Functions ¶
func NewAuthorizerFromLogin ¶
func NewAuthorizerFromLogin() (autorest.Authorizer, error)
NewAuthorizerFromLogin creates an authorizer based on login access token
func NewContainerClient ¶
func NewContainerClient(subscriptionID string) (containerinstance.ContainerClient, 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 struct {
// contains filtered or unexported fields
}
AzureLoginService Service to log into azure and get authentifier for azure APIs
func NewAzureLoginService ¶
func NewAzureLoginService() (*AzureLoginService, error)
NewAzureLoginService creates a NewAzureLoginService
func (AzureLoginService) GetTenantID ¶
func (login AzureLoginService) GetTenantID() (string, error)
GetTenantID returns tenantID for current login
func (*AzureLoginService) GetValidToken ¶
func (login *AzureLoginService) GetValidToken() (oauth2.Token, error)
GetValidToken returns an access token. Refresh token if needed
func (*AzureLoginService) Login ¶
func (login *AzureLoginService) Login(ctx context.Context, requestedTenantID string) error
Login performs an Azure login through a web browser
func (*AzureLoginService) LoginServicePrincipal ¶
func (login *AzureLoginService) LoginServicePrincipal(clientID string, clientSecret string, tenantID string) error
LoginServicePrincipal login with clientId / clientSecret from a service principal. The resulting token does not include a refresh token
type AzureLoginServiceAPI ¶
type AzureLoginServiceAPI interface {
LoginServicePrincipal(clientID string, clientSecret string, tenantID string) error
Login(ctx context.Context, requestedTenantID string) error
Logout(ctx context.Context) error
}
AzureLoginServiceAPI interface for Azure login service
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