mocks

package
v0.0.0-...-b1d5767 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient

type AWSClient struct {
	GetLatestNATBoxAMIIDCall struct {
		Returns struct {
			AMIID string
			Error error
		}
	}

	UpsertStackCalls     []UpsertStackCall
	UpsertStackCallCount int

	DeleteStackCalls     []DeleteStackCall
	DeleteStackCallCount int

	WaitForStackCalls     []WaitForStackCall
	WaitForStackCallCount int

	DeleteKeyPairCall struct {
		Receives struct {
			StackName string
		}
		Returns struct {
			Error error
		}
	}
	CreateKeyPairCall struct {
		Receives struct {
			StackName string
		}
		Returns struct {
			KeyPair string
			Error   error
		}
	}
	GetBaseStackResourcesCall struct {
		Receives struct {
			StackName string
		}
		Returns struct {
			Resources awsclient.BaseStackResources
			Error     error
		}
	}

	GetStackResourcesCalls     []GetStackResourcesCall
	GetStackResourcesCallCount int

	CreateAccessKeyCall struct {
		Receives struct {
			UserName string
		}
		Returns struct {
			AccessKey string
			SecretKey string
			Error     error
		}
	}
	DeleteAccessKeyCall struct {
		Receives struct {
			UserName  string
			AccessKey string
		}
		Returns struct {
			Error error
		}
	}
	ListAccessKeysCall struct {
		Receives struct {
			UserName string
		}
		Returns struct {
			AccessKeys []string
			Error      error
		}
	}
}

func (*AWSClient) CreateAccessKey

func (c *AWSClient) CreateAccessKey(userName string) (string, string, error)

func (*AWSClient) CreateKeyPair

func (c *AWSClient) CreateKeyPair(stackName string) (string, error)

func (*AWSClient) DeleteAccessKey

func (c *AWSClient) DeleteAccessKey(userName, accessKeyID string) error

func (*AWSClient) DeleteKeyPair

func (c *AWSClient) DeleteKeyPair(stackName string) error

func (*AWSClient) DeleteStack

func (c *AWSClient) DeleteStack(stackName string) error

func (*AWSClient) GetBaseStackResources

func (c *AWSClient) GetBaseStackResources(stackName string) (awsclient.BaseStackResources, error)

func (*AWSClient) GetLatestNATBoxAMIID

func (c *AWSClient) GetLatestNATBoxAMIID() (string, error)

func (*AWSClient) GetStackResources

func (c *AWSClient) GetStackResources(stackName string) (map[string]string, error)

func (*AWSClient) ListAccessKeys

func (c *AWSClient) ListAccessKeys(userName string) ([]string, error)

func (*AWSClient) UpsertStack

func (c *AWSClient) UpsertStack(stackName string, template string, parameters map[string]string) error

func (*AWSClient) WaitForStack

func (c *AWSClient) WaitForStack(stackName string, pundit awsclient.CloudFormationStatusPundit) error

type BoshIOClient

type BoshIOClient struct {
	LatestStemcellCall struct {
		Receives struct {
			StemcellName string
		}
		Returns struct {
			Artifact director.Artifact
			Error    error
		}
	}

	LatestReleaseCalls     []LatestReleaseCall
	LatestReleaseCallCount int
}

func NewBoshIOClient

func NewBoshIOClient(nReleaseCalls int) *BoshIOClient

func (*BoshIOClient) LatestRelease

func (c *BoshIOClient) LatestRelease(releasePath string) (director.Artifact, error)

func (*BoshIOClient) LatestStemcell

func (c *BoshIOClient) LatestStemcell(stemcellName string) (director.Artifact, error)

type Clock

type Clock struct {
	SleepCalls []SleepCall
}

func (*Clock) Sleep

func (c *Clock) Sleep(duration time.Duration)

type CloudConfigGenerator

type CloudConfigGenerator struct {
	GenerateCall struct {
		Receives struct {
			Resources map[string]string
		}
		Returns struct {
			Bytes []byte
			Error error
		}
	}
}

func (*CloudConfigGenerator) Generate

func (g *CloudConfigGenerator) Generate(resources map[string]string) ([]byte, error)

type CloudFormationClient

type CloudFormationClient struct {
	DescribeStackResourcesCall struct {
		Receives struct {
			Input *cloudformation.DescribeStackResourcesInput
		}
		Returns struct {
			Output *cloudformation.DescribeStackResourcesOutput
			Error  error
		}
	}

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

	CreateStackCall struct {
		Receives struct {
			Input *cloudformation.CreateStackInput
		}
		Returns struct {
			Output *cloudformation.CreateStackOutput
			Error  error
		}
	}

	UpdateStackCall struct {
		Receives struct {
			Input *cloudformation.UpdateStackInput
		}
		Returns struct {
			Output *cloudformation.UpdateStackOutput
			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 CloudFormationClientMultiCall

type CloudFormationClientMultiCall struct {
	DescribeStacksCallCount int
	DescribeStacksCalls     []DescribeStacksCall
}

func NewCloudFormationClientMultiCall

func NewCloudFormationClientMultiCall(callCount int) *CloudFormationClientMultiCall

func (*CloudFormationClientMultiCall) CreateStack

func (*CloudFormationClientMultiCall) DeleteStack

func (*CloudFormationClientMultiCall) DescribeStacks

func (*CloudFormationClientMultiCall) UpdateStack

type CloudFormationStatusPundit

type CloudFormationStatusPundit struct {
	IsHealthyCalls      []PunditCall
	IsHealthyCallCount  int
	IsCompleteCalls     []PunditCall
	IsCompleteCallCount int
}

func NewCloudFormationStatusPundit

func NewCloudFormationStatusPundit(nCalls int) *CloudFormationStatusPundit

func (*CloudFormationStatusPundit) IsComplete

func (p *CloudFormationStatusPundit) IsComplete(statusString string) bool

func (*CloudFormationStatusPundit) IsHealthy

func (p *CloudFormationStatusPundit) IsHealthy(statusString string) bool

type ConfigStore

type ConfigStore struct {
	GetCall struct {
		Receives struct {
			Key string
		}
		Returns struct {
			Value []byte
			Error error
		}
	}

	SetCall struct {
		Receives struct {
			Key   string
			Value []byte
		}
		Returns struct {
			Error error
		}
	}
}

func NewConfigStore

func NewConfigStore() *ConfigStore

func (*ConfigStore) Get

func (s *ConfigStore) Get(key string) ([]byte, error)

func (*ConfigStore) Set

func (s *ConfigStore) Set(key string, value []byte) error

type CredentialsGenerator

type CredentialsGenerator struct {
	FillCallback func(interface{}) error
}

func (*CredentialsGenerator) Fill

func (g *CredentialsGenerator) Fill(toFill interface{}) error

type DeleteStackCall

type DeleteStackCall struct {
	Receives struct {
		StackName string
	}
	Returns struct {
		Error error
	}
}

type DescribeStacksCall

type DescribeStacksCall struct {
	Input  *cloudformation.DescribeStacksInput
	Output *cloudformation.DescribeStacksOutput
	Error  error
}

type DirectorManifestGenerator

type DirectorManifestGenerator struct {
	GenerateCall struct {
		Receives struct {
			Config director.DirectorConfig
		}
		Returns struct {
			Manifest manifests.Manifest
			Error    error
		}
	}
}

func (*DirectorManifestGenerator) Generate

type EC2Client

type EC2Client struct {
	DescribeImagesCall struct {
		Receives struct {
			Input *ec2.DescribeImagesInput
		}
		Returns struct {
			Output *ec2.DescribeImagesOutput
			Error  error
		}
	}
	DescribeSubnetsCall struct {
		Receives struct {
			Input *ec2.DescribeSubnetsInput
		}
		Returns struct {
			Output *ec2.DescribeSubnetsOutput
			Error  error
		}
	}
	CreateKeyPairCall struct {
		Receives struct {
			Input *ec2.CreateKeyPairInput
		}
		Returns struct {
			Output *ec2.CreateKeyPairOutput
			Error  error
		}
	}
	DeleteKeyPairCall struct {
		Receives struct {
			Input *ec2.DeleteKeyPairInput
		}
		Returns struct {
			Output *ec2.DeleteKeyPairOutput
			Error  error
		}
	}
}

func (*EC2Client) CreateKeyPair

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

func (*EC2Client) DeleteKeyPair

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

func (*EC2Client) DescribeImages

func (c *EC2Client) DescribeImages(input *ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error)

func (*EC2Client) DescribeSubnets

func (c *EC2Client) DescribeSubnets(input *ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error)

type FunctionalConfigStore

type FunctionalConfigStore struct {
	Values       map[string][]byte
	Errors       map[string]error
	IsEmptyError error
}

func NewFunctionalConfigStore

func NewFunctionalConfigStore() *FunctionalConfigStore

func (*FunctionalConfigStore) Get

func (s *FunctionalConfigStore) Get(key string) ([]byte, error)

func (*FunctionalConfigStore) IsEmpty

func (s *FunctionalConfigStore) IsEmpty() (bool, error)

func (*FunctionalConfigStore) Set

func (s *FunctionalConfigStore) Set(key string, value []byte) error

type GetStackResourcesCall

type GetStackResourcesCall struct {
	Receives struct {
		StackName string
	}
	Returns struct {
		Resources map[string]string
		Error     error
	}
}

type HTTPClient

type HTTPClient struct {
	GetCall struct {
		Receives struct {
			Path string
		}
		Returns struct {
			Body  []byte
			Error error
		}
	}
}

func (*HTTPClient) Get

func (c *HTTPClient) Get(path string) ([]byte, error)

type IAMClient

type IAMClient struct {
	DeleteUserCall struct {
		Receives struct {
			Input *iam.DeleteUserInput
		}
		Returns struct {
			Output *iam.DeleteUserOutput
			Error  error
		}
	}

	CreateAccessKeyCall struct {
		Receives struct {
			Input *iam.CreateAccessKeyInput
		}
		Returns struct {
			Output *iam.CreateAccessKeyOutput
			Error  error
		}
	}

	DeleteAccessKeyCall struct {
		Receives struct {
			Input *iam.DeleteAccessKeyInput
		}
		Returns struct {
			Output *iam.DeleteAccessKeyOutput
			Error  error
		}
	}

	ListAccessKeysCall struct {
		Receives struct {
			Input *iam.ListAccessKeysInput
		}
		Returns struct {
			Output *iam.ListAccessKeysOutput
			Error  error
		}
	}
}

func (*IAMClient) CreateAccessKey

func (c *IAMClient) CreateAccessKey(input *iam.CreateAccessKeyInput) (*iam.CreateAccessKeyOutput, error)

func (*IAMClient) DeleteAccessKey

func (c *IAMClient) DeleteAccessKey(input *iam.DeleteAccessKeyInput) (*iam.DeleteAccessKeyOutput, error)

func (*IAMClient) DeleteUser

func (c *IAMClient) DeleteUser(input *iam.DeleteUserInput) (*iam.DeleteUserOutput, error)

func (*IAMClient) ListAccessKeys

func (c *IAMClient) ListAccessKeys(input *iam.ListAccessKeysInput) (*iam.ListAccessKeysOutput, error)

type JSONClient

type JSONClient struct {
	GetCall struct {
		Receives struct {
			Path         string
			ResponseData interface{}
		}
		Returns struct {
			Error error
		}

		ResponseJSON string
	}
}

func (*JSONClient) Get

func (c *JSONClient) Get(path string, responseData interface{}) error

type LatestReleaseCall

type LatestReleaseCall struct {
	Receives struct {
		ReleasePath string
	}
	Returns struct {
		Artifact director.Artifact
		Error    error
	}
}

type ManifestBuilder

type ManifestBuilder struct {
	BuildCall struct {
		Receives struct {
			StackName string
			Resources awsclient.BaseStackResources
			AccessKey string
			SecretKey string
		}
		Returns struct {
			ManifestYAML  []byte
			AdminPassword string
			Error         error
		}
	}
}

func (*ManifestBuilder) Build

func (b *ManifestBuilder) Build(stackName string, resources awsclient.BaseStackResources, accessKey, secretKey string) ([]byte, string, error)

type PunditCall

type PunditCall struct {
	Receives struct {
		StatusString string
	}
	Returns struct {
		Result bool
	}
}

type SleepCall

type SleepCall struct {
	Receives struct {
		Duration time.Duration
	}
}

type UpsertStackCall

type UpsertStackCall struct {
	Receives struct {
		StackName  string
		Template   string
		Parameters map[string]string
	}
	Returns struct {
		Error error
	}
}

type WaitForStackCall

type WaitForStackCall struct {
	Receives struct {
		StackName string
		Pundit    awsclient.CloudFormationStatusPundit
	}
	Returns struct {
		Error error
	}
}

Jump to

Keyboard shortcuts

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