providers

package
v1.72.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package providers contains helpers to retrieve tokens from cloud provider. This package should not be in here. It will move. Don't use it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSServiceRoleToken

func AWSServiceRoleToken() (roleData string, err error)

AWSServiceRoleToken gets the service role data of the VM.

func AzureServiceIdentityToken

func AzureServiceIdentityToken() (string, error)

AzureServiceIdentityToken will retrieve the service account token for the VM using the Metadata Identity Service of Azure.

func GCPServiceAccountToken

func GCPServiceAccountToken(ctx context.Context, validity time.Duration) (string, error)

GCPServiceAccountToken will retrieve the service account token and call the midgard library.

Types

type AzureToken

type AzureToken struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    string `json:"expires_in"`
	ExpiresOn    string `json:"expires_on"`
	NotBefore    string `json:"not_before"`
	Resource     string `json:"resource"`
	TokenType    string `json:"token_type"`
}

AzureToken is the standard OAUTH token provided by Azure.

Jump to

Keyboard shortcuts

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