fake

package
v0.15.31 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDummy = errors.New("fail")

Functions

func MockCSOutput

func MockCSOutput(stackId string) *cloudformation.CreateStackOutput

func MockDeleteStackOutput

func MockDeleteStackOutput(stackId string) *cloudformation.DeleteStackOutput

func MockDeregisterTargetsOutput

func MockDeregisterTargetsOutput() *elbv2.DeregisterTargetsOutput

func MockDescribeAutoScalingGroupOutput

func MockDescribeAutoScalingGroupOutput(asgs ...map[string]ASGtags) *autoscaling.DescribeAutoScalingGroupsOutput

func MockDescribeInstancesOutput

func MockDescribeInstancesOutput(mockedInstances ...TestInstance) *ec2.DescribeInstancesOutput

func MockDescribeRouteTableOutput

func MockDescribeRouteTableOutput(mockedRouteTables ...TestRouteTable) *ec2.DescribeRouteTablesOutput

func MockDescribeSecurityGroupsOutput

func MockDescribeSecurityGroupsOutput(sgs map[string]string) *ec2.DescribeSecurityGroupsOutput

func MockDescribeSubnetsOutput

func MockDescribeSubnetsOutput(mockedSubnets ...TestSubnet) *ec2.DescribeSubnetsOutput

func MockRTOutput

func MockRTOutput() *elbv2.RegisterTargetsOutput

func MockRollbackStackOutput added in v0.14.39

func MockRollbackStackOutput(stackId string) *cloudformation.RollbackStackOutput

func MockUSOutput

func MockUSOutput(stackId string) *cloudformation.UpdateStackOutput

Types

type ACMClient added in v0.14.24

type ACMClient struct {
	acmiface.ACMAPI
	// contains filtered or unexported fields
}

func NewACMClient added in v0.14.24

func (*ACMClient) GetCertificate added in v0.14.24

func (m *ACMClient) GetCertificate(input *acm.GetCertificateInput) (*acm.GetCertificateOutput, error)

func (*ACMClient) ListCertificatesPages added in v0.14.24

func (m *ACMClient) ListCertificatesPages(input *acm.ListCertificatesInput, fn func(p *acm.ListCertificatesOutput, lastPage bool) (shouldContinue bool)) error

func (*ACMClient) ListTagsForCertificate added in v0.14.32

func (*ACMClient) WithListCertificatesPages added in v0.15.28

func (m *ACMClient) WithListCertificatesPages(f func(input *acm.ListCertificatesInput, fn func(p *acm.ListCertificatesOutput, lastPage bool) (shouldContinue bool)) error) *ACMClient

type APIResponse

type APIResponse struct {
	// contains filtered or unexported fields
}

func MockDescribeInstancesPagesOutput

func MockDescribeInstancesPagesOutput(e error, mockedInstances ...TestInstance) []*APIResponse

func R

func R(r interface{}, e error) *APIResponse

type ASGInputs

type ASGInputs struct {
	AttachLoadBalancerTargetGroups func(*testing.T, *autoscaling.AttachLoadBalancerTargetGroupsInput)
}

type ASGOutputs

type ASGOutputs struct {
	DescribeAutoScalingGroups        *APIResponse
	AttachLoadBalancerTargetGroups   *APIResponse
	DetachLoadBalancerTargetGroups   *APIResponse
	DescribeLoadBalancerTargetGroups *APIResponse
}

type ASGtags

type ASGtags map[string]string

type CFClient

type CFClient struct {
	cloudformationiface.CloudFormationAPI

	Outputs CFOutputs
	// contains filtered or unexported fields
}

func (*CFClient) CleanCreationHistory added in v0.14.31

func (m *CFClient) CleanCreationHistory()

func (*CFClient) CreateStack

func (*CFClient) DeleteStack

func (*CFClient) DescribeStacksPages

func (m *CFClient) DescribeStacksPages(in *cloudformation.DescribeStacksInput, fn func(*cloudformation.DescribeStacksOutput, bool) bool) (err error)

func (*CFClient) GetParamCreationHistory added in v0.14.31

func (m *CFClient) GetParamCreationHistory() [][]*cloudformation.Parameter

func (*CFClient) GetTagCreationHistory added in v0.14.31

func (m *CFClient) GetTagCreationHistory() [][]*cloudformation.Tag

func (*CFClient) GetTemplateCreationHistory added in v0.14.31

func (m *CFClient) GetTemplateCreationHistory() []string

func (*CFClient) RollbackStack added in v0.14.39

func (*CFClient) UpdateStack

type CFOutputs

type CFOutputs struct {
	DescribeStackPages          *APIResponse
	DescribeStacks              *APIResponse
	CreateStack                 *APIResponse
	UpdateStack                 *APIResponse
	DeleteStack                 *APIResponse
	RollbackStack               *APIResponse
	UpdateTerminationProtection *APIResponse
}

type EC2Client

type EC2Client struct {
	ec2iface.EC2API
	Outputs EC2Outputs
}

func (*EC2Client) DescribeInstances

func (*EC2Client) DescribeInstancesPages

func (m *EC2Client) DescribeInstancesPages(params *ec2.DescribeInstancesInput, f func(*ec2.DescribeInstancesOutput, bool) bool) error

func (*EC2Client) DescribeRouteTables

func (*EC2Client) DescribeSecurityGroups

func (*EC2Client) DescribeSubnets

type EC2Outputs

type EC2Outputs struct {
	DescribeSecurityGroups *APIResponse
	DescribeInstances      *APIResponse
	DescribeInstancesPages []*APIResponse
	DescribeSubnets        *APIResponse
	DescribeRouteTables    *APIResponse
}

type ELBv2Client

type ELBv2Client struct {
	elbv2iface.ELBV2API
	Outputs  ELBv2Outputs
	Rtinputs []*elbv2.RegisterTargetsInput
	Dtinputs []*elbv2.DeregisterTargetsInput
}

func (*ELBv2Client) DeregisterTargets

func (*ELBv2Client) DescribeTags

func (m *ELBv2Client) DescribeTags(tags *elbv2.DescribeTagsInput) (*elbv2.DescribeTagsOutput, error)

func (*ELBv2Client) DescribeTargetGroupsPagesWithContext

func (m *ELBv2Client) DescribeTargetGroupsPagesWithContext(ctx aws.Context, in *elbv2.DescribeTargetGroupsInput, f func(resp *elbv2.DescribeTargetGroupsOutput, lastPage bool) bool, opt ...request.Option) error

func (*ELBv2Client) DescribeTargetHealth

func (*ELBv2Client) RegisterTargets

type ELBv2Outputs

type ELBv2Outputs struct {
	RegisterTargets      *APIResponse
	DeregisterTargets    *APIResponse
	DescribeTags         *APIResponse
	DescribeTargetGroups *APIResponse
	DescribeTargetHealth *APIResponse
}

type IAMClient added in v0.14.24

type IAMClient struct {
	iamiface.IAMAPI
	// contains filtered or unexported fields
}

func NewIAMClient added in v0.14.24

func (IAMClient) GetServerCertificate added in v0.14.24

func (IAMClient) ListServerCertificateTags added in v0.14.32

func (m IAMClient) ListServerCertificateTags(
	in *iam.ListServerCertificateTagsInput,
) (*iam.ListServerCertificateTagsOutput, error)

func (IAMClient) ListServerCertificates added in v0.14.24

func (IAMClient) ListServerCertificatesPages added in v0.14.24

func (m IAMClient) ListServerCertificatesPages(input *iam.ListServerCertificatesInput, fn func(*iam.ListServerCertificatesOutput, bool) bool) error

type Tags

type Tags map[string]string

type TestInstance

type TestInstance struct {
	Id        string
	Tags      Tags
	PrivateIp string
	VpcId     string
	State     int64
}

type TestRouteTable

type TestRouteTable struct {
	SubnetID   string
	Main       bool
	GatewayIds []string
}

type TestSubnet

type TestSubnet struct {
	Id   string
	Az   string
	Name string
	Tags map[string]string
}

Jump to

Keyboard shortcuts

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