Documentation
¶
Index ¶
- func GetAWSCredentials(opts S3ClientOpts) (*credentials.Credentials, error)
- func GetAssumeRoleCredentials(opts S3ClientOpts) (*credentials.Credentials, error)
- func GetCredentials(opts S3ClientOpts) (*credentials.Credentials, error)
- func IsS3ErrCode(err error, code string) bool
- type EncryptOpts
- type S3Client
- type S3ClientOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAWSCredentials ¶
func GetAWSCredentials(opts S3ClientOpts) (*credentials.Credentials, error)
Get AWS credentials based on default order from aws SDK
func GetAssumeRoleCredentials ¶
func GetAssumeRoleCredentials(opts S3ClientOpts) (*credentials.Credentials, error)
GetAssumeRoleCredentials gets Assumed role credentials
func GetCredentials ¶
func GetCredentials(opts S3ClientOpts) (*credentials.Credentials, error)
func IsS3ErrCode ¶
IsS3ErrCode returns if the supplied error is of a specific S3 error code
Types ¶
type EncryptOpts ¶ added in v0.11.0
type S3Client ¶
type S3Client interface {
// PutFile puts a single file to a bucket at the specified key
PutFile(bucket, key, path string) error
// PutDirectory puts a complete directory into a bucket key prefix, with each file in the directory
// a separate key in the bucket.
PutDirectory(bucket, key, path string) error
// GetFile downloads a file to a local file path
GetFile(bucket, key, path string) error
// OpenFile opens a file for much lower disk and memory usage that GetFile
OpenFile(bucket, key string) (io.ReadCloser, error)
Delete(bucket, key string) error
// GetDirectory downloads a directory to a local file path
GetDirectory(bucket, key, path string) error
// ListDirectory list the contents of a directory/bucket
ListDirectory(bucket, keyPrefix string) ([]string, error)
// IsDirectory tests if the key is acting like a s3 directory
IsDirectory(bucket, key string) (bool, error)
// BucketExists returns whether a bucket exists
BucketExists(bucket string) (bool, error)
// MakeBucket creates a bucket with name bucketName and options opts
MakeBucket(bucketName string, opts minio.MakeBucketOptions) error
}
func NewS3Client ¶
func NewS3Client(ctx context.Context, opts S3ClientOpts) (S3Client, error)
NewS3Client instantiates a new S3 client object backed
Click to show internal directories.
Click to hide internal directories.