azure

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 5 Imported by: 24

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          azure.Environment
	SubscriptionID       string `envconfig:"SUBSCRIPTION_ID" required:"true"` // nolint: lll
	TenantID             string `envconfig:"TENANT_ID" required:"true"`
	ClientID             string `envconfig:"CLIENT_ID" required:"true"`
	ClientSecret         string `envconfig:"CLIENT_SECRET" required:"true"`
	DefaultLocation      string `envconfig:"DEFAULT_LOCATION"`
	DefaultResourceGroup string `envconfig:"DEFAULT_RESOURCE_GROUP"`
}

Config represents details necessary for the broker to interact with an Azure subscription

func GetConfigFromEnvironment added in v0.10.0

func GetConfigFromEnvironment() (Config, error)

GetConfigFromEnvironment returns Azure-related configuration derived from environment variables

func NewConfigWithDefaults added in v0.10.0

func NewConfigWithDefaults() Config

NewConfigWithDefaults returns a Config object with default values already applied. Callers are then free to set custom values for the remaining fields and/or override default values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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