Struct: s3crypto.EncryptionClientV2

import "../ibm-cos-sdk-go/service/s3/s3crypto"

Overview

EncryptionClientV2 is an S3 crypto client. By default the SDK will use Authentication mode which will use KMS for key wrapping and AES GCM for content encryption. AES GCM will load all data into memory. However, the rest of the content algorithms do not load the entire contents into memory.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Method Summary collapse

Method Details

func (c *EncryptionClientV2) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error)

PutObject is a wrapper for PutObjectRequest



103
104
105
// File 'service/s3/s3crypto/encryption_client_v2.go', line 103

func (c *EncryptionClientV2) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error) { return putObject(c.options, input) }

func (c *EncryptionClientV2) PutObjectRequest(input *s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput)

PutObjectRequest creates a temp file to encrypt the contents into. It then streams that data to S3.

Example:

req, out := svc.PutObjectRequest(&s3.PutObjectInput { Key: aws.String("testKey"), Bucket: aws.String("testBucket"), Body: strings.NewReader("test data"), }) err := req.Send()


98
99
100
// File 'service/s3/s3crypto/encryption_client_v2.go', line 98

func (c *EncryptionClientV2) PutObjectRequest(input *s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput) { return putObjectRequest(c.options, input) }

func (c *EncryptionClientV2) PutObjectWithContext(ctx aws.Context, input *s3.PutObjectInput, opts ...request.Option) (*s3.PutObjectOutput, error)

PutObjectWithContext is a wrapper for PutObjectRequest with the additional context, and request options support.

PutObjectWithContext is the same as PutObject with the additional support for Context input parameters. The Context must not be nil. A nil Context will cause a panic. Use the Context to add deadlining, timeouts, etc. In the future this may create sub-contexts for individual underlying requests.



114
115
116
// File 'service/s3/s3crypto/encryption_client_v2.go', line 114

func (c *EncryptionClientV2) PutObjectWithContext(ctx aws.Context, input *s3.PutObjectInput, opts ...request.Option) (*s3.PutObjectOutput, error) { return putObjectWithContext(c.options, ctx, input, opts...) }