sumlb

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetClient

func SetClient(c Elbv2interface)

Types

type Elbv2interface

type Elbv2interface interface {
	DescribeLoadBalancers(ctx context.Context,
		params *elbv2.DescribeLoadBalancersInput,
		optFns ...func(*elbv2.Options)) (*elbv2.DescribeLoadBalancersOutput, error)
}
var Client Elbv2interface

type Elbv2interfaceMock

type Elbv2interfaceMock struct {
	// DescribeLoadBalancersFunc mocks the DescribeLoadBalancers method.
	DescribeLoadBalancersFunc func(ctx context.Context, params *elasticloadbalancingv2.DescribeLoadBalancersInput, optFns ...func(*elasticloadbalancingv2.Options)) (*elasticloadbalancingv2.DescribeLoadBalancersOutput, error)
	// contains filtered or unexported fields
}

Elbv2interfaceMock is a mock implementation of Elbv2interface.

    func TestSomethingThatUsesElbv2interface(t *testing.T) {

        // make and configure a mocked Elbv2interface
        mockedElbv2interface := &Elbv2interfaceMock{
            DescribeLoadBalancersFunc: func(ctx context.Context, params *elasticloadbalancingv2.DescribeLoadBalancersInput, optFns ...func(*elasticloadbalancingv2.Options)) (*elasticloadbalancingv2.DescribeLoadBalancersOutput, error) {
	               panic("mock out the DescribeLoadBalancers method")
            },
        }

        // use mockedElbv2interface in code that requires Elbv2interface
        // and then make assertions.

    }

func (*Elbv2interfaceMock) DescribeLoadBalancers

DescribeLoadBalancers calls DescribeLoadBalancersFunc.

func (*Elbv2interfaceMock) DescribeLoadBalancersCalls

func (mock *Elbv2interfaceMock) DescribeLoadBalancersCalls() []struct {
	Ctx    context.Context
	Params *elasticloadbalancingv2.DescribeLoadBalancersInput
	OptFns []func(*elasticloadbalancingv2.Options)
}

DescribeLoadBalancersCalls gets all the calls that were made to DescribeLoadBalancers. Check the length with:

len(mockedElbv2interface.DescribeLoadBalancersCalls())

type LBV2Totals

type LBV2Totals struct {
	Application int
	Network     int
	Gateway     int
}

func List

func List(region string, verbose bool) LBV2Totals

Jump to

Keyboard shortcuts

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