Documentation ¶
Index ¶
- Constants
- type Bucket
- type S3Client
- type S3Source
- func (s *S3Source) Cache() *sdpcache.Cache
- func (s *S3Source) Client() *s3.Client
- func (s *S3Source) Get(ctx context.Context, scope string, query string, ignoreCache bool) (*sdp.Item, error)
- func (s *S3Source) List(ctx context.Context, scope string, ignoreCache bool) ([]*sdp.Item, error)
- func (s *S3Source) Name() string
- func (s *S3Source) Scopes() []string
- func (s *S3Source) Search(ctx context.Context, scope string, query string, ignoreCache bool) ([]*sdp.Item, error)
- func (s *S3Source) Type() string
- func (s *S3Source) Weight() int
Constants ¶
const CacheDuration = 10 * time.Minute
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { // ListBuckets types.Bucket s3.GetBucketAclOutput s3.GetBucketAnalyticsConfigurationOutput s3.GetBucketCorsOutput s3.GetBucketEncryptionOutput s3.GetBucketIntelligentTieringConfigurationOutput s3.GetBucketInventoryConfigurationOutput s3.GetBucketLifecycleConfigurationOutput s3.GetBucketLocationOutput s3.GetBucketLoggingOutput s3.GetBucketMetricsConfigurationOutput s3.GetBucketNotificationConfigurationOutput s3.GetBucketOwnershipControlsOutput s3.GetBucketPolicyOutput s3.GetBucketPolicyStatusOutput s3.GetBucketReplicationOutput s3.GetBucketRequestPaymentOutput s3.GetBucketVersioningOutput s3.GetBucketWebsiteOutput }
Bucket represents an actual s3 bucket, with all of the extra requests resolved and all information added
type S3Client ¶
type S3Client interface { ListBuckets(ctx context.Context, params *s3.ListBucketsInput, optFns ...func(*s3.Options)) (*s3.ListBucketsOutput, error) GetBucketAcl(ctx context.Context, params *s3.GetBucketAclInput, optFns ...func(*s3.Options)) (*s3.GetBucketAclOutput, error) GetBucketAnalyticsConfiguration(ctx context.Context, params *s3.GetBucketAnalyticsConfigurationInput, optFns ...func(*s3.Options)) (*s3.GetBucketAnalyticsConfigurationOutput, error) GetBucketCors(ctx context.Context, params *s3.GetBucketCorsInput, optFns ...func(*s3.Options)) (*s3.GetBucketCorsOutput, error) GetBucketEncryption(ctx context.Context, params *s3.GetBucketEncryptionInput, optFns ...func(*s3.Options)) (*s3.GetBucketEncryptionOutput, error) GetBucketIntelligentTieringConfiguration(ctx context.Context, params *s3.GetBucketIntelligentTieringConfigurationInput, optFns ...func(*s3.Options)) (*s3.GetBucketIntelligentTieringConfigurationOutput, error) GetBucketInventoryConfiguration(ctx context.Context, params *s3.GetBucketInventoryConfigurationInput, optFns ...func(*s3.Options)) (*s3.GetBucketInventoryConfigurationOutput, error) GetBucketLifecycleConfiguration(ctx context.Context, params *s3.GetBucketLifecycleConfigurationInput, optFns ...func(*s3.Options)) (*s3.GetBucketLifecycleConfigurationOutput, error) GetBucketLocation(ctx context.Context, params *s3.GetBucketLocationInput, optFns ...func(*s3.Options)) (*s3.GetBucketLocationOutput, error) GetBucketLogging(ctx context.Context, params *s3.GetBucketLoggingInput, optFns ...func(*s3.Options)) (*s3.GetBucketLoggingOutput, error) GetBucketMetricsConfiguration(ctx context.Context, params *s3.GetBucketMetricsConfigurationInput, optFns ...func(*s3.Options)) (*s3.GetBucketMetricsConfigurationOutput, error) GetBucketNotificationConfiguration(ctx context.Context, params *s3.GetBucketNotificationConfigurationInput, optFns ...func(*s3.Options)) (*s3.GetBucketNotificationConfigurationOutput, error) GetBucketOwnershipControls(ctx context.Context, params *s3.GetBucketOwnershipControlsInput, optFns ...func(*s3.Options)) (*s3.GetBucketOwnershipControlsOutput, error) GetBucketPolicy(ctx context.Context, params *s3.GetBucketPolicyInput, optFns ...func(*s3.Options)) (*s3.GetBucketPolicyOutput, error) GetBucketPolicyStatus(ctx context.Context, params *s3.GetBucketPolicyStatusInput, optFns ...func(*s3.Options)) (*s3.GetBucketPolicyStatusOutput, error) GetBucketReplication(ctx context.Context, params *s3.GetBucketReplicationInput, optFns ...func(*s3.Options)) (*s3.GetBucketReplicationOutput, error) GetBucketRequestPayment(ctx context.Context, params *s3.GetBucketRequestPaymentInput, optFns ...func(*s3.Options)) (*s3.GetBucketRequestPaymentOutput, error) GetBucketTagging(ctx context.Context, params *s3.GetBucketTaggingInput, optFns ...func(*s3.Options)) (*s3.GetBucketTaggingOutput, error) GetBucketVersioning(ctx context.Context, params *s3.GetBucketVersioningInput, optFns ...func(*s3.Options)) (*s3.GetBucketVersioningOutput, error) GetBucketWebsite(ctx context.Context, params *s3.GetBucketWebsiteInput, optFns ...func(*s3.Options)) (*s3.GetBucketWebsiteOutput, error) }
S3Client A client that can get data about S3 buckets
type S3Source ¶
type S3Source struct { CacheDuration time.Duration // How long to cache items for // contains filtered or unexported fields }
func NewS3Source ¶
NewS3Source Creates a new S3 source
func (*S3Source) Get ¶
func (s *S3Source) Get(ctx context.Context, scope string, query string, ignoreCache bool) (*sdp.Item, error)
Get Get a single item with a given scope and query. The item returned should have a UniqueAttributeValue that matches the `query` parameter. The ctx parameter contains a golang context object which should be used to allow this source to timeout or be cancelled when executing potentially long-running actions
func (*S3Source) Scopes ¶
List of scopes that this source is capable of find items for. This will be in the format {accountID} since S3 endpoint is global
func (*S3Source) Search ¶
func (s *S3Source) Search(ctx context.Context, scope string, query string, ignoreCache bool) ([]*sdp.Item, error)
Search Searches for an S3 bucket by ARN rather than name