compare

package
v1.5.49 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolDiff

type BoolDiff struct {
	Type     DiffType     `json:"type"`
	Property DiffProperty `json:"property"`
	Spec     bool         `json:"spec"`
	ZAP      bool         `json:"zap"`
}

func (BoolDiff) String

func (d BoolDiff) String() string

type ClusterDifferences

type ClusterDifferences struct {
	IdentifiedDiff

	Features   []Diff `json:"features,omitempty"`
	Bitmaps    []Diff `json:"bitmaps,omitempty"`
	Enums      []Diff `json:"enums,omitempty"`
	Structs    []Diff `json:"structs,omitempty"`
	Attributes []Diff `json:"attributes,omitempty"`
	Events     []Diff `json:"events,omitempty"`
	Commands   []Diff `json:"commands,omitempty"`
}

func Entities

func Entities(spec *spec.Specification, specEntities map[string][]types.Entity, zapEntities map[string][]types.Entity) (diffs []*ClusterDifferences, err error)

type ConformanceDiff

type ConformanceDiff struct {
	Type            DiffType          `json:"type"`
	Property        DiffProperty      `json:"property"`
	Spec            conformance.State `json:"spec"`
	ZAP             conformance.State `json:"zap"`
	SpecConfornance conformance.Set   `json:"specConformance"`
}

func (ConformanceDiff) String

func (d ConformanceDiff) String() string

type ConstraintDiff

type ConstraintDiff struct {
	Type     DiffType              `json:"type"`
	Property DiffProperty          `json:"property"`
	Spec     constraint.Constraint `json:"spec"`
	ZAP      constraint.Constraint `json:"zap"`
}

func (ConstraintDiff) String

func (d ConstraintDiff) String() string

type Diff

type Diff interface {
	String() string
}

type DiffProperty

type DiffProperty uint8
const (
	DiffPropertyUnknown DiffProperty = iota
	DiffPropertyName
	DiffPropertyHierarchy
	DiffPropertyPICS
	DiffPropertyRole
	DiffPropertyType
	DiffPropertyIsArray
	DiffPropertyConstraint
	DiffPropertyDefault
	DiffPropertyConformance
	DiffPropertyNullable
	DiffPropertyReadAccess
	DiffPropertyWriteAccess
	DiffPropertyInvokeAccess
	DiffPropertyOptionalWrite
	DiffPropertyFabricScoping
	DiffPropertyFabricSensitivity
	DiffPropertyTiming
	DiffPropertyBit
	DiffPropertyValue
	DiffPropertyCommandResponse
	DiffPropertyCommandDirection
	DiffPropertyPriority
	DiffPropertyLength
	DiffPropertyMinLength
	DiffPropertyMax
	DiffPropertyMin
)

func (DiffProperty) MarshalJSON

func (s DiffProperty) MarshalJSON() ([]byte, error)

func (DiffProperty) String

func (s DiffProperty) String() string

func (*DiffProperty) UnmarshalJSON

func (s *DiffProperty) UnmarshalJSON(data []byte) (err error)

type DiffType

type DiffType uint8
const (
	DiffTypeUnknown DiffType = iota
	DiffTypeMismatch
	DiffTypeMissing
)

func (DiffType) MarshalJSON

func (s DiffType) MarshalJSON() ([]byte, error)

func (*DiffType) UnmarshalJSON

func (s *DiffType) UnmarshalJSON(data []byte) (err error)

type IdentifiedDiff

type IdentifiedDiff struct {
	Type   DiffType         `json:"type,omitempty"`
	Entity types.EntityType `json:"entity,omitempty"`
	ID     *matter.Number   `json:"id,omitempty"`
	Name   string           `json:"name,omitempty"`
	Diffs  []Diff           `json:"diffs,omitempty"`
}

func (IdentifiedDiff) String

func (d IdentifiedDiff) String() string

type MissingDiff

type MissingDiff struct {
	Type     DiffType         `json:"type"`
	Entity   types.EntityType `json:"entity,omitempty"`
	Source   Source           `json:"source,omitempty"`
	Property DiffProperty     `json:"property,omitempty"`
	ID       *matter.Number   `json:"id,omitempty"`
	Name     string           `json:"name,omitempty"`
	Code     string           `json:"code,omitempty"`
}

func (MissingDiff) String

func (md MissingDiff) String() string

type PropertyDiff

type PropertyDiff[T ~uint8] struct {
	Type     DiffType     `json:"type"`
	Property DiffProperty `json:"property"`
	Spec     T            `json:"spec"`
	ZAP      T            `json:"zap"`
}

func NewPropertyDiff

func NewPropertyDiff[T ~uint8](diffType DiffType, property DiffProperty, spec T, zap T) *PropertyDiff[T]

func (PropertyDiff[T]) String

func (d PropertyDiff[T]) String() string

type QualityDiff

type QualityDiff struct {
	Type     DiffType       `json:"type"`
	Property DiffProperty   `json:"property"`
	Spec     matter.Quality `json:"spec"`
	ZAP      matter.Quality `json:"zap"`
}

func (QualityDiff) String

func (d QualityDiff) String() string

type Source

type Source uint8
const (
	SourceUnknown Source = iota
	SourceSpec
	SourceZAP
)

func (Source) MarshalJSON

func (s Source) MarshalJSON() ([]byte, error)

func (*Source) UnmarshalJSON

func (s *Source) UnmarshalJSON(data []byte) (err error)

type StringDiff

type StringDiff struct {
	Type     DiffType     `json:"type"`
	Property DiffProperty `json:"property"`
	Spec     string       `json:"spec"`
	ZAP      string       `json:"zap"`
}

func (StringDiff) String

func (d StringDiff) String() string

Jump to

Keyboard shortcuts

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