Versions in this module Expand all Collapse all v1 v1.0.2 Mar 17, 2021 Changes in this version + const AmzObjectLockBypassRetGovernance + const AmzObjectLockLegalHold + const AmzObjectLockMode + const AmzObjectLockRetainUntilDate + var ErrInvalidRetentionDate = errors.New("date must be provided in ISO 8601 format") + var ErrMalformedBucketObjectConfig = errors.New("invalid bucket object lock config") + var ErrMalformedXML = errors.New(...) + var ErrObjectLockInvalidHeaders = errors.New(...) + var ErrObjectLockMissingContentMD5 = errors.New(...) + var ErrPastObjectLockRetainDate = errors.New("the retain until date must be in the future") + var ErrUnknownWORMModeDirective = errors.New("unknown WORM mode directive") + func FilterObjectLockMetadata(metadata map[string]string, filterRetention, filterLegalHold bool) map[string]string + func IsObjectLockGovernanceBypassSet(h http.Header) bool + func IsObjectLockLegalHoldRequested(h http.Header) bool + func IsObjectLockRequested(h http.Header) bool + func IsObjectLockRetentionRequested(h http.Header) bool + func ParseObjectLockRetentionHeaders(h http.Header) (rmode RetMode, r RetentionDate, err error) + func UTCNowNTP() (time.Time, error) + type Config struct + ObjectLockEnabled string + Rule ... + XMLNS string + XMLName xml.Name + func NewObjectLockConfig() *Config + func ParseObjectLockConfig(reader io.Reader) (*Config, error) + func (config *Config) ToRetention() Retention + func (config *Config) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type DefaultRetention struct + Days *uint64 + Mode RetMode + XMLName xml.Name + Years *uint64 + func (dr *DefaultRetention) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type LegalHoldStatus string + const LegalHoldOff + const LegalHoldOn + func (l LegalHoldStatus) Valid() bool + type ObjectLegalHold struct + Status LegalHoldStatus + XMLNS string + XMLName xml.Name + func GetObjectLegalHoldMeta(meta map[string]string) ObjectLegalHold + func ParseObjectLegalHold(reader io.Reader) (hold *ObjectLegalHold, err error) + func ParseObjectLockLegalHoldHeaders(h http.Header) (lhold ObjectLegalHold, err error) + func (l *ObjectLegalHold) IsEmpty() bool + type ObjectRetention struct + Mode RetMode + RetainUntilDate RetentionDate + XMLNS string + XMLName xml.Name + func GetObjectRetentionMeta(meta map[string]string) ObjectRetention + func ParseObjectRetention(reader io.Reader) (*ObjectRetention, error) + type RetMode string + const RetCompliance + const RetGovernance + func (r RetMode) Valid() bool + type Retention struct + LockEnabled bool + Mode RetMode + Validity time.Duration + func (r Retention) Retain(created time.Time) bool + type RetentionDate struct + func (rDate *RetentionDate) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error + func (rDate *RetentionDate) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error