azure

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: Apache-2.0 Imports: 14 Imported by: 1

README

azure

Build Status Go Report Card GoDoc License PRs Welcome

azure

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionAzure

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

ConnectionAzure holds the authorization information and URL for Azure. tagNames acts as a cache holding the unique list of tag names, as the API call to gather them all is expensive

func CreateConnection

func CreateConnection(authInfo, url string, lstream logger) (connection *ConnectionAzure, err error)

CreateConnection establishes a connection to Azure and collects a list of subscriptions that the auth information has access to

func (*ConnectionAzure) GetAllTagNames

func (connection *ConnectionAzure) GetAllTagNames() (tagNames []string, err error)

GetAllTagNames grabs a unique list of tag names due to the expensive nature of gathering all tags, we will cache the tag names as we create the ip mapping

func (*ConnectionAzure) GetIPTagMapping

func (connection *ConnectionAzure) GetIPTagMapping() (ipToKeyToValue map[domain.CloudIP]map[string]string, err error)

GetIPTagMapping returns a map where the first key is an IP that returns a map containing a key->value pair containing tagNames->tagValues this method also creates a list of unique tag names and caches them for later use by GetAllTagNames

func (*ConnectionAzure) IPAddresses

func (connection *ConnectionAzure) IPAddresses() (ips []domain.CloudIP, err error)

IPAddresses retrieves a list of IP Addresses for the azure subscription

func (*ConnectionAzure) Send

func (connection *ConnectionAzure) Send(log log.Log)

Send implements the logger interface and lets the Azure connection be used in place of the logger

Jump to

Keyboard shortcuts

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