azure

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 1 module, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultMSIResourceID is the default resource ID to use as the intended
	// audience of the MSI token. The current value is the service ID for the
	// Resource Manager API.
	DefaultMSIResourceID = "https://management.azure.com/"
)

Variables

This section is empty.

Functions

func FetchMSIToken

func FetchMSIToken(ctx context.Context, cl HTTPClient, resource string) (string, error)

Types

type ComputeMetadata

type ComputeMetadata struct {
	Name              string `json:"name"`
	SubscriptionID    string `json:"subscriptionId"`
	ResourceGroupName string `json:"resourceGroupName"`
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPClientFunc

type HTTPClientFunc func(*http.Request) (*http.Response, error)

func (HTTPClientFunc) Do

func (fn HTTPClientFunc) Do(req *http.Request) (*http.Response, error)

type InstanceMetadata

type InstanceMetadata struct {
	Compute ComputeMetadata `json:"compute"`
}

func FetchInstanceMetadata

func FetchInstanceMetadata(ctx context.Context, cl HTTPClient) (*InstanceMetadata, error)

type MSIAttestationData

type MSIAttestationData struct {
	Token string `json:"token"`
}

type MSITokenClaims

type MSITokenClaims struct {
	jwt.Claims
	TenantID string `json:"tid,omitempty"`
}

func (*MSITokenClaims) AgentID

func (c *MSITokenClaims) AgentID(trustDomain string) string

Jump to

Keyboard shortcuts

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