s3

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBucketInfo

func GetBucketInfo(ctx context.Context, client IS3Client, ich chan<- BucketInfo, bucket types.Bucket, document bool, filters []string) error

Types

type BucketInfo

type BucketInfo struct {
	BucketName     string
	IsAccesible    bool
	Location       string
	PolicyDocument string
}

func ListBucketInfo

func ListBucketInfo(ctx context.Context, client IS3Client, names []string, document bool, filters []string) ([]BucketInfo, error)

type IS3Client

type IS3Client interface {
	ListBuckets(ctx context.Context, params *s3.ListBucketsInput, optFns ...func(*s3.Options)) (*s3.ListBucketsOutput, error)

	GetBucketLocation(ctx context.Context, name *string) (string, bool, error)
	GetBucketPolicyDocument(ctx context.Context, name *string, region string) (string, bool, error)
}

type S3Client

type S3Client struct {
	*s3.Client
}

func NewS3Client

func NewS3Client(cfg *aws.Config) *S3Client

func (*S3Client) GetBucketLocation

func (client *S3Client) GetBucketLocation(ctx context.Context, name *string) (string, bool, error)

func (*S3Client) GetBucketPolicyDocument

func (client *S3Client) GetBucketPolicyDocument(ctx context.Context, name *string, region string) (string, bool, error)

Jump to

Keyboard shortcuts

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