patch

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 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(ctx context.Context, 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

func JSONSchema() []byte

JSONSchema returns the used json schema for validation.

func Lint

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

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

type OptionFunc func(o *options)

func WithIgnoreRuleIDs

func WithIgnoreRuleIDs(values ...string) OptionFunc

WithIgnoreRuleIDs sets the rule identifiers to ignore.

func WithIgnoreRuleIndexes

func WithIgnoreRuleIndexes(values ...int) OptionFunc

WithIgnoreRuleIndexes sets the rule indexes to ignore.

func WithStopAtRuleID

func WithStopAtRuleID(value string) OptionFunc

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

func WithStopAtRuleIndex

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