fakes

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2016 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSCreateLBs

type AWSCreateLBs struct {
	Name        string
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			Config commands.AWSCreateLBsConfig
			State  storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*AWSCreateLBs) Execute

func (u *AWSCreateLBs) Execute(config commands.AWSCreateLBsConfig, state storage.State) error

type AWSKeyPairDeleter

type AWSKeyPairDeleter struct {
	DeleteCall struct {
		Receives struct {
			Name string
		}
		Returns struct {
			Error error
		}
	}
}

func (*AWSKeyPairDeleter) Delete

func (d *AWSKeyPairDeleter) Delete(name string) error

type AWSUp

type AWSUp struct {
	Name        string
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			AWSUpConfig commands.AWSUpConfig
			State       storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*AWSUp) Execute

func (u *AWSUp) Execute(awsUpConfig commands.AWSUpConfig, state storage.State) error

type AvailabilityZoneRetriever

type AvailabilityZoneRetriever struct {
	RetrieveCall struct {
		Receives struct {
			Region string
		}
		Returns struct {
			AZs   []string
			Error error
		}
	}
}

func (*AvailabilityZoneRetriever) Retrieve

func (a *AvailabilityZoneRetriever) Retrieve(region string) ([]string, error)

type BOSHClient

type BOSHClient struct {
	UpdateCloudConfigCall struct {
		CallCount int
		Receives  struct {
			Yaml []byte
		}
		Returns struct {
			Error error
		}
	}

	InfoCall struct {
		CallCount int
		Returns   struct {
			Info  bosh.Info
			Error error
		}
	}
}

func (*BOSHClient) Info

func (c *BOSHClient) Info() (bosh.Info, error)

func (*BOSHClient) UpdateCloudConfig

func (c *BOSHClient) UpdateCloudConfig(yaml []byte) error

type BOSHClientProvider

type BOSHClientProvider struct {
	ClientCall struct {
		Receives struct {
			DirectorAddress  string
			DirectorUsername string
			DirectorPassword string
		}
		Returns struct {
			Client bosh.Client
		}
	}
}

func (*BOSHClientProvider) Client

func (b *BOSHClientProvider) Client(directorAddress, directorUsername, directorPassword string) bosh.Client

type BOSHDeleter

type BOSHDeleter struct {
	DeleteCall struct {
		CallCount int
		Receives  struct {
			BOSHInitManifest string
			BOSHInitState    boshinit.State
			EC2PrivateKey    string
		}
		Returns struct {
			Error error
		}
	}
}

func (*BOSHDeleter) Delete

func (d *BOSHDeleter) Delete(boshInitManifest string, boshInitState boshinit.State, ec2PrivateKey string) error

type BOSHDeployer

type BOSHDeployer struct {
	DeployCall struct {
		Receives struct {
			Input boshinit.DeployInput
		}
		Returns struct {
			Output boshinit.DeployOutput
			Error  error
		}
	}
}

func (*BOSHDeployer) Deploy

type BOSHInitCommandRunner

type BOSHInitCommandRunner struct {
	ExecuteCall struct {
		Receives struct {
			Manifest   []byte
			PrivateKey string
			State      boshinit.State
		}
		Returns struct {
			State boshinit.State
			Error error
		}
	}
}

func (*BOSHInitCommandRunner) Execute

func (r *BOSHInitCommandRunner) Execute(manifest []byte, privateKey string, state boshinit.State) (boshinit.State, error)

type BOSHInitManifestBuilder

type BOSHInitManifestBuilder struct {
	BuildCall struct {
		Receives struct {
			Properties manifests.ManifestProperties
			IAAS       string
		}
		Returns struct {
			Manifest   manifests.Manifest
			Properties manifests.ManifestProperties
			Error      error
		}
	}
}

func (*BOSHInitManifestBuilder) Build

type BoshCloudConfigurator

type BoshCloudConfigurator struct {
	ConfigureCall struct {
		CallCount int
		Receives  struct {
			Stack cloudformation.Stack
			AZs   []string
		}
		Returns struct {
			CloudConfigInput bosh.CloudConfigInput
		}
	}
}

func (*BoshCloudConfigurator) Configure

type CertificateDeleter

type CertificateDeleter struct {
	DeleteCall struct {
		CallCount int
		Receives  struct {
			CertificateName string
		}
		Returns struct {
			Error error
		}
	}
}

func (*CertificateDeleter) Delete

func (c *CertificateDeleter) Delete(certificateName string) error

type CertificateDescriber

type CertificateDescriber struct {
	DescribeCall struct {
		CallCount int
		Receives  struct {
			CertificateName string
		}
		Returns struct {
			Certificate iam.Certificate
			Error       error
		}
	}
}

func (*CertificateDescriber) Describe

func (c *CertificateDescriber) Describe(certificateName string) (iam.Certificate, error)

type CertificateManager

type CertificateManager struct {
	CreateCall struct {
		CallCount int
		Receives  struct {
			Certificate     string
			PrivateKey      string
			Chain           string
			CertificateName string
		}
		Returns struct {
			Error error
		}
	}

	DeleteCall struct {
		CallCount int
		Receives  struct {
			CertificateName string
		}
		Returns struct {
			Error error
		}
	}

	DescribeCall struct {
		CallCount int
		Stub      func(string) (iam.Certificate, error)
		Receives  struct {
			CertificateName string
		}
		Returns struct {
			Certificate iam.Certificate
			Error       error
		}
	}
}

func (*CertificateManager) Create

func (c *CertificateManager) Create(certificate, privatekey, chain, certificateName string) error

func (*CertificateManager) Delete

func (c *CertificateManager) Delete(certificateName string) error

func (*CertificateManager) Describe

func (c *CertificateManager) Describe(certificateName string) (iam.Certificate, error)

type CertificateUploader

type CertificateUploader struct {
	UploadCall struct {
		CallCount int
		Receives  struct {
			CertificatePath string
			PrivateKeyPath  string
			ChainPath       string
			CertificateName string
		}
		Returns struct {
			Error error
		}
	}
}

func (*CertificateUploader) Upload

func (c *CertificateUploader) Upload(certificatePath, privateKeyPath, chainPath, certificateName string) error

type CertificateValidator

type CertificateValidator struct {
	ValidateCall struct {
		Returns struct {
			Error error
		}
		Receives struct {
			Command         string
			CertificatePath string
			KeyPath         string
			ChainPath       string
		}
	}
}

func (*CertificateValidator) Validate

func (c *CertificateValidator) Validate(command, certificatePath, keyPath, chainPath string) error

type CertstrapPKIX

type CertstrapPKIX struct {
	CreateCertificateAuthorityCall struct {
		CallCount int
		Receives  struct {
			Key                *certstrappkix.Key
			OrganizationalUnit string
			Years              int
			Organization       string
			Country            string
			Province           string
			Locality           string
			CommonName         string
		}
		Returns struct {
			Certificate *certstrappkix.Certificate
			Error       error
		}
	}

	CreateCertificateSigningRequestCall struct {
		CallCount int
		Receives  struct {
			Key                *certstrappkix.Key
			OrganizationalUnit string
			Years              int
			Organization       string
			Country            string
			Province           string
			Locality           string
			CommonName         string
			IpList             []net.IP
			DomainList         []string
		}
		Returns struct {
			CertificateSigningRequest *certstrappkix.CertificateSigningRequest
			Error                     error
		}
	}

	CreateCertificateHostCall struct {
		CallCount int
		Receives  struct {
			CrtAuth *certstrappkix.Certificate
			KeyAuth *certstrappkix.Key
			Csr     *certstrappkix.CertificateSigningRequest
			Years   int
		}
		Returns struct {
			Certificate *certstrappkix.Certificate
			Error       error
		}
	}
}

func (*CertstrapPKIX) CreateCertificateAuthority

func (c *CertstrapPKIX) CreateCertificateAuthority(key *certstrappkix.Key, organizationalUnit string, years int, organization string, country string, province string, locality string, commonName string) (*certstrappkix.Certificate, error)

func (*CertstrapPKIX) CreateCertificateHost

func (*CertstrapPKIX) CreateCertificateSigningRequest

func (c *CertstrapPKIX) CreateCertificateSigningRequest(key *certstrappkix.Key, organizationalUnit string, ipList []net.IP, domainList []string, organization string, country string, province string, locality string, commonName string) (*certstrappkix.CertificateSigningRequest, error)

type ClientProvider

type ClientProvider struct {
	SetConfigCall struct {
		CallCount int
		Receives  struct {
			Config aws.Config
		}
	}
	GetEC2ClientCall struct {
		CallCount int
		Returns   struct {
			EC2Client ec2.Client
		}
	}
	GetCloudFormationClientCall struct {
		CallCount int
		Returns   struct {
			CloudFormationClient cloudformation.Client
		}
	}
	GetIAMClientCall struct {
		CallCount int
		Returns   struct {
			IAMClient iam.Client
		}
	}
}

func (*ClientProvider) GetCloudFormationClient

func (c *ClientProvider) GetCloudFormationClient() cloudformation.Client

func (*ClientProvider) GetEC2Client

func (c *ClientProvider) GetEC2Client() ec2.Client

func (*ClientProvider) GetIAMClient

func (c *ClientProvider) GetIAMClient() iam.Client

func (*ClientProvider) SetConfig

func (c *ClientProvider) SetConfig(config aws.Config)

type CloudConfigGenerator

type CloudConfigGenerator struct {
	GenerateCall struct {
		Receives struct {
			CloudConfigInput bosh.CloudConfigInput
		}
		Returns struct {
			CloudConfig bosh.CloudConfig
			Error       error
		}
		CallCount int
	}
}

func (*CloudConfigGenerator) Generate

func (c *CloudConfigGenerator) Generate(cloudConfigInput bosh.CloudConfigInput) (bosh.CloudConfig, error)

type CloudConfigManager

type CloudConfigManager struct {
	UpdateCall struct {
		Receives struct {
			CloudConfigInput bosh.CloudConfigInput
			BOSHClient       bosh.Client
		}
		Returns struct {
			Error error
		}
	}
}

func (*CloudConfigManager) Update

func (c *CloudConfigManager) Update(cloudConfigInput bosh.CloudConfigInput, boshClient bosh.Client) error

type CloudFormationClient

type CloudFormationClient struct {
	CreateStackCall struct {
		Receives struct {
			Input *cloudformation.CreateStackInput
		}
		Returns struct {
			Error error
		}
	}

	UpdateStackCall struct {
		CallCount int
		Receives  struct {
			Input *cloudformation.UpdateStackInput
		}
		Returns struct {
			Error error
		}
	}

	DescribeStacksCall struct {
		CallCount int
		Stub      func(*cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error)

		Receives struct {
			Input *cloudformation.DescribeStacksInput
		}
		Returns struct {
			Output *cloudformation.DescribeStacksOutput
			Error  error
		}
	}

	DeleteStackCall struct {
		Receives struct {
			Input *cloudformation.DeleteStackInput
		}
		Returns struct {
			Output *cloudformation.DeleteStackOutput
			Error  error
		}
	}

	DescribeStackResourceCall struct {
		Receives struct {
			Input *cloudformation.DescribeStackResourceInput
		}
		Returns struct {
			Output *cloudformation.DescribeStackResourceOutput
			Error  error
		}
	}
}

func (*CloudFormationClient) CreateStack

func (*CloudFormationClient) DeleteStack

func (*CloudFormationClient) DescribeStacks

func (*CloudFormationClient) UpdateStack

type CloudProviderManifestBuilder

type CloudProviderManifestBuilder struct {
	BuildCall struct {
		Returns struct {
			Error error
		}
	}
}

func (CloudProviderManifestBuilder) Build

type Command

type Command struct {
	ExecuteCall struct {
		CallCount int
		PassState bool
		Receives  struct {
			State           storage.State
			SubcommandFlags []string
		}
		Returns struct {
			Error error
		}
	}
	UsageCall struct {
		CallCount int
		Returns   struct {
			Usage string
		}
	}
}

func (*Command) Execute

func (c *Command) Execute(subcommandFlags []string, state storage.State) error

func (*Command) Usage

func (c *Command) Usage() string

type CommandLineParser

type CommandLineParser struct {
	ParseCall struct {
		Receives struct {
			Arguments []string
		}
		Returns struct {
			CommandLineConfiguration application.CommandLineConfiguration
			Error                    error
		}
	}
}

func (*CommandLineParser) Parse

type CredentialValidator

type CredentialValidator struct {
	ValidateAWSCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
		Receives struct {
			AccessKeyID     string
			SecretAccessKey string
			Region          string
		}
	}
	ValidateGCPCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
		Receives struct {
			ProjectID         string
			ServiceAccountKey string
			Region            string
			Zone              string
		}
	}
}

func (*CredentialValidator) ValidateAWS

func (c *CredentialValidator) ValidateAWS() error

func (*CredentialValidator) ValidateGCP

func (c *CredentialValidator) ValidateGCP() error

type EC2Client

type EC2Client struct {
	ImportKeyPairCall struct {
		Receives struct {
			Input *awsec2.ImportKeyPairInput
		}
		Returns struct {
			Error error
		}
	}

	DescribeKeyPairsCall struct {
		Receives struct {
			Input *awsec2.DescribeKeyPairsInput
		}
		Returns struct {
			Output *awsec2.DescribeKeyPairsOutput
			Error  error
		}
	}

	CreateKeyPairCall struct {
		Receives struct {
			Input *awsec2.CreateKeyPairInput
		}
		Returns struct {
			Output *awsec2.CreateKeyPairOutput
			Error  error
		}
	}

	DescribeAvailabilityZonesCall struct {
		Receives struct {
			Input *awsec2.DescribeAvailabilityZonesInput
		}
		Returns struct {
			Output *awsec2.DescribeAvailabilityZonesOutput
			Error  error
		}
	}

	DeleteKeyPairCall struct {
		Receives struct {
			Input *awsec2.DeleteKeyPairInput
		}
		Returns struct {
			Output *awsec2.DeleteKeyPairOutput
			Error  error
		}
	}

	DescribeInstancesCall struct {
		Receives struct {
			Input *awsec2.DescribeInstancesInput
		}
		Returns struct {
			Output *awsec2.DescribeInstancesOutput
			Error  error
		}
	}
}

func (*EC2Client) CreateKeyPair

func (c *EC2Client) CreateKeyPair(input *awsec2.CreateKeyPairInput) (*awsec2.CreateKeyPairOutput, error)

func (*EC2Client) DeleteKeyPair

func (c *EC2Client) DeleteKeyPair(input *awsec2.DeleteKeyPairInput) (*awsec2.DeleteKeyPairOutput, error)

func (*EC2Client) DescribeInstances

func (*EC2Client) DescribeKeyPairs

func (c *EC2Client) DescribeKeyPairs(input *awsec2.DescribeKeyPairsInput) (*awsec2.DescribeKeyPairsOutput, error)

func (*EC2Client) ImportKeyPair

func (c *EC2Client) ImportKeyPair(input *awsec2.ImportKeyPairInput) (*awsec2.ImportKeyPairOutput, error)

type EnvGetter

type EnvGetter struct {
	Values  map[string]string
	GetCall struct {
		CallCount int
		Receives  struct {
			Name string
		}
	}
}

func (*EnvGetter) Get

func (e *EnvGetter) Get(name string) string

type EnvIDGenerator

type EnvIDGenerator struct {
	GenerateCall struct {
		CallCount int
		Returns   struct {
			EnvID string
			Error error
		}
	}
}

func (*EnvIDGenerator) Generate

func (e *EnvIDGenerator) Generate() (string, error)

type Executable

type Executable struct {
	RunCall struct {
		CallCount int
		Stub      func() error
		Returns   struct {
			Error error
		}
	}
}

func (*Executable) Run

func (e *Executable) Run() error

type GCPClient

type GCPClient struct {
	ProjectIDCall struct {
		CallCount int
		Returns   struct {
			ProjectID string
		}
	}
	GetProjectCall struct {
		CallCount int
		Returns   struct {
			Project *compute.Project
			Error   error
		}
	}
	SetCommonInstanceMetadataCall struct {
		CallCount int
		Receives  struct {
			Metadata *compute.Metadata
		}
		Returns struct {
			Operation *compute.Operation
			Error     error
		}
	}
	ListInstancesCall struct {
		CallCount int
		Returns   struct {
			InstanceList *compute.InstanceList
			Error        error
		}
	}
}

func (*GCPClient) GetProject

func (g *GCPClient) GetProject() (*compute.Project, error)

func (*GCPClient) ListInstances

func (g *GCPClient) ListInstances() (*compute.InstanceList, error)

func (*GCPClient) ProjectID

func (g *GCPClient) ProjectID() string

func (*GCPClient) SetCommonInstanceMetadata

func (g *GCPClient) SetCommonInstanceMetadata(metadata *compute.Metadata) (*compute.Operation, error)

type GCPClientProvider

type GCPClientProvider struct {
	ClientCall struct {
		CallCount int
		Returns   struct {
			Client gcp.Client
		}
	}
	SetConfigCall struct {
		CallCount int
		Receives  struct {
			ServiceAccountKey string
			ProjectID         string
			Zone              string
		}
		Returns struct {
			Error error
		}
	}
}

func (*GCPClientProvider) Client

func (g *GCPClientProvider) Client() gcp.Client

func (*GCPClientProvider) SetConfig

func (g *GCPClientProvider) SetConfig(serviceAccountKey, projectID, zone string) error

type GCPCloudConfigGenerator

type GCPCloudConfigGenerator struct {
	GenerateCall struct {
		Receives struct {
			CloudConfigInput gcp.CloudConfigInput
		}
		Returns struct {
			CloudConfig gcp.CloudConfig
			Error       error
		}
		CallCount int
	}
}

func (*GCPCloudConfigGenerator) Generate

func (g *GCPCloudConfigGenerator) Generate(cloudConfigInput gcp.CloudConfigInput) (gcp.CloudConfig, error)

type GCPCreateLBs

type GCPCreateLBs struct {
	Name        string
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			Config commands.GCPCreateLBsConfig
			State  storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*GCPCreateLBs) Execute

func (u *GCPCreateLBs) Execute(config commands.GCPCreateLBsConfig, state storage.State) error

type GCPKeyPairDeleter

type GCPKeyPairDeleter struct {
	DeleteCall struct {
		CallCount int
		Receives  struct {
			PublicKey string
		}
		Returns struct {
			Error error
		}
	}
}

func (*GCPKeyPairDeleter) Delete

func (g *GCPKeyPairDeleter) Delete(publicKey string) error

type GCPKeyPairUpdater

type GCPKeyPairUpdater struct {
	UpdateCall struct {
		CallCount int
		Returns   struct {
			KeyPair storage.KeyPair
			Error   error
		}
	}
}

func (*GCPKeyPairUpdater) Update

func (g *GCPKeyPairUpdater) Update() (storage.KeyPair, error)

type GCPUp

type GCPUp struct {
	Name        string
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			GCPUpConfig commands.GCPUpConfig
			State       storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*GCPUp) Execute

func (u *GCPUp) Execute(gcpUpConfig commands.GCPUpConfig, state storage.State) error

type GenerateKeyCallReceives

type GenerateKeyCallReceives struct {
	Random io.Reader
	Bits   int
}

type GenerateReturn

type GenerateReturn struct {
	String string
	Error  error
}

type GuidGenerator

type GuidGenerator struct {
	GenerateCall struct {
		Receives struct {
			CallCount int
		}
		Returns struct {
			Output string
			Error  error
		}
	}
}

func (*GuidGenerator) Generate

func (g *GuidGenerator) Generate() (string, error)

type IAMClient

type IAMClient struct {
	UploadServerCertificateCall struct {
		CallCount int
		Receives  struct {
			Input *iam.UploadServerCertificateInput
		}
		Returns struct {
			Output *iam.UploadServerCertificateOutput
			Error  error
		}
	}

	GetServerCertificateCall struct {
		CallCount int
		Receives  struct {
			Input *iam.GetServerCertificateInput
		}
		Returns struct {
			Output *iam.GetServerCertificateOutput
			Error  error
		}
	}

	DeleteServerCertificateCall struct {
		CallCount int
		Receives  struct {
			Input *iam.DeleteServerCertificateInput
		}
		Returns struct {
			Output *iam.DeleteServerCertificateOutput
			Error  error
		}
	}
}

func (*IAMClient) DeleteServerCertificate

func (c *IAMClient) DeleteServerCertificate(input *iam.DeleteServerCertificateInput) (*iam.DeleteServerCertificateOutput, error)

func (*IAMClient) GetServerCertificate

func (c *IAMClient) GetServerCertificate(input *iam.GetServerCertificateInput) (*iam.GetServerCertificateOutput, error)

func (*IAMClient) UploadServerCertificate

func (c *IAMClient) UploadServerCertificate(input *iam.UploadServerCertificateInput) (*iam.UploadServerCertificateOutput, error)

type InfrastructureManager

type InfrastructureManager struct {
	CreateCall struct {
		CallCount int
		Stub      func(string, int, string, string, string) (cloudformation.Stack, error)
		Receives  struct {
			KeyPairName               string
			StackName                 string
			LBType                    string
			LBCertificateARN          string
			NumberOfAvailabilityZones int
			EnvID                     string
		}
		Returns struct {
			Stack cloudformation.Stack
			Error error
		}
	}

	UpdateCall struct {
		CallCount int
		Receives  struct {
			KeyPairName               string
			NumberOfAvailabilityZones int
			StackName                 string
			LBType                    string
			LBCertificateARN          string
			EnvID                     string
		}
		Returns struct {
			Stack cloudformation.Stack
			Error error
		}
	}

	ExistsCall struct {
		Receives struct {
			StackName string
		}
		Returns struct {
			Exists bool
			Error  error
		}
	}

	DeleteCall struct {
		CallCount int
		Receives  struct {
			StackName string
		}
		Returns struct {
			Error error
		}
	}

	DescribeCall struct {
		Receives struct {
			StackName string
		}
		Returns struct {
			Stack cloudformation.Stack
			Error error
		}
	}
}

func (*InfrastructureManager) Create

func (m *InfrastructureManager) Create(keyPairName string, numberOfAZs int, stackName, lbType, lbCertificateARN, envID string) (cloudformation.Stack, error)

func (*InfrastructureManager) Delete

func (m *InfrastructureManager) Delete(stackName string) error

func (*InfrastructureManager) Describe

func (m *InfrastructureManager) Describe(stackName string) (cloudformation.Stack, error)

func (*InfrastructureManager) Exists

func (m *InfrastructureManager) Exists(stackName string) (bool, error)

func (*InfrastructureManager) Update

func (m *InfrastructureManager) Update(keyPairName string, numberOfAZs int, stackName, lbType, lbCertificateARN, envID string) (cloudformation.Stack, error)

type JobsManifestBuilder

type JobsManifestBuilder struct {
	BuildCall struct {
		Returns struct {
			Error error
		}
	}
}

func (JobsManifestBuilder) Build

type KeyPairChecker

type KeyPairChecker struct {
	HasKeyPairCall struct {
		CallCount int
		Stub      func(string) (bool, error)
		Recieves  struct {
			Name string
		}
		Returns struct {
			Present bool
			Error   error
		}
	}
}

func (*KeyPairChecker) HasKeyPair

func (k *KeyPairChecker) HasKeyPair(name string) (bool, error)

type KeyPairCreator

type KeyPairCreator struct {
	CreateCall struct {
		Returns struct {
			KeyPair ec2.KeyPair
			Error   error
		}
		Receives struct {
			KeyPairName string
		}
	}
}

func (*KeyPairCreator) Create

func (k *KeyPairCreator) Create(keyPairName string) (ec2.KeyPair, error)

type KeyPairManager

type KeyPairManager struct {
	SyncCall struct {
		Receives struct {
			KeyPair ec2.KeyPair
		}
		Returns struct {
			KeyPair ec2.KeyPair
			Error   error
		}
	}
}

func (*KeyPairManager) Sync

func (k *KeyPairManager) Sync(keyPair ec2.KeyPair) (ec2.KeyPair, error)

type KeyPairSynchronizer

type KeyPairSynchronizer struct {
	SyncCall struct {
		Receives struct {
			KeyPair ec2.KeyPair
		}
		Returns struct {
			KeyPair ec2.KeyPair
			Error   error
		}
	}
}

func (*KeyPairSynchronizer) Sync

func (s *KeyPairSynchronizer) Sync(keyPair ec2.KeyPair) (ec2.KeyPair, error)

type KeyPairValidator

type KeyPairValidator struct {
	ValidateCall struct {
		CallCount int
		Receives  struct {
			PEMData []byte
		}
		Returns struct {
			Error error
		}
	}
}

func (*KeyPairValidator) Validate

func (v *KeyPairValidator) Validate(pemData []byte) error

type KeyPairVerifier

type KeyPairVerifier struct {
	VerifyCall struct {
		Receives struct {
			Fingerprint string
			PEMData     []byte
		}
		Returns struct {
			Error error
		}
	}
}

func (*KeyPairVerifier) Verify

func (v *KeyPairVerifier) Verify(fingerprint string, pemData []byte) error

type Logger

type Logger struct {
	StepCall struct {
		CallCount int
		Receives  struct {
			Message   string
			Arguments []interface{}
		}
		Messages []string
	}

	DotCall struct {
		CallCount int
	}

	PrintlnCall struct {
		CallCount int
		Stub      func(string)
		Receives  struct {
			Message string
		}
	}

	PromptCall struct {
		CallCount int
		Receives  struct {
			Message string
		}
	}
}

func (*Logger) Dot

func (l *Logger) Dot()

func (*Logger) Println

func (l *Logger) Println(message string)

func (*Logger) Prompt

func (l *Logger) Prompt(message string)

func (*Logger) Step

func (l *Logger) Step(message string, a ...interface{})

type NetworkInstancesChecker

type NetworkInstancesChecker struct {
	ValidateSafeToDeleteCall struct {
		Returns struct {
			Error error
		}
		Receives struct {
			NetworkName string
		}
	}
}

func (*NetworkInstancesChecker) ValidateSafeToDelete

func (n *NetworkInstancesChecker) ValidateSafeToDelete(networkName string) error

type PrivateKeyGenerator

type PrivateKeyGenerator struct {
	GenerateKeyCall struct {
		Stub      func() (*rsa.PrivateKey, error)
		CallCount int
		Receives  []GenerateKeyCallReceives
		Returns   struct {
			PrivateKey *rsa.PrivateKey
			Error      error
		}
	}
}

func (*PrivateKeyGenerator) GenerateKey

func (k *PrivateKeyGenerator) GenerateKey(random io.Reader, bits int) (*rsa.PrivateKey, error)

type Reader

type Reader struct {
	ReadCall struct {
		Returns struct {
			Error error
		}
	}
}

func (*Reader) Read

func (r *Reader) Read([]byte) (int, error)

type SSLKeyPairGenerator

type SSLKeyPairGenerator struct {
	GenerateCall struct {
		CallCount int

		Returns struct {
			KeyPair ssl.KeyPair
			Error   error
		}

		Receives struct {
			CACommonName   string
			CertCommonName string
		}
	}
}

func (*SSLKeyPairGenerator) Generate

func (c *SSLKeyPairGenerator) Generate(caCommonName, certCommonName string) (ssl.KeyPair, error)

type SetCallReturn

type SetCallReturn struct {
	Error error
}

type StackManager

type StackManager struct {
	DescribeCall struct {
		Receives struct {
			StackName string
		}
		Returns struct {
			Stack cloudformation.Stack
			Error error
		}
		Stub func(string) (cloudformation.Stack, error)
	}

	CreateOrUpdateCall struct {
		Receives struct {
			StackName string
			Template  templates.Template
			Tags      cloudformation.Tags
		}
		Returns struct {
			Error error
		}
	}

	UpdateCall struct {
		Receives struct {
			StackName string
			Template  templates.Template
			Tags      cloudformation.Tags
		}
		Returns struct {
			Error error
		}
	}

	WaitForCompletionCall struct {
		Receives struct {
			StackName     string
			SleepInterval time.Duration
			Action        string
		}
		Returns struct {
			Error error
		}
	}

	DeleteCall struct {
		Receives struct {
			StackName string
		}
		Returns struct {
			Error error
		}
	}

	GetPhysicalIDForResourceCall struct {
		Receives struct {
			StackName         string
			LogicalResourceID string
		}
		Returns struct {
			PhysicalResourceID string
			Error              error
		}
	}
}

func (*StackManager) CreateOrUpdate

func (m *StackManager) CreateOrUpdate(stackName string, template templates.Template, tags cloudformation.Tags) error

func (*StackManager) Delete

func (m *StackManager) Delete(stackName string) error

func (*StackManager) Describe

func (m *StackManager) Describe(stackName string) (cloudformation.Stack, error)

func (*StackManager) GetPhysicalIDForResource

func (m *StackManager) GetPhysicalIDForResource(stackName string, logicalResourceID string) (string, error)

func (*StackManager) Update

func (m *StackManager) Update(stackName string, template templates.Template, tags cloudformation.Tags) error

func (*StackManager) WaitForCompletion

func (m *StackManager) WaitForCompletion(stackName string, sleepInterval time.Duration, action string) error

type StateStore

type StateStore struct {
	SetCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns []SetCallReturn
	}

	GetCall struct {
		CallCount int
		Receives  struct {
			Dir string
		}
		Returns struct {
			State storage.State
			Error error
		}
	}
}

func (*StateStore) Set

func (s *StateStore) Set(state storage.State) error

type StateValidator added in v1.2.1

type StateValidator struct {
	ValidateCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}
}

func (*StateValidator) Validate added in v1.2.1

func (s *StateValidator) Validate() error

type StringGenerator

type StringGenerator struct {
	GenerateCall struct {
		Receives struct {
			Prefixes []string
			Lengths  []int
		}
		Returns struct {
			String string
			Error  error
		}
		Stub      func(string, int) (string, error)
		CallCount int
	}
}

func (*StringGenerator) Generate

func (s *StringGenerator) Generate(prefix string, length int) (string, error)

type TemplateBuilder

type TemplateBuilder struct {
	BuildCall struct {
		Receives struct {
			KeyPairName      string
			NumberOfAZs      int
			LBType           string
			LBCertificateARN string
			IAMUserName      string
			EnvID            string
		}
		Returns struct {
			Template templates.Template
		}
	}
}

func (*TemplateBuilder) Build

func (b *TemplateBuilder) Build(keyPairName string, numberOfAvailabilityZones int, lbType string, lbCertificateARN string, iamUserName string, envID string) templates.Template

type TerraformCmd

type TerraformCmd struct {
	RunCall struct {
		Stub    func(stdout io.Writer)
		Returns struct {
			Error error
		}
		Receives struct {
			Stdout           io.Writer
			WorkingDirectory string
			Args             []string
		}
	}
}

func (*TerraformCmd) Run

func (t *TerraformCmd) Run(stdout io.Writer, workingDirectory string, args []string) error

type TerraformExecutor

type TerraformExecutor struct {
	ApplyCall struct {
		CallCount int
		Receives  struct {
			Credentials string
			EnvID       string
			ProjectID   string
			Zone        string
			Region      string
			Template    string
			TFState     string
		}
		Returns struct {
			TFState string
			Error   error
		}
	}
	DestroyCall struct {
		CallCount int
		Receives  struct {
			Credentials string
			EnvID       string
			ProjectID   string
			Zone        string
			Region      string
			Template    string
			TFState     string
		}
		Returns struct {
			TFState string
			Error   error
		}
	}
}

func (*TerraformExecutor) Apply

func (t *TerraformExecutor) Apply(credentials, envID, projectID, zone, region, template, tfState string) (string, error)

func (*TerraformExecutor) Destroy

func (t *TerraformExecutor) Destroy(credentials, envID, projectID, zone, region, template, tfState string) (string, error)

type TerraformOutputter

type TerraformOutputter struct {
	GetCall struct {
		Stub      func(string) (string, error)
		CallCount int
		Receives  struct {
			TFState    string
			OutputName string
		}
		Returns struct {
			Output string
			Error  error
		}
	}
}

func (*TerraformOutputter) Get

func (t *TerraformOutputter) Get(tfState, outputName string) (string, error)

type UUIDGenerator

type UUIDGenerator struct {
	GenerateCall struct {
		Returns   []GenerateReturn
		CallCount int
	}
}

func (*UUIDGenerator) Generate

func (u *UUIDGenerator) Generate() (string, error)

type Usage

type Usage struct {
	PrintCall struct {
		CallCount int
	}

	PrintCommandUsageCall struct {
		CallCount int
		Receives  struct {
			Command string
			Message string
		}
	}
}

func (*Usage) Print

func (u *Usage) Print()

func (*Usage) PrintCommandUsage

func (u *Usage) PrintCommandUsage(command, message string)

type VPCStatusChecker

type VPCStatusChecker struct {
	ValidateSafeToDeleteCall struct {
		CallCount int
		Receives  struct {
			VPCID string
		}
		Returns struct {
			Error error
		}
	}
}

func (*VPCStatusChecker) ValidateSafeToDelete

func (v *VPCStatusChecker) ValidateSafeToDelete(vpcID string) error

type Zones

type Zones struct {
	GetCall struct {
		CallCount int
		Receives  struct {
			Region string
		}
		Returns struct {
			Zones []string
		}
	}
}

func (*Zones) Get

func (z *Zones) Get(region string) []string

Jump to

Keyboard shortcuts

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