Documentation
¶
Index ¶
- Variables
- func EscapeCommand(command string) string
- func HeadString(s, sep string, n int) string
- func TailString(s, sep string, n int) string
- func YellowString(s string) string
- type DMP
- type DMPDiffer
- type DMPHunk
- type DMPOp
- type DMPPatch
- type DMPResult
- type DiffRequest
- type DiffResponse
- type Differ
- type Marshaler
- type Object
- type ObjectDiff
- type ObjectDiffBuilder
- type ObjectDiffer
- type ObjectHeader
- type ObjectMap
- type ObjectMeta
- type ObjectPair
- type ObjectPairMap
- type ObjectPairer
- type ProcessDiffer
- type Unmarshaler
- type YamlMarshaler
- type YamlUnmarshaler
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDMPNoDiff = errors.New("DMPNoDiff")
View Source
var ErrLoadObject = errors.New("LoadObject")
Functions ¶
func EscapeCommand ¶ added in v0.3.0
func HeadString ¶ added in v0.4.0
func TailString ¶ added in v0.4.0
func YellowString ¶ added in v0.5.0
Types ¶
type DMPDiffer ¶ added in v0.5.0
type DMPDiffer struct{}
func NewDMPDiffer ¶ added in v0.5.0
func NewDMPDiffer() *DMPDiffer
func (*DMPDiffer) Diff ¶ added in v0.5.0
func (*DMPDiffer) Diff(ctx context.Context, req *DiffRequest) (*DiffResponse, error)
type DMPHunk ¶ added in v0.4.0
func (*DMPHunk) IntoString ¶ added in v0.4.0
type DMPPatch ¶ added in v0.4.0
type DMPPatch struct { LeftStart int RightStart int LeftLength int RightLength int Hunks []*DMPHunk }
func (*DMPPatch) IntoString ¶ added in v0.4.0
type DMPResult ¶ added in v0.4.0
func (*DMPResult) IntoString ¶ added in v0.4.0
type DiffRequest ¶ added in v0.5.0
type DiffResponse ¶ added in v0.5.0
type DiffResponse struct {
Diff string
}
type Differ ¶ added in v0.5.0
type Differ interface {
Diff(ctx context.Context, req *DiffRequest) (*DiffResponse, error)
}
type ObjectDiff ¶
type ObjectDiff struct { Pair *ObjectPair Diff string }
type ObjectDiffBuilder ¶
type ObjectDiffBuilder struct {
// contains filtered or unexported fields
}
func NewObjectDiffBuilder ¶
func NewObjectDiffBuilder( differ Differ, left, right string, diffContext int, color bool, ) *ObjectDiffBuilder
func (*ObjectDiffBuilder) ObjectDiff ¶
func (d *ObjectDiffBuilder) ObjectDiff(ctx context.Context, pair *ObjectPair) (*ObjectDiff, error)
type ObjectDiffer ¶
type ObjectDiffer interface {
ObjectDiff(ctx context.Context, pair *ObjectPair) (*ObjectDiff, error)
}
type ObjectHeader ¶
type ObjectHeader struct { APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata ObjectMeta `yaml:"metadata"` }
ObjectHeader is a seed of the Object ID.
func (ObjectHeader) IntoID ¶
func (s ObjectHeader) IntoID(sep string) string
type ObjectMap ¶
type ObjectMap struct {
// contains filtered or unexported fields
}
func NewObjectMap ¶
type ObjectMeta ¶
type ObjectPair ¶
ObjectPair is a pair of [Objects] that share the same ID.
func (*ObjectPair) IsMissing ¶
func (p *ObjectPair) IsMissing() bool
type ObjectPairMap ¶
type ObjectPairMap struct {
// contains filtered or unexported fields
}
func NewObjectPairMap ¶
func NewObjectPairMap(left, right *ObjectMap) *ObjectPairMap
func (*ObjectPairMap) ObjectPairs ¶
func (m *ObjectPairMap) ObjectPairs() []*ObjectPair
type ObjectPairer ¶
type ObjectPairer interface {
ObjectPairs() []*ObjectPair
}
type ProcessDiffer ¶ added in v0.5.0
type ProcessDiffer struct {
// contains filtered or unexported fields
}
func NewProcessDiffer ¶ added in v0.5.0
func NewProcessDiffer(command string, args []string) *ProcessDiffer
func (*ProcessDiffer) Diff ¶ added in v0.5.0
func (d *ProcessDiffer) Diff(ctx context.Context, req *DiffRequest) (*DiffResponse, error)
type Unmarshaler ¶
type YamlMarshaler ¶
type YamlMarshaler struct {
// contains filtered or unexported fields
}
func NewYamlMarshaler ¶
func NewYamlMarshaler(indent int, literalStyleIfMultiline bool) *YamlMarshaler
type YamlUnmarshaler ¶
type YamlUnmarshaler[T any] struct { // contains filtered or unexported fields }
func NewYamlUnmarshaler ¶
func NewYamlUnmarshaler[T any](r io.Reader, t T, allowDuplicateMapKey bool) *YamlUnmarshaler[T]
Click to show internal directories.
Click to hide internal directories.