fakes

package
v4.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClientProvider

type AWSClientProvider 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 (*AWSClientProvider) GetCloudFormationClient

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

func (*AWSClientProvider) GetEC2Client

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

func (*AWSClientProvider) GetIAMClient

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

func (*AWSClientProvider) SetConfig

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

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 AWSDeleteLBs

type AWSDeleteLBs struct {
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}

		Returns struct {
			Error error
		}
	}
}

func (*AWSDeleteLBs) Execute

func (a *AWSDeleteLBs) Execute(state storage.State) error

type AWSLBs

type AWSLBs struct {
	Name        string
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			SubcommandFlags []string
			State           storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*AWSLBs) Execute

func (u *AWSLBs) Execute(subcommandFlags []string, state storage.State) error

type AWSUp

type AWSUp struct {
	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 AWSUpdateLBs

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

func (*AWSUpdateLBs) Execute

func (u *AWSUpdateLBs) Execute(config commands.AWSCreateLBsConfig, 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 AzureClient

type AzureClient struct {
	ValidateCredentialsCall struct {
		CallCount int
		Receives  struct {
			SubscriptionID string
			TenantID       string
			ClientID       string
			ClientSecret   string
		}
		Returns struct {
			Error error
		}
	}
}

func (*AzureClient) ValidateCredentials

func (a *AzureClient) ValidateCredentials(subscriptionID, tenantID, clientID, clientSecret string) error

type AzureUp

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

func (*AzureUp) Execute

func (u *AzureUp) Execute(azureUpConfig commands.AzureUpConfig, state storage.State) error

type BOSHClient

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

	ConfigureHTTPClientCall struct {
		CallCount int
		Receives  struct {
			Socks5Client proxy.Dialer
		}
	}

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

func (*BOSHClient) ConfigureHTTPClient

func (c *BOSHClient) ConfigureHTTPClient(socks5Client proxy.Dialer)

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 {
		CallCount int

		Receives struct {
			Jumpbox          storage.Jumpbox
			DirectorAddress  string
			DirectorUsername string
			DirectorPassword string
			DirectorCACert   string
		}
		Returns struct {
			Client bosh.Client
		}
	}
}

func (*BOSHClientProvider) Client

func (b *BOSHClientProvider) Client(jumpbox storage.Jumpbox, directorAddress, directorUsername, directorPassword, directorCACert string) (bosh.Client, error)

type BOSHCommand

type BOSHCommand struct {
	RunStub func(stdout io.Writer, workingDirectory string, args []string) error
	// contains filtered or unexported fields
}

func (*BOSHCommand) Invocations

func (fake *BOSHCommand) Invocations() map[string][][]interface{}

func (*BOSHCommand) Run

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

func (*BOSHCommand) RunArgsForCall

func (fake *BOSHCommand) RunArgsForCall(i int) (io.Writer, string, []string)

func (*BOSHCommand) RunCallCount

func (fake *BOSHCommand) RunCallCount() int

func (*BOSHCommand) RunReturns

func (fake *BOSHCommand) RunReturns(result1 error)

func (*BOSHCommand) RunReturnsOnCall

func (fake *BOSHCommand) RunReturnsOnCall(i int, result1 error)

type BOSHExecutor

type BOSHExecutor struct {
	CreateEnvCall struct {
		CallCount int
		Receives  struct {
			Input bosh.CreateEnvInput
		}
		Returns struct {
			Output bosh.CreateEnvOutput
			Error  error
		}
	}

	DeleteEnvCall struct {
		CallCount int
		Receives  struct {
			Input bosh.DeleteEnvInput
		}
		Returns struct {
			Error error
		}
	}

	JumpboxInterpolateCall struct {
		CallCount int
		Receives  struct {
			InterpolateInput bosh.InterpolateInput
		}
		Returns struct {
			Output bosh.JumpboxInterpolateOutput
			Error  error
		}
	}

	DirectorInterpolateCall struct {
		CallCount int
		Receives  struct {
			InterpolateInput bosh.InterpolateInput
		}
		Returns struct {
			Output bosh.InterpolateOutput
			Error  error
		}
	}

	VersionCall struct {
		CallCount int
		Returns   struct {
			Version string
			Error   error
		}
	}
}

func (*BOSHExecutor) CreateEnv

func (e *BOSHExecutor) CreateEnv(input bosh.CreateEnvInput) (bosh.CreateEnvOutput, error)

func (*BOSHExecutor) DeleteEnv

func (e *BOSHExecutor) DeleteEnv(input bosh.DeleteEnvInput) error

func (*BOSHExecutor) DirectorInterpolate

func (e *BOSHExecutor) DirectorInterpolate(input bosh.InterpolateInput) (bosh.InterpolateOutput, error)

func (*BOSHExecutor) JumpboxInterpolate

func (e *BOSHExecutor) JumpboxInterpolate(input bosh.InterpolateInput) (bosh.JumpboxInterpolateOutput, error)

func (*BOSHExecutor) Version

func (e *BOSHExecutor) Version() (string, error)

type BOSHManager

type BOSHManager struct {
	CreateJumpboxCall struct {
		CallCount int
		Receives  struct {
			State            storage.State
			TerraformOutputs map[string]interface{}
		}
		Returns struct {
			State storage.State
			Error error
		}
	}
	CreateDirectorCall struct {
		CallCount int
		Receives  struct {
			State            storage.State
			TerraformOutputs map[string]interface{}
		}
		Returns struct {
			State storage.State
			Error error
		}
	}
	VersionCall struct {
		CallCount int
		Returns   struct {
			Version string
			Error   error
		}
	}
	DeleteCall struct {
		CallCount int
		Receives  struct {
			State            storage.State
			TerraformOutputs map[string]interface{}
		}
		Returns struct {
			Error error
		}
	}
	DeleteJumpboxCall struct {
		CallCount int
		Receives  struct {
			State            storage.State
			TerraformOutputs map[string]interface{}
		}
		Returns struct {
			Error error
		}
	}
	GetDeploymentVarsCall struct {
		CallCount int
		Receives  struct {
			State            storage.State
			TerraformOutputs map[string]interface{}
		}
		Returns struct {
			Vars string
		}
	}
	GetJumpboxDeploymentVarsCall struct {
		CallCount int
		Receives  struct {
			State            storage.State
			TerraformOutputs map[string]interface{}
		}
		Returns struct {
			Vars string
		}
	}
}

func (*BOSHManager) CreateDirector

func (b *BOSHManager) CreateDirector(state storage.State, terraformOutputs map[string]interface{}) (storage.State, error)

func (*BOSHManager) CreateJumpbox

func (b *BOSHManager) CreateJumpbox(state storage.State, terraformOutputs map[string]interface{}) (storage.State, error)

func (*BOSHManager) Delete

func (b *BOSHManager) Delete(state storage.State, terraformOutputs map[string]interface{}) error

func (*BOSHManager) DeleteJumpbox

func (b *BOSHManager) DeleteJumpbox(state storage.State, terraformOutputs map[string]interface{}) error

func (*BOSHManager) GetDeploymentVars

func (b *BOSHManager) GetDeploymentVars(state storage.State, terraformOutputs map[string]interface{}) string

func (*BOSHManager) GetJumpboxDeploymentVars

func (b *BOSHManager) GetJumpboxDeploymentVars(state storage.State, terraformOutputs map[string]interface{}) string

func (*BOSHManager) Version

func (b *BOSHManager) Version() (string, error)

type BrokenEnvironmentValidator

type BrokenEnvironmentValidator struct {
	ValidateCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*BrokenEnvironmentValidator) Validate

func (b *BrokenEnvironmentValidator) Validate(state storage.State) error

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 {
		CallCount int
		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 CloudConfigManager

type CloudConfigManager struct {
	UpdateCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			Error error
		}
	}
	GenerateCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			CloudConfig string
			Error       error
		}
	}
}

func (*CloudConfigManager) Generate

func (c *CloudConfigManager) Generate(state storage.State) (string, error)

func (*CloudConfigManager) Update

func (c *CloudConfigManager) Update(state storage.State) error

type CloudConfigOpsGenerator

type CloudConfigOpsGenerator struct {
	GenerateCall struct {
		Receives struct {
			State storage.State
		}
		Returns struct {
			OpsYAML string
			Error   error
		}
	}
}

func (*CloudConfigOpsGenerator) Generate

func (c *CloudConfigOpsGenerator) Generate(state storage.State) (string, 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 Command

type Command struct {
	CheckFastFailsCall struct {
		CallCount int
		Receives  struct {
			State           storage.State
			SubcommandFlags []string
		}
		Returns struct {
			Error error
		}
	}
	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) CheckFastFails

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

func (*Command) Execute

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

func (*Command) Usage

func (c *Command) Usage() string

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
		}
	}

	DescribeVpcsCall struct {
		Receives struct {
			Input *awsec2.DescribeVpcsInput
		}
		Returns struct {
			Output *awsec2.DescribeVpcsOutput
			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) DescribeVpcs

func (c *EC2Client) DescribeVpcs(input *awsec2.DescribeVpcsInput) (*awsec2.DescribeVpcsOutput, 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 EnvIDManager

type EnvIDManager struct {
	SyncCall struct {
		CallCount int
		Receives  struct {
			State storage.State
			Name  string
		}
		Returns struct {
			State storage.State
			Error error
		}
	}
}

func (*EnvIDManager) Sync

func (e *EnvIDManager) Sync(state storage.State, name string) (storage.State, error)

type EnvironmentValidator

type EnvironmentValidator struct {
	ValidateCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*EnvironmentValidator) Validate

func (e *EnvironmentValidator) Validate(state storage.State) 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
		}
	}
	GetZonesCall struct {
		CallCount int
		Receives  struct {
			Region string
		}
		Returns struct {
			Zones []string
			Error error
		}
	}
	GetZoneCall struct {
		CallCount int
		Receives  struct {
			Zone string
		}
		Returns struct {
			Zone  *compute.Zone
			Error error
		}
	}
	GetRegionCall struct {
		CallCount int
		Receives  struct {
			Region string
		}
		Returns struct {
			Region *compute.Region
			Error  error
		}
	}
	GetNetworksCall struct {
		CallCount int
		Receives  struct {
			Name string
		}
		Returns struct {
			NetworkList *compute.NetworkList
			Error       error
		}
	}
}

func (*GCPClient) GetNetworks

func (g *GCPClient) GetNetworks(name string) (*compute.NetworkList, error)

func (*GCPClient) GetProject

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

func (*GCPClient) GetRegion

func (g *GCPClient) GetRegion(region string) (*compute.Region, error)

func (*GCPClient) GetZone

func (g *GCPClient) GetZone(zone string) (*compute.Zone, error)

func (*GCPClient) GetZones

func (g *GCPClient) GetZones(region string) ([]string, 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.GCPClient
		}
	}
	SetConfigCall struct {
		CallCount int
		Receives  struct {
			ServiceAccountKey string
			ProjectID         string
			Region            string
			Zone              string
		}
		Returns struct {
			Error error
		}
	}
}

func (*GCPClientProvider) Client

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

func (*GCPClientProvider) SetConfig

func (g *GCPClientProvider) SetConfig(serviceAccountKey, projectID, region, zone string) 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 GCPDeleteLBs

type GCPDeleteLBs struct {
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}

		Returns struct {
			Error error
		}
	}
}

func (*GCPDeleteLBs) Execute

func (g *GCPDeleteLBs) Execute(state storage.State) error

type GCPLBs

type GCPLBs struct {
	Name        string
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			SubcommandFlags []string
			State           storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*GCPLBs) Execute

func (u *GCPLBs) Execute(subcommandFlags []string, state storage.State) error

type GCPUp

type GCPUp struct {
	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 GCPUpdateLBs

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

func (*GCPUpdateLBs) Execute

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

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 HostKeyGetter

type HostKeyGetter struct {
	GetCall struct {
		CallCount int
		Receives  struct {
			PrivateKey string
			ServerURL  string
		}
		Returns struct {
			HostKey ssh.PublicKey
			Error   error
		}
	}
}

func (*HostKeyGetter) Get

func (h *HostKeyGetter) Get(privateKey, serverURL string) (ssh.PublicKey, 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 Import

type Import struct {
	Addr string
	ID   string
}

type InfrastructureManager

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

	UpdateCall struct {
		CallCount int
		Receives  struct {
			KeyPairName      string
			AZs              []string
			StackName        string
			LBType           string
			LBCertificateARN string
			BOSHAZ           string
			EnvID            string
		}
		Returns struct {
			Stack cloudformation.Stack
			Error error
		}
	}

	ExistsCall struct {
		CallCount int
		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, azs []string, stackName, boshAZ, 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, azs []string, stackName, boshAZ, lbType, lbCertificateARN, envID string) (cloudformation.Stack, error)

type InputGenerator

type InputGenerator struct {
	GenerateCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			Inputs map[string]string
			Error  error
		}
	}
}

func (*InputGenerator) Generate

func (i *InputGenerator) Generate(state storage.State) (map[string]string, error)

type Logger

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

	DotCall struct {
		CallCount int
	}

	PrintfCall struct {
		CallCount int
		Receives  struct {
			Message   string
			Arguments []interface{}
		}
		Messages []string
	}

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

	PromptCall struct {
		CallCount int
		Receives  struct {
			Message string
		}
	}
	// contains filtered or unexported fields
}

func (*Logger) Dot

func (l *Logger) Dot()

func (*Logger) Printf

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

func (*Logger) Println

func (l *Logger) Println(message string)

func (*Logger) PrintlnMessages

func (l *Logger) PrintlnMessages() []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 {
		CallCount int
		Returns   struct {
			Error error
		}
		Receives struct {
			NetworkName string
		}
	}
}

func (*NetworkInstancesChecker) ValidateSafeToDelete

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

type OutputGenerator

type OutputGenerator struct {
	GenerateCall struct {
		CallCount int
		Receives  struct {
			TFState string
		}
		Returns struct {
			Outputs map[string]interface{}
			Error   error
		}
	}
}

func (*OutputGenerator) Generate

func (o *OutputGenerator) Generate(tfState string) (map[string]interface{}, error)

type Reader

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

func (*Reader) Read

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

type SSHKeyDeleter

type SSHKeyDeleter struct {
	DeleteCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			State storage.State
			Error error
		}
	}
}

func (*SSHKeyDeleter) Delete

func (s *SSHKeyDeleter) Delete(state storage.State) (storage.State, error)

type SSHKeyGetter

type SSHKeyGetter struct {
	GetCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			PrivateKey string
			Error      error
		}
	}
}

func (*SSHKeyGetter) Get

func (s *SSHKeyGetter) Get(state storage.State) (string, error)

type SetCallReceive

type SetCallReceive struct {
	State storage.State
}

type SetCallReturn

type SetCallReturn struct {
	Error error
}

type Socks5Client

type Socks5Client struct {
	DialCall struct {
		CallCount int
		Stub      func(network, addr string) (net.Conn, error)
		Receives  struct {
			Network string
			Addr    string
		}
		Returns struct {
			Connection net.Conn
			Error      error
		}
	}
}

func (*Socks5Client) Dial

func (s *Socks5Client) Dial(network, addr string) (net.Conn, error)

type Socks5Proxy

type Socks5Proxy struct {
	StartCall struct {
		CallCount int
		Receives  struct {
			JumpboxPrivateKey  string
			JumpboxExternalURL string
		}
		Returns struct {
			Error error
		}
	}
	AddrCall struct {
		CallCount int
		Returns   struct {
			Addr string
		}
	}
}

func (*Socks5Proxy) Addr

func (s *Socks5Proxy) Addr() string

func (*Socks5Proxy) Start

func (s *Socks5Proxy) Start(jumpboxPrivateKey, jumpboxExternalURL string) error

type StackManager

type StackManager struct {
	DescribeCall struct {
		CallCount int
		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  []SetCallReceive
		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 TemplateBuilder

type TemplateBuilder struct {
	BuildCall struct {
		Receives struct {
			KeyPairName      string
			AZs              []string
			LBType           string
			LBCertificateARN string
			IAMUserName      string
			EnvID            string
			BOSHAZ           string
		}
		Returns struct {
			Template templates.Template
		}
	}
}

func (*TemplateBuilder) Build

func (b *TemplateBuilder) Build(keyPairName string, azs []string, lbType string, lbCertificateARN string, iamUserName string, envID string, boshAZ string) templates.Template

type TemplateGenerator

type TemplateGenerator struct {
	GenerateCall struct {
		CallCount int
		Receives  struct {
			State storage.State
		}
		Returns struct {
			Template string
		}
	}
}

func (*TemplateGenerator) Generate

func (t *TemplateGenerator) Generate(state storage.State) string

type TerraformCmd

type TerraformCmd struct {
	RunCall struct {
		CallCount int
		Stub      func(stdout io.Writer)
		Returns   struct {
			Errors []error
		}
		Initialized bool
		Receives    struct {
			Stdout           io.Writer
			WorkingDirectory string
			Args             []string
			Debug            bool
		}
	}
}

func (*TerraformCmd) Run

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

type TerraformExecutor

type TerraformExecutor struct {
	ApplyCall struct {
		CallCount int
		Receives  struct {
			Inputs   map[string]string
			Template string
			TFState  string
		}
		Returns struct {
			TFState string
			Error   error
		}
	}
	DestroyCall struct {
		CallCount int
		Receives  struct {
			Inputs   map[string]string
			Template string
			TFState  string
		}
		Returns struct {
			TFState string
			Error   error
		}
	}
	ImportCall struct {
		CallCount int
		Receives  struct {
			TFState string
			Imports []Import
			Creds   storage.AWS
		}
		Returns struct {
			TFState string
			Error   error
		}
	}
	VersionCall struct {
		CallCount int
		Returns   struct {
			Version string
			Error   error
		}
	}
	OutputCall struct {
		Stub      func(string) (string, error)
		CallCount int
		Receives  struct {
			TFState    string
			OutputName string
		}
		Returns struct {
			Output string
			Error  error
		}
	}
	OutputsCall struct {
		Stub      func() (map[string]interface{}, error)
		CallCount int
		Receives  struct {
			TFState string
		}
		Returns struct {
			Outputs map[string]interface{}
			Error   error
		}
	}
}

func (*TerraformExecutor) Apply

func (t *TerraformExecutor) Apply(inputs map[string]string, template, tfState string) (string, error)

func (*TerraformExecutor) Destroy

func (t *TerraformExecutor) Destroy(inputs map[string]string, template, tfState string) (string, error)

func (*TerraformExecutor) Import

func (t *TerraformExecutor) Import(addr, id, tfstate string, creds storage.AWS) (string, error)

func (*TerraformExecutor) Output

func (t *TerraformExecutor) Output(tfState, outputName string) (string, error)

func (*TerraformExecutor) Outputs

func (t *TerraformExecutor) Outputs(tfState string) (map[string]interface{}, error)

func (*TerraformExecutor) Version

func (t *TerraformExecutor) Version() (string, error)

type TerraformExecutorError

type TerraformExecutorError struct {
	ErrorCall struct {
		CallCount int
		Returns   string
	}

	TFStateCall struct {
		CallCount int
		Returns   struct {
			TFState string
			Error   error
		}
	}
}

func (*TerraformExecutorError) Error

func (t *TerraformExecutorError) Error() string

func (*TerraformExecutorError) TFState

func (t *TerraformExecutorError) TFState() (string, error)

type TerraformManager

type TerraformManager struct {
	ApplyCall struct {
		CallCount int
		Receives  struct {
			BBLState storage.State
		}
		Returns struct {
			BBLState storage.State
			Error    error
		}
	}
	DestroyCall struct {
		CallCount int
		Receives  struct {
			BBLState storage.State
		}
		Returns struct {
			BBLState storage.State
			Error    error
		}
	}
	ImportCall struct {
		CallCount int
		Receives  struct {
			BBLState storage.State
			Outputs  map[string]string
		}
		Returns struct {
			BBLState storage.State
			Error    error
		}
	}
	GetOutputsCall struct {
		CallCount int
		Receives  struct {
			BBLState storage.State
		}
		Returns struct {
			Outputs map[string]interface{}
			Error   error
		}
	}
	VersionCall struct {
		CallCount int
		Returns   struct {
			Version string
			Error   error
		}
	}
	ValidateVersionCall struct {
		CallCount int
		Returns   struct {
			Error error
		}
	}
}

func (*TerraformManager) Apply

func (t *TerraformManager) Apply(bblState storage.State) (storage.State, error)

func (*TerraformManager) Destroy

func (t *TerraformManager) Destroy(bblState storage.State) (storage.State, error)

func (*TerraformManager) GetOutputs

func (t *TerraformManager) GetOutputs(bblState storage.State) (map[string]interface{}, error)

func (*TerraformManager) Import

func (t *TerraformManager) Import(bblState storage.State, outputs map[string]string) (storage.State, error)

func (*TerraformManager) ValidateVersion

func (t *TerraformManager) ValidateVersion() error

func (*TerraformManager) Version

func (t *TerraformManager) Version() (string, error)

type TerraformManagerError

type TerraformManagerError struct {
	BBLStateCall struct {
		CallCount int
		Returns   struct {
			BBLState storage.State
			Error    error
		}
	}
	ErrorCall struct {
		CallCount int
		Returns   string
	}
}

func (*TerraformManagerError) BBLState

func (t *TerraformManagerError) BBLState() (storage.State, error)

func (*TerraformManagerError) Error

func (t *TerraformManagerError) Error() string

type UUIDGenerator

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

func (*UUIDGenerator) Generate

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

type Up

type Up struct {
	CheckFastFailsCall struct {
		CallCount int
		Receives  struct {
			SubcommandFlags []string
			State           storage.State
		}
		Returns struct {
			Error error
		}
	}
	ExecuteCall struct {
		CallCount int
		Receives  struct {
			Args  []string
			State storage.State
		}
		Returns struct {
			Error error
		}
	}
}

func (*Up) CheckFastFails

func (u *Up) CheckFastFails(subcommandFlags []string, state storage.State) error

func (*Up) Execute

func (u *Up) Execute(args []string, state storage.State) 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
			EnvID string
		}
		Returns struct {
			Error error
		}
	}
}

func (*VPCStatusChecker) ValidateSafeToDelete

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

type Zones

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

func (*Zones) Get

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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