Documentation ¶
Index ¶
- func ArmEndpoint() string
- func DeviceFlow() bool
- func GetRandomLetterSequence(n int) string
- func GroupPrefix() string
- func KeepResources() bool
- func Location() string
- func OverrideCanaryLocation(usableLocation string)
- func OverrideLocation(available []string)
- func ParseArgs() error
- func ParseDeviceFlow() error
- func ParseSubscriptionID() error
- func PrintAndLog(message string)
- func ReadEnvFile() error
- func ReadJSON(path string) (*map[string]interface{}, error)
- func ResourceGroupName() string
- func ServicePrincipalObjectID() string
- func SetPrefix(prefix string)
- func SetResourceGroupName(suffix string)
- func SubscriptionID() string
- func UserAgent() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeviceFlow ¶
func DeviceFlow() bool
DeviceFlow returns if device flow has been set as auth grant type
func GetRandomLetterSequence ¶
GetRandomLetterSequence returns a sequence of English characters of length n.
func GroupPrefix ¶
func GroupPrefix() string
GroupPrefix specifies the prefix sample resource groups should have
func KeepResources ¶
func KeepResources() bool
KeepResources indicates whether resources created by samples should be retained.
func OverrideCanaryLocation ¶
func OverrideCanaryLocation(usableLocation string)
OverrideCanaryLocation ovverrides the specified canary location where to create Azure resources.
func OverrideLocation ¶
func OverrideLocation(available []string)
OverrideLocation ovverrides the specified location where to create Azure resources. This can be used when the selection location does not have the desired resource provider available yet
func ParseArgs ¶
func ParseArgs() error
ParseArgs picks up shared env vars and flags and finishes parsing flags Other packages should declare their flags then call helpers.ParseArgs()
func ParseDeviceFlow ¶
func ParseDeviceFlow() error
ParseDeviceFlow parses the auth grant type to be used The caller should do flag.Parse()
func ParseSubscriptionID ¶
func ParseSubscriptionID() error
ParseSubscriptionID gets the subscription id from either an env var, .env file or flag The caller should do flag.Parse()
func ReadEnvFile ¶
func ReadEnvFile() error
ReadEnvFile reads the .env file and loads its environment variables.
func ResourceGroupName ¶
func ResourceGroupName() string
ResourceGroupName returns the name of the resource group to use.
func ServicePrincipalObjectID ¶
func ServicePrincipalObjectID() string
ServicePrincipalObjectID returns the object ID of the service principal in use.
func SetResourceGroupName ¶
func SetResourceGroupName(suffix string)
SetResourceGroupName sets a name for the resource group. It takes into account the resource group prefix, and adds some random letters to ensure uniqueness
func SubscriptionID ¶
func SubscriptionID() string
SubscriptionID returns the ID of the subscription to use.
Types ¶
This section is empty.