helpers

package
v2.1.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCredentials

func LoadCredentials() (map[string]string, error)

LoadCredentials reads credentials from a ~/.azure/credentials.json file. See the accompanying credentials_sample.json file for an example.

Note: Storing crendentials in a local file must be secured and not shared. It is used here simply to reduce code in the examples.

func NewServicePrincipalTokenFromCredentials

func NewServicePrincipalTokenFromCredentials(c map[string]string, scope string) (*azure.ServicePrincipalToken, error)

NewServicePrincipalTokenFromCredentials creates a new ServicePrincipalToken using values of the passed credentials map.

func ToJSON

func ToJSON(v interface{}) string

ToJSON returns the passed item as a pretty-printed JSON string. If any JSON error occurs, it returns the empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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