Documentation ¶
Index ¶
- Variables
- func ExpandPkg(t *testing.T, pkg *Pkg) string
- type FieldPathSetter
- type Kptfile
- type Pkg
- func (p *Pkg) Build(path string) error
- func (p *Pkg) WithFile(name, content string) *Pkg
- func (p *Pkg) WithKptfile(kf ...*Kptfile) *Pkg
- func (p *Pkg) WithResource(resourceName string, mutators ...yaml.Filter) *Pkg
- func (p *Pkg) WithResourceAndSetters(resourceName string, setterRefs []SetterRef, mutators ...yaml.Filter) *Pkg
- func (p *Pkg) WithSubPackages(ps ...*Pkg) *Pkg
- type Setter
- type SetterRef
Constants ¶
This section is empty.
Variables ¶
var ( DeploymentResource = "deployment" ConfigMapResource = "configmap" )
Functions ¶
Types ¶
type FieldPathSetter ¶
FieldPathSetter updates the value of the field given by the path.
func SetFieldPath ¶
func SetFieldPath(value string, path ...string) FieldPathSetter
SetFieldPath returns a new FieldPathSetter that updates the property given by the path with the given value.
type Kptfile ¶
Kptfile represents the Kptfile of a package.
func NewKptfile ¶
func NewKptfile() *Kptfile
func (*Kptfile) WithSetters ¶
WithSetters adds information about the setters for a Kptfile.
func (*Kptfile) WithUpstream ¶
WithUpstream adds information about the upstream information to the Kptfile. The upstream section of the Kptfile is only added if this information is provided.
type Pkg ¶
Pkg represents a package that can be created on the file system by using the Build function
func (*Pkg) Build ¶
Build outputs the current data structure as a set of (nested) package in the provided path.
func (*Pkg) WithKptfile ¶
WithKptfile configures the current package to have a Kptfile. Only zero or one Kptfiles are accepted.
func (*Pkg) WithResource ¶
WithResource configures the package to include the provided resource
func (*Pkg) WithResourceAndSetters ¶
func (p *Pkg) WithResourceAndSetters(resourceName string, setterRefs []SetterRef, mutators ...yaml.Filter) *Pkg
WithResourceAndSetters configures the package to have the provided resource. It also allows for specifying setterRefs for the resource and a set of mutators that will update the content of the resource.
func (*Pkg) WithSubPackages ¶
WithSubPackages adds the provided packages as subpackages to the current package
type Setter ¶
Setter contains the properties required for adding a setter to the Kptfile.
func NewSetSetter ¶
NewSetSetter creates a new setter that is marked as set.
type SetterRef ¶
SetterRef specifies the information for creating a new reference to a setter in a resource.
func NewSetterRef ¶
NewSetterRef creates a new setterRef with the given name and path.