Documentation ¶
Index ¶
- Constants
- func FindKptfile(nodes []*yaml.RNode) (*kptfilev1.KptFile, error)
- func FindSettersFromKptfile(nodes []*yaml.RNode) (map[string]string, error)
- func VisitElements(rn *yaml.RNode, fn func(node *yaml.RNode, i int) error) error
- type ArraySetter
- type ListSetters
- type Result
- type ScalarSetter
- type WarnSetterDiscovery
Constants ¶
View Source
const ( ArraySetterType string = "array" ScalarSetterDefaultType string = "str" )
View Source
const SetterCommentIdentifier = "# kpt-set: "
Variables ¶
This section is empty.
Functions ¶
func FindKptfile ¶
FindKptfile discovers Kptfile of the root package from slice of nodes
func FindSettersFromKptfile ¶
FindSettersFromKptfile discovers setters from kptfile if exists
Types ¶
type ArraySetter ¶
type ArraySetter struct { // Name is the name of the setter Name string // Values are the values of the field parameterized by the setter Values []string // Count is the number of fields parameterized by the setter Count int }
ArraySetter stores name, values and count of the array setter
type ListSetters ¶
type ListSetters struct { // ScalarSetters holds the discovered scalar setters ScalarSetters map[string]*ScalarSetter // ArraySetters holds the discovered array setters ArraySetters map[string]*ArraySetter // Warnings holds recoverable error info that occurred during setter discovery Warnings []*WarnSetterDiscovery // contains filtered or unexported fields }
ListSetters lists setters identified by the setter comments
func New ¶
func New() ListSetters
func (*ListSetters) GetResults ¶
func (ls *ListSetters) GetResults() []*Result
GetResults returns sorted slice of all listsetter results
type ScalarSetter ¶
type ScalarSetter struct { // Name is the name of the setter Name string // Value is the value of the field parameterized by the setter Value string // Type is the data type for the value Type string // Count is the number of fields parameterized by the setter Count int }
ScalarSetter stores name, value and count of the scalar setter
type WarnSetterDiscovery ¶
type WarnSetterDiscovery struct {
// contains filtered or unexported fields
}
WarnSetterDiscovery represents a recoverable error that occurred during setter discovery
func (*WarnSetterDiscovery) Error ¶
func (e *WarnSetterDiscovery) Error() string
Click to show internal directories.
Click to hide internal directories.