common

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MPL-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzureVaultApiVersion = "2016-10-01"
)

Variables

View Source
var TemplateFuncs = template.FuncMap{
	"clean_resource_name": templateCleanImageName,
}

Functions

func DumpConfig added in v0.10.1

func DumpConfig(config interface{}, say func(string))

func GlueStrings

func GlueStrings(a, b string) string

removes overlap between the end of a and the start of b and glues them together

func IsStateCancelled added in v0.10.1

func IsStateCancelled(stateBag multistep.StateBag) bool

func MapToAzureTags added in v1.6.3

func MapToAzureTags(in map[string]string) map[string]*string

func StringsContains added in v1.5.6

func StringsContains(haystack []string, needle string) bool

StringsContains returns true if the `haystack` contains the `needle`. Search is case insensitive.

Types

type AZVaultClientIface added in v1.5.2

type AZVaultClientIface interface {
	GetSecret(string, string) (*Secret, error)
	SetSecret(string, string, string) error
}

Enables us to test steps that access this cli

type Artifact added in v1.4.5

type Artifact struct {
	// Array of the Azure resource IDs that were created.
	Resources []string

	// BuilderId is the unique ID for the builder that created this AMI
	BuilderIdValue string

	// Azure client for performing API stuff.
	AzureClientSet client.AzureClientSet

	// StateData should store data such as GeneratedData
	// to be shared with post-processors
	StateData map[string]interface{}
}

Artifact is an artifact implementation that contains built Managed Images or Disks.

func (*Artifact) BuilderId added in v1.4.5

func (a *Artifact) BuilderId() string

func (*Artifact) Destroy added in v1.4.5

func (a *Artifact) Destroy() error

func (*Artifact) Files added in v1.4.5

func (*Artifact) Files() []string

func (*Artifact) Id added in v1.4.5

func (a *Artifact) Id() string

func (*Artifact) State added in v1.4.5

func (a *Artifact) State(name string) interface{}

func (*Artifact) String added in v1.4.5

func (a *Artifact) String() string

type MockAZVaultClient added in v1.5.2

type MockAZVaultClient struct {
	GetSecretCalled       bool
	SetSecretCalled       bool
	SetSecretVaultName    string
	SetSecretSecretName   string
	SetSecretCert         string
	DeleteResponderCalled bool
	DeletePreparerCalled  bool
	DeleteSenderCalled    bool

	IsError bool
}

func (*MockAZVaultClient) DeletePreparer added in v1.5.2

func (m *MockAZVaultClient) DeletePreparer(resourceGroupName string, vaultName string) (*http.Request, error)

func (*MockAZVaultClient) DeleteResponder added in v1.5.2

func (m *MockAZVaultClient) DeleteResponder(resp *http.Response) (autorest.Response, error)

func (*MockAZVaultClient) DeleteSender added in v1.5.2

func (m *MockAZVaultClient) DeleteSender(req *http.Request) (*http.Response, error)

func (*MockAZVaultClient) GetSecret added in v1.5.2

func (m *MockAZVaultClient) GetSecret(vaultName, secretName string) (*Secret, error)

func (*MockAZVaultClient) SetSecret added in v1.5.2

func (m *MockAZVaultClient) SetSecret(vaultName, secretName string, secretValue string) error

type Secret added in v0.10.1

type Secret struct {
	ID    *string `json:"id,omitempty"`
	Value string  `json:"value"`
}

type VaultClient added in v0.10.1

type VaultClient struct {
	autorest.Client

	SubscriptionID string
	// contains filtered or unexported fields
}

func NewVaultClient added in v0.11.0

func NewVaultClient(keyVaultEndpoint url.URL) VaultClient

func NewVaultClientWithBaseURI added in v1.1.3

func NewVaultClientWithBaseURI(baseURI, subscriptionID string) VaultClient

func (*VaultClient) GetSecret added in v0.10.1

func (client *VaultClient) GetSecret(vaultName, secretName string) (*Secret, error)

func (*VaultClient) SetSecret added in v1.5.2

func (client *VaultClient) SetSecret(vaultName, secretName string, secretValue string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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