Struct: s3crypto.CryptoReadCloser

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

Overview

CryptoReadCloser handles closing of the body and allowing reads from the decrypted content.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Structure Field Summary collapse

Method Summary collapse

Structure Field Details

Body io.ReadCloser

Decrypter io.Reader

Method Details

func (rc *CryptoReadCloser) Close() error

Close lets the CryptoReadCloser satisfy io.ReadCloser interface



31
32
33
34
// File 'service/s3/s3crypto/cipher.go', line 31

func (rc *CryptoReadCloser) Close() error { rc.isClosed = true return rc.Body.Close() }

func (rc *CryptoReadCloser) Read(b []byte) (int, error)

Read lets the CryptoReadCloser satisfy io.ReadCloser interface



37
38
39
40
41
42
// File 'service/s3/s3crypto/cipher.go', line 37

func (rc *CryptoReadCloser) Read(b []byte) (int, error) { if rc.isClosed { return 0, io.EOF } return rc.Decrypter.Read(b) }