azure

package
v0.0.0-...-3bde953 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzureStorageConnectionString = "AZURE_STORAGE_CONNECTION_STRING"
	CnabStateStorageAccountKey   = "CNAB_AZURE_STATE_STORAGE_ACCOUNT_KEY"
)

Variables

View Source
var AsyncOperationTableName string
View Source
var StateTableName string
View Source
var StorageAccountKey string
View Source
var StorageAccountName string

Functions

func DeleteRPState

func DeleteRPState(partitionKey string, resourceId string) error

func GetRPState

func GetRPState(partitionKey string, resourceId string) (*models.BundleCommandProperties, error)

func GetResourceIdFromRowKey

func GetResourceIdFromRowKey(rowKey string) string

func GetStorageAccountsClient

func GetStorageAccountsClient(subscriptionID string, authorizer autorest.Authorizer, userAgent string) storage.AccountsClient

GetStorageAccountsClient gets a Storage Account Client

func IsListRequest

func IsListRequest(requestPath string) bool

func IsOperationsRequest

func IsOperationsRequest(requestPath string) bool

func IsTerminalProvisioningState

func IsTerminalProvisioningState(provisioningState string) bool

func ListRPState

func ListRPState(partitionKey string, resourceProviderName string, resourceTypeName string) (*storage.EntityQueryResult, error)

func LoadState

func LoadState(next http.Handler) http.Handler

func LogRequestBody

func LogRequestBody(next http.Handler) http.Handler

func LogResponseBody

func LogResponseBody(next http.Handler) http.Handler

func Login

func Login(next http.Handler) http.Handler

HTTP middleware setting original request URL on context

func PutAsyncOp

func PutAsyncOp(partitionKey string, operationId string, action string, status string, result interface{}) error

func PutRPState

func PutRPState(partitionKey string, resourceId string, properties *models.BundleCommandProperties) error

func RequestId

func RequestId(next http.Handler) http.Handler

func SetAzureStorageInfo

func SetAzureStorageInfo() error

SetAzureStorageInfo. The Azure plugin expects the connection string to be set in an environment variable , the Azure CNAB Driver requires an account key to access file shares and the storage package requires details of the storage account and tables that are used

func SetFailedProvisioningState

func SetFailedProvisioningState(partitionKey string, resourceId string, errorResponse *helpers.ErrorResponse) error

func UpdateRPStatus

func UpdateRPStatus(partitionKey string, resourceId string, status string) error

func ValidateRPType

func ValidateRPType(next http.Handler) http.Handler

Types

type AsyncOperationState

type AsyncOperationState struct {
	Action string
	Status string
	Output string
}

func GetAsyncOp

func GetAsyncOp(partitionKey string, operationId string) (*AsyncOperationState, error)

type AzureLoginContextKey

type AzureLoginContextKey string
const AzureLoginContext AzureLoginContextKey = "AzureLoginContext"

type LoginInfo

type LoginInfo struct {
	Authorizer         autorest.Authorizer
	OAuthTokenProvider adal.OAuthTokenProvider
}

LoginInfo contains Azure login information

func LoginToAzure

func LoginToAzure() (LoginInfo, error)

type RPState

type RPState struct {
	*storage.Entity
}

type ResponseLogger

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

func NewResponseLogger

func NewResponseLogger(writer http.ResponseWriter) *ResponseLogger

func (*ResponseLogger) Header

func (r *ResponseLogger) Header() http.Header

func (*ResponseLogger) Write

func (r *ResponseLogger) Write(b []byte) (int, error)

func (*ResponseLogger) WriteHeader

func (r *ResponseLogger) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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