Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Algorithm ¶
type Algorithm string
Algorithm - represents valid SSE algorithms supported; currently only AES256 is supported
func (*Algorithm) MarshalXML ¶
MarshalXML - Marshals given SSE algorithm to valid XML
func (*Algorithm) UnmarshalXML ¶
UnmarshalXML - Unmarshals XML tag to valid SSE algorithm
type ApplyOptions ¶
type ApplyOptions struct {
AutoEncrypt bool
}
ApplyOptions ask for specific features to be enabled, when bucketSSEConfig is empty.
type BucketSSEConfig ¶
type BucketSSEConfig struct { XMLNS string `xml:"xmlns,attr,omitempty"` XMLName xml.Name `xml:"ServerSideEncryptionConfiguration"` Rules []Rule `xml:"Rule"` }
BucketSSEConfig - represents default bucket encryption configuration
func ParseBucketSSEConfig ¶
func ParseBucketSSEConfig(r io.Reader) (*BucketSSEConfig, error)
ParseBucketSSEConfig - Decodes given XML to a valid default bucket encryption config
func (*BucketSSEConfig) Algo ¶
func (b *BucketSSEConfig) Algo() Algorithm
Algo returns the SSE algorithm specified by the SSE configuration.
func (*BucketSSEConfig) Apply ¶
func (b *BucketSSEConfig) Apply(headers http.Header, opts ApplyOptions)
Apply applies the SSE bucket configuration on the given HTTP headers and sets the specified SSE headers.
Apply does not overwrite any existing SSE headers. Further, it will set minimal SSE-KMS headers if autoEncrypt is true and the BucketSSEConfig is nil.
func (*BucketSSEConfig) KeyID ¶
func (b *BucketSSEConfig) KeyID() string
KeyID returns the KMS key ID specified by the SSE configuration. If the SSE configuration does not specify SSE-KMS it returns an empty key ID.
type EncryptionAction ¶
type EncryptionAction struct { Algorithm Algorithm `xml:"SSEAlgorithm,omitempty"` MasterKeyID string `xml:"KMSMasterKeyID,omitempty"` }
EncryptionAction - for ApplyServerSideEncryptionByDefault XML tag
type Rule ¶
type Rule struct {
DefaultEncryptionAction EncryptionAction `xml:"ApplyServerSideEncryptionByDefault"`
}
Rule - for ServerSideEncryptionConfiguration XML tag