azure

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBearerTokenAuthorizer

func GetBearerTokenAuthorizer(
	azureEnvironment azure.Environment,
	tenantID string,
	clientID string,
	clientSecret string,
) (*autorest.BearerAuthorizer, error)

GetBearerTokenAuthorizer returns a *autorest.BearerAuthorizer used for authenticating outbound requests to the Azure APIs

func IsValidLocation

func IsValidLocation(location string) bool

IsValidLocation returns a bool indicating whether the provided location is a valid one

Types

type Config

type Config struct {
	Environment    string `envconfig:"AZURE_ENVIRONMENT" default:"AzurePublicCloud"` // nolint: lll
	SubscriptionID string `envconfig:"AZURE_SUBSCRIPTION_ID" required:"true"`
	TenantID       string `envconfig:"AZURE_TENANT_ID" required:"true"`
	ClientID       string `envconfig:"AZURE_CLIENT_ID" required:"true"`
	ClientSecret   string `envconfig:"AZURE_CLIENT_SECRET" required:"true"`
}

Config represents all configuration details needed for connecting to Azure APIs

func GetConfig

func GetConfig() (Config, error)

GetConfig parses configuration details needed for connecting to Azure APIs from environment variables and returns a Config object that encapsulates those details

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL