s3facade

package
v0.0.0-...-a5f7211 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Because AWS SDK has so much ceremony..

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CredentialsFromEnv

func CredentialsFromEnv() (*credentials.Credentials, error)

pretty much same as AWS's credentials.NewEnvCredentials(), except this fails fast instead of when S3 operations are first called

Types

type BucketContext

type BucketContext struct {
	Name *string // pointer because all S3 operations take it as such
	S3   *s3.S3
}

func Bucket

func Bucket(
	bucket string,
	obtainCredentials CredentialsObtainer,
	region string,
) (*BucketContext, error)

giving nil "credentials" is supported, if you want the automatic procedure

func BucketWithConfig

func BucketWithConfig(bucket string, config *aws.Config) (*BucketContext, error)

type CredentialsObtainer

type CredentialsObtainer func() (*credentials.Credentials, error)

this abstraction so we support immediate validation of credentials, unlike AWS's API

func Credentials

func Credentials(creds *credentials.Credentials) CredentialsObtainer

adapter for making from AWS's Credentials

Jump to

Keyboard shortcuts

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