aws

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAwsComputeDiscovery added in v1.3.13

func NewAwsComputeDiscovery(client *Client, cloudServiceID string) discovery.Discoverer

NewAwsComputeDiscovery constructs a new awsS3Discovery initializing the s3-virtualMachineAPI and isDiscovering with true

func NewAwsStorageDiscovery

func NewAwsStorageDiscovery(client *Client, cloudServiceID string) discovery.Discoverer

NewAwsStorageDiscovery constructs a new awsS3Discovery initializing the s3-api and isDiscovering with true

Types

type Bool

type Bool struct {
	AwsSecureTransport bool `json:"aws:SecureTransport"`
}

type BucketPolicy

type BucketPolicy struct {
	ID        string      `json:"id"`
	Version   string      `json:"Version"`
	Statement []Statement `json:"Statement"`
}

BucketPolicy matches the returned bucket policy in JSON from AWS

type Client

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

Client holds configurations across all services within AWS

func NewClient

func NewClient() (*Client, error)

NewClient constructs a new AwsClient TODO(lebogg): "Overload" (switch) with staticCredentialsProvider

type Condition

type Condition struct {
	Bool
}

type EC2API

type EC2API interface {
	DescribeInstances(ctx context.Context,
		params *ec2.DescribeInstancesInput,
		optFns ...func(options *ec2.Options)) (*ec2.DescribeInstancesOutput, error)

	DescribeVolumes(ctx context.Context,
		params *ec2.DescribeVolumesInput,
		optFns ...func(options *ec2.Options)) (*ec2.DescribeVolumesOutput, error)

	DescribeNetworkInterfaces(ctx context.Context,
		params *ec2.DescribeNetworkInterfacesInput,
		optFns ...func(options *ec2.Options)) (*ec2.DescribeNetworkInterfacesOutput, error)
}

EC2API describes the EC2 api interface which is implemented by the official AWS client and mock clients in tests

type LambdaAPI

type LambdaAPI interface {
	ListFunctions(ctx context.Context,
		params *lambda.ListFunctionsInput, optFns ...func(*lambda.Options)) (*lambda.ListFunctionsOutput, error)
}

LambdaAPI describes the lambda api interface which is implemented by the official AWS client and mock clients in tests

type S3API

type S3API interface {
	ListBuckets(ctx context.Context,
		params *s3.ListBucketsInput,
		optFns ...func(*s3.Options)) (*s3.ListBucketsOutput, error)
	GetBucketEncryption(ctx context.Context,
		params *s3.GetBucketEncryptionInput,
		optFns ...func(*s3.Options)) (*s3.GetBucketEncryptionOutput, error)
	GetBucketPolicy(ctx context.Context,
		params *s3.GetBucketPolicyInput,
		optFns ...func(*s3.Options)) (*s3.GetBucketPolicyOutput, error)
	GetBucketLocation(ctx context.Context,
		params *s3.GetBucketLocationInput,
		optFns ...func(*s3.Options)) (*s3.GetBucketLocationOutput, error)
	GetPublicAccessBlock(ctx context.Context,
		params *s3.GetPublicAccessBlockInput,
		optFns ...func(*s3.Options)) (*s3.GetPublicAccessBlockOutput, error)
	GetBucketReplication(ctx context.Context,
		params *s3.GetBucketReplicationInput,
		optFns ...func(*s3.Options)) (*s3.GetBucketReplicationOutput, error)
	GetBucketLifecycleConfiguration(ctx context.Context,
		params *s3.GetBucketLifecycleConfigurationInput,
		optFns ...func(*s3.Options)) (*s3.GetBucketLifecycleConfigurationOutput, error)
}

S3API describes the S3 api interface which is implemented by the official AWS storageAPI and mock clients in tests

type STSAPI

type STSAPI interface {
	GetCallerIdentity(ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error)
}

STSAPI describes the STS api interface which is implemented by the official AWS client and mock clients in tests

type Statement

type Statement struct {
	Action    interface{} `json:"Action"`
	Effect    string      `json:"Effect"`
	Resource  interface{}
	Condition `json:"Condition"`
}

Jump to

Keyboard shortcuts

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