azurecommon

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientSecretCredentials

func ClientSecretCredentials(key []byte, httpClient HTTPClient) (*azidentity.ClientSecretCredential, error)

func ClientSecretCredentialsWithAzureKey

func ClientSecretCredentialsWithAzureKey(azureKey AzureKey, httpClient HTTPClient) (*azidentity.ClientSecretCredential, error)

Types

type AzureKey

type AzureKey struct {
	AppId        string `json:"appId"`
	Secret       string `json:"secret"`
	Tenant       string `json:"tenant"`
	Subscription string `json:"subscription"`
}

func DecodeKey

func DecodeKey(key []byte) (AzureKey, error)

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
	Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
}

HTTPClient - copied from demo/internal/orchestratorproviders/microsoftazure/azurecommon/azure_http_client.go

Jump to

Keyboard shortcuts

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