Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessTokensPath ¶
AccessTokensPath returns the path where access tokens are stored from the Azure CLI TODO(#199): add unit test.
func ParseExpirationDate ¶
ParseExpirationDate parses either a Azure CLI or CloudShell date into a time object
func ProfilePath ¶
ProfilePath returns the path where the Azure Profile is stored from the Azure CLI
Types ¶
type Profile ¶
type Profile struct { InstallationID string `json:"installationId"` Subscriptions []Subscription `json:"subscriptions"` }
Profile represents a Profile from the Azure CLI
func LoadProfile ¶
LoadProfile restores a Profile object from a file located at 'path'.
type Subscription ¶
type Subscription struct { EnvironmentName string `json:"environmentName"` ID string `json:"id"` IsDefault bool `json:"isDefault"` Name string `json:"name"` State string `json:"state"` TenantID string `json:"tenantId"` }
Subscription represents a Subscription from the Azure CLI
type Token ¶
type Token struct { AccessToken string `json:"accessToken"` Authority string `json:"_authority"` ClientID string `json:"_clientId"` ExpiresOn string `json:"expiresOn"` IdentityProvider string `json:"identityProvider"` IsMRRT bool `json:"isMRRT"` RefreshToken string `json:"refreshToken"` Resource string `json:"resource"` TokenType string `json:"tokenType"` UserID string `json:"userId"` }
Token represents an AccessToken from the Azure CLI
func LoadTokens ¶
LoadTokens restores a set of Token objects from a file located at 'path'.
Click to show internal directories.
Click to hide internal directories.