azure

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: MIT Imports: 6 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

func LocationValidator added in v0.12.0

func LocationValidator(context, val string) error

LocationValidator is a custom schema validator that validates a specified location is a real Azure region.

Types

type Config

type Config struct {
	Environment    azure.Environment
	SubscriptionID string `envconfig:"SUBSCRIPTION_ID" required:"true"`
	TenantID       string `envconfig:"TENANT_ID" required:"true"`
	ClientID       string `envconfig:"CLIENT_ID" required:"true"`
	ClientSecret   string `envconfig:"CLIENT_SECRET" required:"true"`
}

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