lifecyclepolicy

package
v0.1.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType = string
const (
	ActionTypeExpire ActionType = "expire"
)

type CountType

type CountType = string
const (
	CountTypeSincePackagePushed   CountType = "since-package-pushed"
	CountTypePackageCountMoreThan CountType = "package-count-more-than"
)

type LifecyclePolicy

type LifecyclePolicy struct {
	Rules []struct {
		Description string `yaml:"description" json:"description"`
		Selection   struct {
			TagStatus     string   `yaml:"tag-status" json:"tag-status" jsonschema:"required,enum=untagged,enum=tagged"`
			TagPrefixList []string `yaml:"tag-prefix-list,omitempty" json:"tag-prefix-list,omitempty"`
			CountType     string   `yaml:"count-type" json:"count-type" jsonschema:"required,enum=since-package-pushed,enum=package-count-more-than"`
			CountUnit     string   `yaml:"count-unit,omitempty" json:"count-unit,omitempty"`
			CountValue    int64    `yaml:"count-value" json:"count-value" jsonschema:"required"`
		} `yaml:"selection" json:"selection" jsonschema:"required"`
		Action struct {
			Type string `yaml:"type" json:"type" jsonschema:"required,enum=expire"`
		} `yaml:"action" json:"action" jsonschema:"required"`
	} `yaml:"rules" json:"rules" jsonschema:"required"`
}

func ReadLifecyclePolicy

func ReadLifecyclePolicy(file *os.File) (*LifecyclePolicy, error)

type TagStatus

type TagStatus = string
const (
	TagStatusUntagged TagStatus = "untagged"
	TagStatusTagged   TagStatus = "tagged"
)

Jump to

Keyboard shortcuts

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