mocks

package
v0.0.0-...-e131cc6 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSELBNotFoundError

func AWSELBNotFoundError() error

AWSELBNotFoundError returns

func AWSProfileNotFoundError

func AWSProfileNotFoundError() error

AWSProfileNotFoundError returns

func AWSTargetGroupNotFoundError

func AWSTargetGroupNotFoundError() error

AWSTargetGroupNotFoundError return

func MakeMockASG

func MakeMockASG(name string, projetName string, configName string, serviceName string, releaseID string) *autoscaling.Group

MakeMockASG returns

func MakeMockASGInstances

func MakeMockASGInstances(healthy int, unhealthy int, terming int) []*autoscaling.Instance

func MakeMockSecurityGroup

func MakeMockSecurityGroup(projectName string, configName string, serviceName string) *ec2.SecurityGroup

MakeMockSecurityGroup returns

Types

type ALBClient

type ALBClient struct {
	aws.ALBAPI
	DescribeTargetGroupsResp map[string]*DescribeTargetGroupsResponse
	DescribeTagsResp         map[string]*DescribeV2TagsResponse
	DescribeTargetHealthResp map[string]*DescribeTargetHealthResponse
}

ALBClient return

func (*ALBClient) AddTargetGroup

func (m *ALBClient) AddTargetGroup(name string, projectName string, configName string, serviceName string)

AddTargetGroup return

func (*ALBClient) DescribeTags

DescribeTags return

func (*ALBClient) DescribeTargetGroups

DescribeTargetGroups return

func (*ALBClient) DescribeTargetHealth

DescribeTargetHealth return

type ASGClient

type ASGClient struct {
	aws.ASGAPI
	DescribeAutoScalingGroupsPageResp []DescribeAutoScalingGroupResponse
	DescribeLaunchConfigurationsResp  map[string]*DescribeLaunchConfigurationsResponse
	DescribePoliciesResp              map[string]*DescribePoliciesResponse
}

ASGClient returns

func (*ASGClient) AddASG

func (m *ASGClient) AddASG(asg *autoscaling.Group)

AddASG returns

func (*ASGClient) AddPreviousRuntimeResources

func (m *ASGClient) AddPreviousRuntimeResources(projectName string, configName string, serviceName string, releaseID string) string

AddPreviousRuntimeResources returns

func (*ASGClient) CreateAutoScalingGroup

CreateAutoScalingGroup returns

func (*ASGClient) CreateLaunchConfiguration

CreateLaunchConfiguration returns

func (*ASGClient) DeleteAutoScalingGroup

DeleteAutoScalingGroup returns

func (*ASGClient) DeleteLaunchConfiguration

DeleteLaunchConfiguration returns

func (*ASGClient) DescribeAutoScalingGroupsPages

func (m *ASGClient) DescribeAutoScalingGroupsPages(input *autoscaling.DescribeAutoScalingGroupsInput, fn func(*autoscaling.DescribeAutoScalingGroupsOutput, bool) bool) error

DescribeAutoScalingGroupsPages returns

func (*ASGClient) DescribeLaunchConfigurations

DescribeLaunchConfigurations returns

func (*ASGClient) DescribePolicies

DescribePolicies returns

func (*ASGClient) PutScalingPolicy

PutScalingPolicy returns

type CWClient

type CWClient struct {
	aws.CWAPI
}

CWClient struct

func (*CWClient) DeleteAlarms

DeleteAlarms returns

func (*CWClient) PutMetricAlarm

PutMetricAlarm returns

type DescribeAutoScalingGroupResponse

type DescribeAutoScalingGroupResponse struct {
	Resp  *autoscaling.DescribeAutoScalingGroupsOutput
	Error error
}

DescribeAutoScalingGroupResponse returns

type DescribeImagesResponse

type DescribeImagesResponse struct {
	Resp  *ec2.DescribeImagesOutput
	Error error
}

DescribeImagesResponse returns

type DescribeInstanceHealthResponse

type DescribeInstanceHealthResponse struct {
	Resp  *elb.DescribeInstanceHealthOutput
	Error error
}

DescribeInstanceHealthResponse returns

type DescribeLaunchConfigurationsResponse

type DescribeLaunchConfigurationsResponse struct {
	Resp  *autoscaling.DescribeLaunchConfigurationsOutput
	Error error
}

DescribeLaunchConfigurationsResponse returns

type DescribeLoadBalancersResponse

type DescribeLoadBalancersResponse struct {
	Resp  *elb.DescribeLoadBalancersOutput
	Error error
}

DescribeLoadBalancersResponse returns

type DescribePoliciesResponse

type DescribePoliciesResponse struct {
	Resp  *autoscaling.DescribePoliciesOutput
	Error error
}

DescribePoliciesResponse returns

type DescribeSecurityGroupsResponse

type DescribeSecurityGroupsResponse struct {
	Resp  *ec2.DescribeSecurityGroupsOutput
	Error error
}

DescribeSecurityGroupsResponse returns

type DescribeSubnetsResponse

type DescribeSubnetsResponse struct {
	Resp  *ec2.DescribeSubnetsOutput
	Error error
}

DescribeSubnetsResponse returns

type DescribeTagsResponse

type DescribeTagsResponse struct {
	Resp  *elb.DescribeTagsOutput
	Error error
}

DescribeTagsResponse returns

type DescribeTargetGroupsResponse

type DescribeTargetGroupsResponse struct {
	Resp  *elbv2.DescribeTargetGroupsOutput
	Error error
}

DescribeTargetGroupsResponse return

type DescribeTargetHealthResponse

type DescribeTargetHealthResponse struct {
	Resp  *elbv2.DescribeTargetHealthOutput
	Error error
}

DescribeTargetHealthResponse return

type DescribeV2TagsResponse

type DescribeV2TagsResponse struct {
	Resp  *elbv2.DescribeTagsOutput
	Error error
}

DescribeV2TagsResponse return

type EC2Client

type EC2Client struct {
	aws.EC2API
	DescribeSecurityGroupsResp map[string]*DescribeSecurityGroupsResponse
	DescribeSubnetsResp        *DescribeSubnetsResponse
	DescribeImagesResp         *DescribeImagesResponse
}

EC2Client returns

func (*EC2Client) AddImage

func (m *EC2Client) AddImage(nameTag string, id string)

AddImage returns

func (*EC2Client) AddSecurityGroup

func (m *EC2Client) AddSecurityGroup(name string, projectName string, configName string, serviceName string, err error)

AddSecurityGroup returns

func (*EC2Client) AddSubnet

func (m *EC2Client) AddSubnet(nameTag string, id string)

AddSubnet returns

func (*EC2Client) DescribeImages

func (m *EC2Client) DescribeImages(in *ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error)

DescribeImages returns

func (*EC2Client) DescribeSecurityGroups

DescribeSecurityGroups returns

func (*EC2Client) DescribeSubnets

func (m *EC2Client) DescribeSubnets(in *ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error)

DescribeSubnets returns

type ELBClient

type ELBClient struct {
	aws.ELBAPI
	DescribeLoadBalancersResp  map[string]*DescribeLoadBalancersResponse
	DescribeTagsResp           map[string]*DescribeTagsResponse
	DescribeInstanceHealthResp map[string]*DescribeInstanceHealthResponse
}

ELBClient returns

func (*ELBClient) AddELB

func (m *ELBClient) AddELB(name string, projectName string, configName string, serviceName string)

AddELB returns

func (*ELBClient) DescribeInstanceHealth

DescribeInstanceHealth returns

func (*ELBClient) DescribeLoadBalancers

DescribeLoadBalancers returns

func (*ELBClient) DescribeTags

func (m *ELBClient) DescribeTags(in *elb.DescribeTagsInput) (*elb.DescribeTagsOutput, error)

DescribeTags returns

type GetInstanceProfileResponse

type GetInstanceProfileResponse struct {
	Resp  *iam.GetInstanceProfileOutput
	Error error
}

GetInstanceProfileResponse returns

type GetRoleResponse

type GetRoleResponse struct {
	Resp  *iam.GetRoleOutput
	Error error
}

GetRoleResponse returns

type IAMClient

type IAMClient struct {
	aws.IAMAPI
	GetInstanceProfileResp map[string]*GetInstanceProfileResponse
	GetRoleResp            map[string]*GetRoleResponse
}

IAMClient returns

func (*IAMClient) AddGetInstanceProfile

func (m *IAMClient) AddGetInstanceProfile(profileName string, path string)

AddGetInstanceProfile returns

func (*IAMClient) AddGetRole

func (m *IAMClient) AddGetRole(roleName string)

AddGetRole returns

func (*IAMClient) GetInstanceProfile

func (m *IAMClient) GetInstanceProfile(in *iam.GetInstanceProfileInput) (*iam.GetInstanceProfileOutput, error)

GetInstanceProfile returns

func (*IAMClient) GetRole

func (m *IAMClient) GetRole(in *iam.GetRoleInput) (*iam.GetRoleOutput, error)

GetRole returns

type MockClients

type MockClients struct {
	S3  *mocks.MockS3Client
	ASG *ASGClient
	ELB *ELBClient
	EC2 *EC2Client
	ALB *ALBClient
	CW  *CWClient
	IAM *IAMClient
	SNS *SNSClient
	SFN *mocks.MockSFNClient
}

MockClients struct

func MockAWS

func MockAWS() *MockClients

MockAWS mock clients

func (*MockClients) ALBClient

func (a *MockClients) ALBClient(*string, *string, *string) aws.ALBAPI

ALBClient returns

func (*MockClients) ASGClient

func (a *MockClients) ASGClient(*string, *string, *string) aws.ASGAPI

ASGClient returns

func (*MockClients) CWClient

func (a *MockClients) CWClient(*string, *string, *string) aws.CWAPI

CWClient returns

func (*MockClients) EC2Client

func (a *MockClients) EC2Client(*string, *string, *string) aws.EC2API

EC2Client returns

func (*MockClients) ELBClient

func (a *MockClients) ELBClient(*string, *string, *string) aws.ELBAPI

ELBClient returns

func (*MockClients) IAMClient

func (a *MockClients) IAMClient(*string, *string, *string) aws.IAMAPI

IAMClient returns

func (*MockClients) S3Client

func (a *MockClients) S3Client(*string, *string, *string) aws.S3API

S3Client returns

func (*MockClients) SFNClient

func (a *MockClients) SFNClient(*string, *string, *string) aws.SFNAPI

SFNClient returns

func (*MockClients) SNSClient

func (a *MockClients) SNSClient(*string, *string, *string) aws.SNSAPI

SNSClient returns

type SNSClient

type SNSClient struct {
	aws.SNSAPI
}

SNSClient returns

func (*SNSClient) GetTopicAttributes

func (m *SNSClient) GetTopicAttributes(in *sns.GetTopicAttributesInput) (*sns.GetTopicAttributesOutput, error)

GetTopicAttributes returns

Jump to

Keyboard shortcuts

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