common

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: MPL-2.0, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzureVaultApiVersion = "2015-06-01"
)

Variables

This section is empty.

Functions

func Authenticate added in v0.10.1

func Authenticate(env azure.Environment, tenantID string, say func(string)) (*adal.ServicePrincipalToken, error)

Authenticate fetches a token from the local file cache or initiates a consent flow and waits for token to be obtained.

func DumpConfig added in v0.10.1

func DumpConfig(config interface{}, say func(string))

func FindTenantID added in v0.11.0

func FindTenantID(env azure.Environment, subscriptionID string) (string, error)

FindTenantID figures out the AAD tenant ID of the subscription by making an unauthenticated request to the Get Subscription Details endpoint and parses the value from WWW-Authenticate header.

func GlueStrings

func GlueStrings(a, b string) string

removes overlap between the end of a and the start of b and glues them together

func IsStateCancelled added in v0.10.1

func IsStateCancelled(stateBag multistep.StateBag) bool

func RandomPassword

func RandomPassword() (password string)

func RandomString

func RandomString(chooseFrom string, length int) (randomString string)

Types

type InterruptibleTask added in v0.10.1

type InterruptibleTask struct {
	IsCancelled func() bool
	Task        func(cancelCh <-chan struct{}) error
}

func NewInterruptibleTask added in v0.10.1

func NewInterruptibleTask(isCancelled func() bool, task func(cancelCh <-chan struct{}) error) *InterruptibleTask

func (*InterruptibleTask) Run added in v0.10.1

type InterruptibleTaskResult added in v0.10.1

type InterruptibleTaskResult struct {
	Err         error
	IsCancelled bool
}

func StartInterruptibleTask added in v0.10.1

func StartInterruptibleTask(isCancelled func() bool, task func(cancelCh <-chan struct{}) error) InterruptibleTaskResult

type Secret added in v0.10.1

type Secret struct {
	ID    *string `json:"id,omitempty"`
	Value string  `json:"value"`
}

type VaultClient added in v0.10.1

type VaultClient struct {
	autorest.Client
	// contains filtered or unexported fields
}

func NewVaultClient added in v0.11.0

func NewVaultClient(keyVaultEndpoint url.URL) VaultClient

func (*VaultClient) GetSecret added in v0.10.1

func (client *VaultClient) GetSecret(vaultName, secretName string) (*Secret, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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