patch

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(spec *bundlev1.Patch, b *bundlev1.Bundle, values map[string]interface{}, o ...OptionFunc) (*bundlev1.Bundle, error)

Apply given patch to the given bundle.

func Checksum

func Checksum(spec *bundlev1.Patch) (string, error)

Checksum calculates the bundle patch checksum.

func JSONSchema added in v0.2.9

func JSONSchema() []byte

JSONSchema returns the used json schema for validation.

func Lint added in v0.2.9

func Lint(r io.Reader) ([]gojsonschema.ResultError, error)

Lint to input reader content with Bundle jsonschema.

func Validate

func Validate(spec *bundlev1.Patch) error

Validate bundle patch.

func WithAnnotations added in v0.2.6

func WithAnnotations(p *bundlev1.Patch) bool

WithAnnotations returns the given patch spec patch annotations state.

func YAML

func YAML(r io.Reader) (*bundlev1.Patch, error)

YAML a given reader in order to extract a BundlePatch sepcification

Types

type OptionFunc added in v0.2.7

type OptionFunc func(o *options)

func WithIgnoreRuleIDs added in v0.2.7

func WithIgnoreRuleIDs(values ...string) OptionFunc

WithIgnoreRuleIDs sets the rule identifiers to ignore.

func WithIgnoreRuleIndexes added in v0.2.7

func WithIgnoreRuleIndexes(values ...int) OptionFunc

WithIgnoreRuleIndexes sets the rule indexes to ignore.

func WithStopAtRuleID added in v0.2.7

func WithStopAtRuleID(value string) OptionFunc

WithStopAtRuleID sets the id of the rule to stop evaluation at.

func WithStopAtRuleIndex added in v0.2.7

func WithStopAtRuleIndex(value int) OptionFunc

WithStopAtRuleIndex sets the index of the rule to stop evaluation at.

Jump to

Keyboard shortcuts

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