setters

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package sub substitutes strings in fields

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSetter

type CreateSetter struct {
	// customFieldSetter is the marker to set
	SetPartialField customFieldSetter

	// ResourceMeta defines the Resource to set the marker on
	ResourceMeta yaml.ResourceMeta
}

CreateSetter creates a custom setter as an OpenAPI property through a comment

func (*CreateSetter) Filter

func (s *CreateSetter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error)

type LookupSetters

type LookupSetters struct {
	// Name is the name of the setter to match.  Optional.
	Name string

	// SetterCounts is populated by Filter and contains the count of fields matching each setter.
	SetterCounts []setterCount
}

LookupSetters identifies setters for a collection of Resources

func (*LookupSetters) Filter

func (l *LookupSetters) Filter(input []*yaml.RNode) ([]*yaml.RNode, error)

Filter implements kio.Filter

type PerformSetters

type PerformSetters struct {
	// Name is the name of the setter to perform
	Name string

	// Value is the value to set
	Value string

	// Description, if set will annotate the field with a description.
	Description string

	// SetBy, if set will annotate the field with who set it.
	SetBy string

	// Count is set by Filter and is the number of fields modified.
	Count int
}

PerformSetters sets field values

func (*PerformSetters) Filter

func (s *PerformSetters) Filter(input []*yaml.RNode) ([]*yaml.RNode, error)

Jump to

Keyboard shortcuts

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