filepatchers

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LinePatchModifierName       string = "line-patch"
	YAMLPathVersionModifierName string = "yaml-path-version-patch"
)

Variables

This section is empty.

Functions

func GetYAML added in v0.3.4

func GetYAML(data []byte, path string) (string, error)

Types

type ContentReader

type ContentReader func(file string) ([]byte, error)

type ContentWriter

type ContentWriter func(file string, content []byte) error

type LinePatch

type LinePatch struct {
	// contains filtered or unexported fields
}

func (LinePatch) Apply

func (p LinePatch) Apply(cr ContentReader, cw ContentWriter, newValue string) error

func (LinePatch) Validate

func (p LinePatch) Validate() error

type Patcher

type Patcher interface {
	Apply(cr ContentReader, cw ContentWriter, newValue string) error
	Validate() error
}

func InitPatcher

func InitPatcher(c config.Modifier) (Patcher, error)

type YAMLPathPatch

type YAMLPathPatch struct {
	// contains filtered or unexported fields
}

func (YAMLPathPatch) Apply

func (p YAMLPathPatch) Apply(cn ContentReader, cw ContentWriter, newValue string) error

func (YAMLPathPatch) Validate

func (p YAMLPathPatch) Validate() error

Jump to

Keyboard shortcuts

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