Documentation
¶
Index ¶
- Constants
- Variables
- func AWSChunkedEncodedLength(decodedLength int64, chunkSize int, algorithm Algorithm) (int64, error)
- func Checksum(p []byte, algorithm Algorithm) (string, error)
- func IsAWSChunked(headers http.Header) bool
- func S3TrailerHeaders(options S3TrailerHeadersOptions) (http.Header, int64, error)
- type AWSChunkedDecoder
- type AWSChunkedDecoderOptions
- type AWSChunkedEncoder
- type AWSChunkedEncoderOptions
- type Algorithm
- type AlgorithmBenchmark
- type BestAlgorithmOptions
- type S3TrailerHeadersOptions
- type State
Constants ¶
View Source
const ( DefaultChunkSize = 64 * 1024 ChecksumAlgorithmCRC32 Algorithm = "CRC32" ChecksumAlgorithmCRC32C Algorithm = "CRC32C" ContentEncodingAWSChunked = "aws-chunked" ContentSHA256StreamingUnsignedTrailer = "STREAMING-UNSIGNED-PAYLOAD-TRAILER" )
Variables ¶
View Source
var ( ErrUnsupportedAlgorithm = errors.New("uploadchecksum: unsupported checksum algorithm") ErrChecksumMismatch = errors.New("uploadchecksum: checksum mismatch") ErrMissingChecksum = errors.New("uploadchecksum: missing checksum trailer") ErrMalformedAWSChunked = errors.New("uploadchecksum: malformed aws-chunked body") )
Functions ¶
func AWSChunkedEncodedLength ¶
func IsAWSChunked ¶
func S3TrailerHeaders ¶
func S3TrailerHeaders(options S3TrailerHeadersOptions) (http.Header, int64, error)
Types ¶
type AWSChunkedDecoder ¶
type AWSChunkedDecoder struct {
// contains filtered or unexported fields
}
func NewAWSChunkedDecoder ¶
func NewAWSChunkedDecoder(source io.Reader, options AWSChunkedDecoderOptions) (*AWSChunkedDecoder, error)
func (*AWSChunkedDecoder) TrailerValue ¶
func (d *AWSChunkedDecoder) TrailerValue() string
func (*AWSChunkedDecoder) Verify ¶
func (d *AWSChunkedDecoder) Verify() error
type AWSChunkedDecoderOptions ¶
type AWSChunkedDecoderOptions struct {
Algorithm Algorithm
}
type AWSChunkedEncoder ¶
type AWSChunkedEncoder struct {
// contains filtered or unexported fields
}
func NewAWSChunkedEncoder ¶
func NewAWSChunkedEncoder(source io.Reader, options AWSChunkedEncoderOptions) (*AWSChunkedEncoder, error)
type Algorithm ¶
type Algorithm string
func BestAlgorithmForPlatform ¶
func BestAlgorithmForPlatform() Algorithm
func SelectBestAlgorithm ¶
func SelectBestAlgorithm(options BestAlgorithmOptions) (Algorithm, error)
func SupportedS3Algorithms ¶
func SupportedS3Algorithms() []Algorithm
func (Algorithm) OrBestForPlatform ¶
func (Algorithm) TrailerHeader ¶
type AlgorithmBenchmark ¶
func BenchmarkAlgorithms ¶
func BenchmarkAlgorithms(options BestAlgorithmOptions) ([]AlgorithmBenchmark, error)
type BestAlgorithmOptions ¶
type S3TrailerHeadersOptions ¶
Click to show internal directories.
Click to hide internal directories.