File: fixture.go

package info (click to toggle)
golang-github-aws-aws-sdk-go 1.44.133-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 245,296 kB
  • sloc: makefile: 120
file content (27 lines) | stat: -rw-r--r-- 883 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package s3crypto

import "fmt"

type clientVersion int

const (
	v1ClientVersion clientVersion = 1 + iota
	v2ClientVersion
)

var errDeprecatedIncompatibleCipherBuilder = fmt.Errorf("attempted to use deprecated or incompatible cipher builder")

// compatibleEncryptionFixture is an unexported interface to expose whether a given fixture is compatible for encryption
// given the provided client version.
type compatibleEncryptionFixture interface {
	isEncryptionVersionCompatible(clientVersion) error
}

// awsFixture is an unexported interface to expose whether a given fixture is an aws provided fixture, and whether that
// fixtures dependencies were constructed using aws types.
//
// This interface is used in v2 clients to warn users if they are using custom implementations of ContentCipherBuilder
// or CipherDataGenerator.
type awsFixture interface {
	isAWSFixture() bool
}