field

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(spec *platformv1.CapsuleSpec, changes []Change) (*platformv1.CapsuleSpec, error)

Types

type Change

type Change struct {
	FieldPath string
	FieldID   string
	From      Value
	To        Value
	Operation Operation
}

func (Change) String

func (c Change) String() string

func (Change) ToProto

func (c Change) ToProto() *capsule.FieldChange

type Diff

type Diff struct {
	From      *platformv1.CapsuleSpec
	To        *platformv1.CapsuleSpec
	FromBytes []byte
	ToBytes   []byte
	Report    *dyff.Report
	Changes   []Change
}

func Compare

func Compare(from *platformv1.CapsuleSpec, to *platformv1.CapsuleSpec) (*Diff, error)

type Operation

type Operation string
const (
	AddedOperation    Operation = "ADDED"
	RemovedOperation  Operation = "REMOVED"
	ModifiedOperation Operation = "MODIFIED"
)

type Type

type Type int
const (
	NullType     Type = iota
	DocumentType Type = iota
	MapType      Type = iota
	ListType     Type = iota
	StringType   Type = iota
	OtherType    Type = iota
)

type Value

type Value struct {
	AsString string
	Type     Type
}

func GetValue

func GetValue(node *yaml.Node) Value

Jump to

Keyboard shortcuts

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