versioning

package
v0.0.0-...-a6a3a47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(format string, a ...interface{}) error

Errorf - formats according to a format specifier and returns the string as a value that satisfies error of type tagging.Error

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is the generic type for any error happening during tag parsing.

func (Error) Error

func (e Error) Error() string

Error 'error' compatible method.

func (Error) Unwrap

func (e Error) Unwrap() error

Unwrap the internal error.

type ExcludedPrefix

type ExcludedPrefix struct {
	Prefix string
}

ExcludedPrefix - holds individual prefixes excluded from being versioned.

type State

type State string

State - enabled/disabled/suspended states for multifactor and status of versioning.

const (
	Enabled State = "Enabled"
	// Disabled  State = "Disabled" only used by MFA Delete not supported yet.
	Suspended State = "Suspended"
)

Various supported states

type Versioning

type Versioning struct {
	XMLNS   string   `xml:"xmlns,attr,omitempty"`
	XMLName xml.Name `xml:"VersioningConfiguration"`
	// MFADelete State    `xml:"MFADelete,omitempty"` // not supported yet.
	Status State `xml:"Status,omitempty"`
	// MinIO extension - allows selective, prefix-level versioning exclusion.
	// Requires versioning to be enabled
	ExcludedPrefixes []ExcludedPrefix `xml:",omitempty"`
	ExcludeFolders   bool             `xml:",omitempty"`
}

Versioning - Configuration for bucket versioning.

func ParseConfig

func ParseConfig(reader io.Reader) (*Versioning, error)

ParseConfig - parses data in given reader to VersioningConfiguration.

func (Versioning) Enabled

func (v Versioning) Enabled() bool

Enabled - returns true if versioning is enabled

func (Versioning) PrefixEnabled

func (v Versioning) PrefixEnabled(prefix string) bool

PrefixEnabled - returns true if versioning is enabled at the bucket and given prefix, false otherwise.

func (Versioning) PrefixSuspended

func (v Versioning) PrefixSuspended(prefix string) bool

PrefixSuspended - returns true if versioning is suspended at the bucket level or suspended on the given prefix.

func (Versioning) PrefixesExcluded

func (v Versioning) PrefixesExcluded() bool

PrefixesExcluded returns true if v contains one or more excluded object prefixes or if ExcludeFolders is true.

func (Versioning) Suspended

func (v Versioning) Suspended() bool

Suspended - returns true if versioning is suspended

func (Versioning) Validate

func (v Versioning) Validate() error

Validate - validates the versioning configuration

func (Versioning) Versioned

func (v Versioning) Versioned(prefix string) bool

Versioned returns if 'prefix' has versioning enabled or suspended.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL