fakes

package
v0.0.0-...-e0d1d7f Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailabilityZoneRetriever

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

func (*AvailabilityZoneRetriever) Retrieve

type BOSHClient

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

func (*BOSHClient) UpdateCloudConfig

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

type BOSHDeleter

type BOSHDeleter struct {
	DeleteCall struct {
		CallCount int
		Receives  struct {
			Input boshinit.DeployInput
		}
		Returns struct {
			Error error
		}
	}
}

func (*BOSHDeleter) Delete

func (d *BOSHDeleter) Delete(boshDeployInput boshinit.DeployInput) 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
		}
		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
			Client bosh.Client
		}
		Returns struct {
			Error error
		}
	}
}

func (*BoshCloudConfigurator) Configure

func (b *BoshCloudConfigurator) Configure(stack cloudformation.Stack, azs []string, client bosh.Client) error

type ClientProvider

type ClientProvider struct {
	CloudFormationClientCall struct {
		Receives struct {
			Config aws.Config
		}
		Returns struct {
			Client cloudformation.Client
			Error  error
		}
	}

	EC2ClientCall struct {
		Receives struct {
			Config aws.Config
		}
		Returns struct {
			Client ec2.Client
			Error  error
		}
	}
}

func (*ClientProvider) CloudFormationClient

func (p *ClientProvider) CloudFormationClient(config aws.Config) (cloudformation.Client, error)

func (*ClientProvider) EC2Client

func (p *ClientProvider) EC2Client(config aws.Config) (ec2.Client, error)

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 CloudFormationClient

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

	UpdateStackCall struct {
		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
		}
	}
}

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 {
			GlobalFlags     commands.GlobalFlags
			State           storage.State
			SubcommandFlags []string
		}
		Returns struct {
			State storage.State
			Error error
		}
	}
}

func (*Command) Execute

func (c *Command) Execute(globalFlags commands.GlobalFlags, subcommandFlags []string, state storage.State) (storage.State, 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 Executable

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

func (*Executable) Run

func (e *Executable) Run() error

type GenerateReturn

type GenerateReturn struct {
	String string
	Error  error
}

type InfrastructureManager

type InfrastructureManager struct {
	CreateCall struct {
		CallCount int
		Receives  struct {
			KeyPairName               string
			StackName                 string
			CloudFormationClient      cloudformation.Client
			NumberOfAvailabilityZones int
		}
		Returns struct {
			Stack cloudformation.Stack
			Error error
		}
	}

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

	DeleteCall struct {
		Receives struct {
			Client    cloudformation.Client
			StackName string
		}
		Returns struct {
			Error error
		}
	}
}

func (*InfrastructureManager) Create

func (m *InfrastructureManager) Create(keyPairName string, numberOfAZs int, stackName string, client cloudformation.Client) (cloudformation.Stack, error)

func (*InfrastructureManager) Delete

func (m *InfrastructureManager) Delete(client cloudformation.Client, stackName string) error

func (*InfrastructureManager) Exists

func (m *InfrastructureManager) Exists(stackName string, client cloudformation.Client) (bool, 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(ec2.Client, string) (bool, error)
		Recieves  struct {
			Name   string
			Client ec2.Client
		}
		Returns struct {
			Present bool
			Error   error
		}
	}
}

func (*KeyPairChecker) HasKeyPair

func (k *KeyPairChecker) HasKeyPair(client ec2.Client, name string) (bool, error)

type KeyPairCreator

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

func (*KeyPairCreator) Create

func (k *KeyPairCreator) Create(client ec2.Client) (ec2.KeyPair, error)

type KeyPairDeleter

type KeyPairDeleter struct {
	DeleteCall struct {
		Receives struct {
			Client ec2.Client
			Name   string
		}
		Returns struct {
			Error error
		}
	}
}

func (*KeyPairDeleter) Delete

func (d *KeyPairDeleter) Delete(client ec2.Client, name string) error

type KeyPairManager

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

func (*KeyPairManager) Sync

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

type KeyPairSynchronizer

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

func (*KeyPairSynchronizer) Sync

func (s *KeyPairSynchronizer) Sync(keyPair ec2.KeyPair, ec2Client ec2.Client) (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
		}
	}

	DotCall struct {
		CallCount int
	}

	PrintlnCall struct {
		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)

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 {
			Name string
		}
	}
}

func (*SSLKeyPairGenerator) Generate

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

type StackManager

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

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

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

	DeleteCall struct {
		Receives struct {
			Client    cloudformation.Client
			StackName string
		}
		Returns struct {
			Error error
		}
	}
}

func (*StackManager) CreateOrUpdate

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

func (*StackManager) Delete

func (m *StackManager) Delete(client cloudformation.Client, stackName string) error

func (*StackManager) Describe

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

func (*StackManager) WaitForCompletion

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

type StateStore

type StateStore struct {
	SetCall struct {
		CallCount int
		Receives  struct {
			Dir   string
			State storage.State
		}
		Returns struct {
			Error error
		}
	}

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

func (*StateStore) Get

func (s *StateStore) Get(dir string) (storage.State, error)

func (*StateStore) Set

func (s *StateStore) Set(dir string, state storage.State) 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
		}
		Returns struct {
			Template templates.Template
		}
	}
}

func (*TemplateBuilder) Build

func (b *TemplateBuilder) Build(keyPairName string, numberOfAvailabilityZones int) templates.Template

type UUIDGenerator

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

func (*UUIDGenerator) Generate

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

type VPCStatusChecker

type VPCStatusChecker struct {
	ValidateSafeToDeleteCall struct {
		Receives struct {
			Client ec2.Client
			VPCID  string
		}
		Returns struct {
			Error error
		}
	}
}

func (*VPCStatusChecker) ValidateSafeToDelete

func (v *VPCStatusChecker) ValidateSafeToDelete(client ec2.Client, vpcID string) error

Jump to

Keyboard shortcuts

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