helpers

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgentPrefix            = "cnab-custom-resource-handler"
	ProvisioningStateSucceeded = "Succeeded"
	ProvisioningStateFailed    = "Failed"
	ProvisioningStateDeleting  = "Deleting"
	StatusSucceeded            = "Succeeded"
	StatusFailed               = "Failed"
	APIVersion                 = "2018-09-01-preview"
	AsyncOperationComplete     = "Succeeded"
	AsyncOperationFailed       = "Failed"
	AsyncOperationUnknown      = "Unknown"
)

Variables

This section is empty.

Functions

func ErrorConflict

func ErrorConflict(message string) render.Renderer

func ErrorInvalidRequest

func ErrorInvalidRequest(message string) render.Renderer

func ErrorInvalidRequestFromError

func ErrorInvalidRequestFromError(err error) render.Renderer

func ErrorNotFound

func ErrorNotFound() render.Renderer

func ExecutePorterCommand

func ExecutePorterCommand(args []string) ([]byte, error)

func GetInstallationName

func GetInstallationName(trimmedBundleTag string, requestPath string) string

func GetResourceDetails

func GetResourceDetails(r *http.Request) (*azure.Resource, *string, *string, error)

GetResourceDetails parses the request header containing resource details and returns the details of the resource

func UserAgent

func UserAgent() string

func Version

func Version() string

Version returns the version string

Types

type ErrorResponse

type ErrorResponse struct {
	*RequestError `json:"ErrorResponse"`
}

func ErrorInternalServerError

func ErrorInternalServerError(message string) *ErrorResponse

func ErrorInternalServerErrorFromError

func ErrorInternalServerErrorFromError(err error) *ErrorResponse

func (*ErrorResponse) Render

type PorterOutput

type PorterOutput struct {
	Name  string `json:"Name"`
	Value string `json:"Value"`
	Type  string `json:"Type"`
}

func GetBundleOutput

func GetBundleOutput(rpBundle *bundle.Bundle, installationName string, actions []string) ([]PorterOutput, error)

type RequestError

type RequestError struct {
	HTTPStatusCode int    `json:"statuscode"`
	Status         string `json:"status"`
	Message        string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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