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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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