azureHttp

package
v0.0.0-...-b92d8f9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ApiURL the base url of azure
	ApiURL = "https://management.azure.com/subscriptions/"
	//ContentTypeJSON the result is json
	ContentTypeJSON = "application/json; charset=utf-8"
	//ContentTypeXML the result is xml
	ContentTypeXML = "application/xml; charset=utf-8"
)

Variables

This section is empty.

Functions

func ContentError

func ContentError(expexted, got string) error

Types

type AzureConnector

type AzureConnector struct {
	// contains filtered or unexported fields
}

func NewAzureConnector

func NewAzureConnector(clientId, clientSecret, subscriptionId, tenantId string) (*AzureConnector, error)

func (AzureConnector) HttpRequest

func (a AzureConnector) HttpRequest(u url.URL) ([]byte, string, error)

func (AzureConnector) Request

func (a AzureConnector) Request(apiVersion, path, filter string) ([]byte, string, error)

func (AzureConnector) RequestWithSub

func (a AzureConnector) RequestWithSub(apiVersion, path, filter string) ([]byte, string, error)

Jump to

Keyboard shortcuts

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