Skip to content

Commit

Permalink
versioning: Add support for ExcludedPrefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
krisis committed Apr 28, 2022
1 parent 0836bb8 commit bd3e422
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api-bucket-versioning.go
Expand Up @@ -76,11 +76,19 @@ func (c *Client) SuspendVersioning(ctx context.Context, bucketName string) error
return c.SetBucketVersioning(ctx, bucketName, BucketVersioningConfiguration{Status: "Suspended"})
}

// ExcludedPrefix - holds individual prefixes excluded from being versioned.
type ExcludedPrefix struct {
Prefix string
}

// BucketVersioningConfiguration is the versioning configuration structure
type BucketVersioningConfiguration struct {
XMLName xml.Name `xml:"VersioningConfiguration"`
Status string `xml:"Status"`
MFADelete string `xml:"MfaDelete,omitempty"`
// MinIO extension - allows selective, prefix-level versioning exclusion.
// Requires versioning to be enabled
ExcludedPrefixes []ExcludedPrefix `xml:",omitempty"`
}

// Various supported states
Expand Down

0 comments on commit bd3e422

Please sign in to comment.