Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶
type Evaluator interface { // Filter the inputs and return the filtered outputs // // Arguments: // artifacts []*art.Candidate : candidates for processing // // Returns: // []*art.Candidate : matched candidates for next stage // error : common error object if any errors occurred Process(artifacts []*selector.Candidate) ([]*selector.Candidate, error) // Specify what action is performed to the candidates processed by this evaluator Action() string }
Evaluator defines method of executing rule
type Factory ¶
type Factory func(parameters Parameters) Evaluator
Factory defines a factory method for creating rule evaluator
type Metadata ¶
type Metadata struct { // UUID of rule ID int `json:"id"` // Priority of rule when doing calculating Priority int `json:"priority"` // Disabled rule Disabled bool `json:"disabled"` // Action of the rule performs // "retain" Action string `json:"action" valid:"Required"` // Template ID Template string `json:"template" valid:"Required"` // The parameters of this rule Parameters Parameters `json:"params" valid:"Required"` // Selector attached to the rule for filtering tags TagSelectors []*Selector `json:"tag_selectors" valid:"Required"` // Selector attached to the rule for filtering scope (e.g: repositories or namespaces) ScopeSelectors map[string][]*Selector `json:"scope_selectors" valid:"Required"` }
Metadata of the retention rule
type Selector ¶
type Selector struct { // Kind of the selector // "doublestar" or "label" Kind string `json:"kind" valid:"Required;Match(doublestar)"` // Decorated the selector // for "doublestar" : "matching" and "excluding" // for "label" : "with" and "without" Decoration string `json:"decoration" valid:"Required"` // Param for the selector Pattern string `json:"pattern" valid:"Required"` // Extras for other settings Extras string `json:"extras"` }
Selector to narrow down the list
Click to show internal directories.
Click to hide internal directories.