ilm

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: AGPL-3.0 Imports: 10 Imported by: 1

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
	ExpiryDate     *string
	ExpiryDays     *string
	TransitionDate *string
	TransitionDays *string
	StorageClass   *string

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

LifecycleOptions is structure to encapsulate

func GetLifecycleOptions

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

GetLifecycleOptions create LifeCycleOptions based on cli inputs

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
)

type Table

type Table interface {
	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, filter LsFilter) []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