ilm

package
v0.0.0-...-308a8ea Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 12 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRuleFields

func ApplyRuleFields(dest *lifecycle.Rule, opts LifecycleOptions) *probe.Error

ApplyRuleFields applies non nil fields of LifcycleOptions to the existing lifecycle rule

func RemoveILMRule

func RemoveILMRule(lfcCfg *lifecycle.Configuration, ilmID string) (*lifecycle.Configuration, *probe.Error)

RemoveILMRule - Remove the ILM rule (with ilmID) from the configuration in XML that is provided.

Types

type LifecycleOptions

type LifecycleOptions struct {
	ID string

	Status *bool

	Prefix                *string
	Tags                  *string
	ObjectSizeLessThan    *int64
	ObjectSizeGreaterThan *int64
	ExpiryDate            *string
	ExpiryDays            *string
	TransitionDate        *string
	TransitionDays        *string
	StorageClass          *string

	ExpiredObjectDeleteMarker               *bool
	NoncurrentVersionExpirationDays         *int
	NewerNoncurrentExpirationVersions       *int
	NoncurrentVersionTransitionDays         *int
	NewerNoncurrentTransitionVersions       *int
	NoncurrentVersionTransitionStorageClass *string
	ExpiredObjectAllversions                *bool
}

LifecycleOptions is structure to encapsulate

func GetLifecycleOptions

func GetLifecycleOptions(ctx *cli.Context) (LifecycleOptions, *probe.Error)

GetLifecycleOptions create LifeCycleOptions based on cli inputs

func (LifecycleOptions) Filter

func (opts LifecycleOptions) Filter() lifecycle.Filter

Filter returns lifecycle.Filter appropriate for opts

func (LifecycleOptions) ToILMRule

func (opts LifecycleOptions) ToILMRule() (lifecycle.Rule, *probe.Error)

ToILMRule creates lifecycle.Configuration based on LifecycleOptions

type LsFilter

type LsFilter uint8

LsFilter enumerates the 3 possible ilm-ls filter options.

const (
	// None - no filter
	None LsFilter = iota
	// ExpiryOnly - filter expiration actions across rules
	ExpiryOnly
	// TransitionOnly - filter transition actions across rules
	TransitionOnly
)

func (LsFilter) Apply

func (f LsFilter) Apply(rules []lifecycle.Rule) []lifecycle.Rule

Apply applies f on rules and filters lifecycle rules matching it

type Table

type Table interface {
	Len() int
	Title() string
	Rows() []table.Row
	ColumnHeaders() table.Row
}

Table interface provides methods when implemented allows a []T to be rendered as a table.

func ToTables

func ToTables(cfg *lifecycle.Configuration) []Table

ToTables converts a lifecycle.Configuration into its tabular representation.

Jump to

Keyboard shortcuts

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