Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallerIdentity ¶
type CallerIdentity struct { sts.GetCallerIdentityOutput Username string }
CallerIdentity holds the relevant output of the GetCallerIdentity function of the AWS SDK for STS
type Client ¶
type Client interface { Config(ctx context.Context) (*aws.Config, error) GetClusterIPs(ctx context.Context, descInstanceAPI DescribeInstancesAPI, username string, filterExp FilterExposure) ([]ClusterIP, error) GetSortedClusterIPs(ctx context.Context, descInstanceAPI DescribeInstancesAPI, username string, filterExp FilterExposure) (SortedClusterIPs, error) GetEc2Client(ctx context.Context, config *aws.Config) (*ec2.Client, error) GetIdentity(ctx context.Context, callerIDAPI GetCallerIdentityAPI) (*CallerIdentity, error) GetStsClient(ctx context.Context, config *aws.Config) (*sts.Client, error) }
Client holds the method signatures for an AWS client.
func NewClient ¶
func NewClient( config ConfigFunc, getClusterIPs GetClusterIPsFunc, getSortedClusterIPsFunc GetSortedClusterIPsFunc, getEc2Client GetEc2ClientFunc, getIdentity GetIdentityFunc, getStsClient GetStsClientFunc, ) Client
NewClient returns a new AWS client with the provided configuration
type ClientGetter ¶
type ClientGetter struct{}
ClientGetter is an interface for getting an BB AWS client.
func (*ClientGetter) GetClient ¶
func (clientGetter *ClientGetter) GetClient() Client
GetClient returns a new AWS client.
type ClusterIP ¶
ClusterIP type
type DescribeInstancesAPI ¶
type DescribeInstancesAPI interface { DescribeInstances( ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options), ) (*ec2.DescribeInstancesOutput, error) }
DescribeInstancesAPI is an interface for the DescribeInstances function of the AWS SDK for EC2
type FilterExposure ¶
type FilterExposure string
FilterExposure type
const ( FilterExposurePublic FilterExposure = "public" FilterExposurePrivate FilterExposure = "private" FilterExposureAll FilterExposure = "all" )
FilterExposure constants
type GetCallerIdentityAPI ¶
type GetCallerIdentityAPI interface { GetCallerIdentity( ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options), ) (*sts.GetCallerIdentityOutput, error) }
GetCallerIdentityAPI is an interface for the GetCallerIdentity function of the AWS SDK for STS
type GetClusterIPsFunc ¶
type GetClusterIPsFunc func(context.Context, DescribeInstancesAPI, string, FilterExposure) ([]ClusterIP, error)
GetClusterIPsFunc type
type GetEc2ClientFunc ¶
GetEc2ClientFunc type
type GetIdentityFunc ¶
type GetIdentityFunc func(context.Context, GetCallerIdentityAPI) (*CallerIdentity, error)
GetIdentityFunc type
type GetSortedClusterIPsFunc ¶
type GetSortedClusterIPsFunc func(context.Context, DescribeInstancesAPI, string, FilterExposure) (SortedClusterIPs, error)
GetSortedClusterIPsFunc type
type GetStsClientFunc ¶
GetStsClientFunc type