Documentation
¶
Index ¶
- Variables
- func AccessToASCIIDocString(a matter.Access, entityType types.EntityType) string
- func AssignDocType(sectionInfoCache SectionInfoCache, docInfoCache DocumentInfoCache, ...) error
- func AssignSectionNames(sectionInfoCache SectionInfoCache, reader asciidoc.Reader, ...) error
- func AssignSectionTypes(sectionInfoCache SectionInfoCache, docInfoCache DocumentInfoCache, ...) (err error)
- func Build(cxt context.Context, parserOptions ParserOptions, ...) (specification *Specification, specDocs DocSet, err error)
- func CanonicalName(name string) string
- func DefaultColumnValue(reader asciidoc.Reader, ti *TableInfo, row *asciidoc.TableRow, ...) string
- func DeriveSpecPathFromPaths(paths []string) string
- func FindFirstTable(reader asciidoc.Reader, section *asciidoc.Section) *asciidoc.Table
- func GetDataType(sectionInfoCache SectionInfoCache, reader asciidoc.Reader, ...) (*types.DataType, error)
- func MergeViolations(v1, v2 map[string][]Violation) (v map[string][]Violation)
- func NewSource(d *asciidoc.Document, e asciidoc.Element) *source
- func NewSpecPath(path string, rootPath string) (asciidoc.Path, error)
- func Parse(cxt context.Context, parserOptions ParserOptions, ...) (specification *Specification, specDocs DocSet, err error)
- func ParseAccess(vc string, entityType types.EntityType) (a matter.Access, parsed bool)
- func ParseCommandDirection(s string) matter.Interface
- func ReadFile(path string, rootPath string) (*asciidoc.Document, error)
- func ReferenceName(reader asciidoc.Reader, element any) string
- func RenderTableCell(reader asciidoc.Reader, cell *asciidoc.TableCell) (string, error)
- func Targeter(specRoot string) func(cxt context.Context) ([]string, error)
- func Validate(spec *Specification)
- type Anchor
- type Builder
- type BuilderOption
- type BuilderOptions
- type CellRenderer
- type ClusterReferenceNameMismatch
- type ColumnIndex
- type ConformanceChoiceMismatchError
- type ConformanceChoiceOrphanError
- type CrossReference
- type DeviceTypeReferenceNameMismatch
- type DeviceTypeSet
- type DocCache
- type DocSet
- type DocumentInfoCache
- type DuplicateEntityIDError
- type DuplicateEntityNameError
- type ElementRequirementUnknownElementError
- type ElementRequirementUnreferencedClusterError
- type EntityRefs
- type Error
- type ErrorType
- type ExtraColumn
- type FabricScopedStructNotAllowedError
- type FabricScopingNotAllowedError
- type FabricSensitivityNotAllowedError
- type FilterOptions
- type GenericParseError
- type InvalidConformanceError
- type InvalidConstraintError
- type InvalidFallbackError
- type Library
- func (library *Library) Anchors(reader asciidoc.Reader) (map[string][]*Anchor, error)
- func (library *Library) CrossReferences(id string) []*CrossReference
- func (library *Library) CrossReferencesForDoc(doc *asciidoc.Document) map[string][]*CrossReference
- func (library *Library) DiscoErrata(path string) *errata.Disco
- func (library *Library) DocType(doc *asciidoc.Document) (matter.DocType, error)
- func (library *Library) EntitiesForElement(element asciidoc.Attributable) (entities []types.Entity, ok bool)
- func (library *Library) ErrataForPath(docPath string) *errata.Errata
- func (library *Library) FindAnchor(id string, source log.Source) *Anchor
- func (library *Library) FindAnchorByID(id asciidoc.Elements, element asciidoc.ParentElement, source log.Source) *Anchor
- func (library *Library) FindAnchors(id string) []*Anchor
- func (library *Library) FindSectionByType(reader asciidoc.Reader, doc *asciidoc.Document, top *asciidoc.Section, ...) *asciidoc.Section
- func (library *Library) GetHeaderCellString(reader asciidoc.Reader, cell *asciidoc.TableCell) (string, error)
- func (library *Library) Identifier(parent asciidoc.Parent, element asciidoc.Element, id asciidoc.Elements) string
- func (library *Library) IsUtilityPath(path asciidoc.Path) bool
- func (library *Library) Parents(doc *asciidoc.Document) []*asciidoc.Document
- func (library *Library) Preparse(specRoot string, attributes []asciidoc.AttributeName) (err error)
- func (library *Library) SdkErrata(path string) *errata.SDK
- func (library *Library) SectionLevel(s *asciidoc.Section) (level int)
- func (library *Library) SectionName(s *asciidoc.Section) (name string)
- func (library *Library) SectionType(s *asciidoc.Section) (st matter.Section)
- func (library *Library) SetDocType(doc *asciidoc.Document, dt matter.DocType)
- func (library *Library) SetSectionLevel(s *asciidoc.Section, level int)
- func (library *Library) SetSectionName(s *asciidoc.Section, name string)
- func (library *Library) SetSectionType(s *asciidoc.Section, st matter.Section)
- func (library *Library) SpecErrata(path string) *errata.Spec
- func (library *Library) SyncCrossReference(cr *CrossReference, id asciidoc.Elements)
- func (library *Library) SyncToDoc(a *Anchor, id asciidoc.Elements)
- type LibraryBuilder
- type LibraryParser
- type LibrarySet
- type NamespaceNameMismatchTagRequirementError
- type ParseErrors
- type ParserOptions
- type Reader
- type SectionInfoCache
- type SpecPullRequest
- type Specification
- func (spec *Specification) BuildClusterReferences()
- func (spec *Specification) BuildDataTypeReferences()
- func (spec *Specification) ComposeDeviceType(deviceType *matter.DeviceType) (composition *matter.DeviceTypeComposition, err error)
- func (s *Specification) EntitiesForDocument(doc *asciidoc.Document) []types.Entity
- func (s *Specification) LibraryForDocument(doc *asciidoc.Document) (library *Library, ok bool)
- type StringReader
- type TableInfo
- func (ti *TableInfo) AppendColumn(reader asciidoc.Reader, column matter.TableColumn, entityType types.EntityType) (appendedIndex int, err error)
- func (ti *TableInfo) Body() iter.Seq[*asciidoc.TableRow]
- func (ti *TableInfo) ColumnIndex(columns ...matter.TableColumn) (index int, ok bool)
- func (ti *TableInfo) ContentRows() iter.Seq[*asciidoc.TableRow]
- func (ti *TableInfo) ReadConformance(reader asciidoc.Reader, row *asciidoc.TableRow, column matter.TableColumn) conformance.Set
- func (ti *TableInfo) ReadConstraint(library *Library, row *asciidoc.TableRow, columns ...matter.TableColumn) constraint.Constraint
- func (ti *TableInfo) ReadDataType(library *Library, reader asciidoc.Reader, row *asciidoc.TableRow, ...) (*types.DataType, error)
- func (ti *TableInfo) ReadFallback(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) constraint.Limit
- func (ti *TableInfo) ReadID(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) (*matter.Number, error)
- func (ti *TableInfo) ReadLocation(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) (relation matter.DeviceTypeRequirementLocation, err error)
- func (ti *TableInfo) ReadName(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) (name string, xref *asciidoc.CrossReference, err error)
- func (ti *TableInfo) ReadNameAtOffset(reader asciidoc.Reader, row *asciidoc.TableRow, offset int) (name string, xref *asciidoc.CrossReference, err error)
- func (ti *TableInfo) ReadQuality(reader asciidoc.Reader, row *asciidoc.TableRow, entityType types.EntityType, ...) (quality matter.Quality, err error)
- func (ti *TableInfo) ReadString(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) (string, error)
- func (ti *TableInfo) ReadStringAtOffset(reader asciidoc.Reader, row *asciidoc.TableRow, offset int) (string, error)
- func (ti *TableInfo) ReadValue(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) (string, error)
- func (ti *TableInfo) ReadValueByIndex(reader asciidoc.Reader, row *asciidoc.TableRow, offset int) (string, error)
- func (ti *TableInfo) RenderColumn(reader asciidoc.Reader, row *asciidoc.TableRow, renderer CellRenderer, ...) (value string, source asciidoc.Element, ok bool)
- func (ti *TableInfo) Rescan(doc *asciidoc.Document, reader asciidoc.Reader) (err error)
- type TagNameMismatchTagRequirementError
- type UnknownBaseClusterError
- type UnknownClusterRequirementError
- type UnknownComposingDeviceTypeClusterRequirementDeviceTypeError
- type UnknownComposingDeviceTypeElementRequirementDeviceTypeError
- type UnknownComposingDeviceTypeRequirementClusterError
- type UnknownComposingDeviceTypeRequirementDeviceTypeError
- type UnknownComposingDeviceTypeTagRequirementDeviceTypeError
- type UnknownComposingElementRequirementClusterError
- type UnknownConditionRequirementConditionError
- type UnknownConditionRequirementDeviceTypeError
- type UnknownConformanceIdentifierError
- type UnknownConformanceReferenceError
- type UnknownConstraintIdentifierError
- type UnknownConstraintReferenceError
- type UnknownCustomDataTypeError
- type UnknownElementRequirementClusterError
- type UnknownNamespaceTagRequirementError
- type UnknownSupersetError
- type UnknownTagRequirementError
- type UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError
- type UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError
- type UnreferencedConditionRequirementDeviceTypeError
- type UnreferencedTagRequirementDeviceTypeError
- type Violation
- type ViolationType
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoTableFound = fmt.Errorf("no table found")
View Source
var ErrNotEnoughRowsInTable = fmt.Errorf("not enough value rows in table")
Functions ¶
func AccessToASCIIDocString ¶
func AccessToASCIIDocString(a matter.Access, entityType types.EntityType) string
func AssignDocType ¶ added in v1.6.0
func AssignDocType(sectionInfoCache SectionInfoCache, docInfoCache DocumentInfoCache, reader asciidoc.Reader, doc *asciidoc.Document) error
func AssignSectionNames ¶ added in v1.5.46
func AssignSectionTypes ¶
func AssignSectionTypes(sectionInfoCache SectionInfoCache, docInfoCache DocumentInfoCache, reader asciidoc.Reader, doc *asciidoc.Document, top *asciidoc.Section) (err error)
func Build ¶ added in v1.5.42
func Build(cxt context.Context, parserOptions ParserOptions, processingOptions pipeline.ProcessingOptions, builderOptions []BuilderOption, docs DocSet, attributes []asciidoc.AttributeName) (specification *Specification, specDocs DocSet, err error)
func CanonicalName ¶
func DefaultColumnValue ¶ added in v1.6.0
func DefaultColumnValue(reader asciidoc.Reader, ti *TableInfo, row *asciidoc.TableRow, column matter.TableColumn, entityType types.EntityType) string
func DeriveSpecPathFromPaths ¶
func FindFirstTable ¶
func GetDataType ¶ added in v1.5.41
func MergeViolations ¶ added in v1.5.56
func Parse ¶
func Parse(cxt context.Context, parserOptions ParserOptions, processingOptions pipeline.ProcessingOptions, builderOptions []BuilderOption, attributes []asciidoc.AttributeName) (specification *Specification, specDocs DocSet, err error)
func ParseAccess ¶
func ParseCommandDirection ¶
func RenderTableCell ¶
func Validate ¶
func Validate(spec *Specification)
Types ¶
type Anchor ¶
type Anchor struct {
Library *Library
Document *asciidoc.Document
Source matter.Source
ID asciidoc.Elements
LabelElements asciidoc.Elements
Element asciidoc.Element
Parent asciidoc.Parent
}
type Builder ¶
type Builder struct {
Spec *Specification
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(specRoot string, config *config.Config, errata *errata.Collection, options ...BuilderOption) Builder
type BuilderOption ¶
type BuilderOption func(tg *Builder)
func IgnoreHierarchy ¶
func IgnoreHierarchy(ignore bool) BuilderOption
func PatchForSdk ¶ added in v1.6.0
func PatchForSdk(patch bool) BuilderOption
type BuilderOptions ¶
type BuilderOptions struct {
IgnoreHierarchy bool `default:"false" help:"ignore hierarchy" group:"Spec:"`
}
func (BuilderOptions) List ¶ added in v1.5.41
func (bo BuilderOptions) List() (options []BuilderOption)
type CellRenderer ¶
type ClusterReferenceNameMismatch ¶
func (ClusterReferenceNameMismatch) Error ¶
func (ddt ClusterReferenceNameMismatch) Error() string
func (ClusterReferenceNameMismatch) Origin ¶
func (ddt ClusterReferenceNameMismatch) Origin() (path string, line int)
func (ClusterReferenceNameMismatch) Type ¶
func (ddt ClusterReferenceNameMismatch) Type() ErrorType
type ColumnIndex ¶
type ColumnIndex map[matter.TableColumn]int
func (ColumnIndex) HasAll ¶
func (ci ColumnIndex) HasAll(columns ...matter.TableColumn) bool
func (ColumnIndex) HasAny ¶
func (ci ColumnIndex) HasAny(columns ...matter.TableColumn) bool
type ConformanceChoiceMismatchError ¶ added in v1.6.0
type ConformanceChoiceMismatchError struct {
Set string
Source log.Source
Entity types.Entity
ChoiceLimit conformance.ChoiceLimit
Previous types.Entity
PreviousChoiceLimit conformance.ChoiceLimit
}
func (ConformanceChoiceMismatchError) Error ¶ added in v1.6.0
func (ccme ConformanceChoiceMismatchError) Error() string
func (ConformanceChoiceMismatchError) Origin ¶ added in v1.6.0
func (ccme ConformanceChoiceMismatchError) Origin() (path string, line int)
func (ConformanceChoiceMismatchError) Type ¶ added in v1.6.0
func (ccme ConformanceChoiceMismatchError) Type() ErrorType
type ConformanceChoiceOrphanError ¶ added in v1.6.0
func (ConformanceChoiceOrphanError) Error ¶ added in v1.6.0
func (ccoe ConformanceChoiceOrphanError) Error() string
func (ConformanceChoiceOrphanError) Origin ¶ added in v1.6.0
func (ccoe ConformanceChoiceOrphanError) Origin() (path string, line int)
func (ConformanceChoiceOrphanError) Type ¶ added in v1.6.0
func (ccoe ConformanceChoiceOrphanError) Type() ErrorType
type CrossReference ¶
type DeviceTypeReferenceNameMismatch ¶
type DeviceTypeReferenceNameMismatch struct {
DeviceType *matter.DeviceType
Name string
Source log.Source
}
func (DeviceTypeReferenceNameMismatch) Error ¶
func (ddt DeviceTypeReferenceNameMismatch) Error() string
func (DeviceTypeReferenceNameMismatch) Origin ¶
func (ddt DeviceTypeReferenceNameMismatch) Origin() (path string, line int)
func (DeviceTypeReferenceNameMismatch) Type ¶
func (ddt DeviceTypeReferenceNameMismatch) Type() ErrorType
type DeviceTypeSet ¶
type DocCache ¶ added in v1.6.0
type DocCache struct {
// contains filtered or unexported fields
}
func NewDocCache ¶ added in v1.6.0
type DocSet ¶
func LoadSpecDocs ¶ added in v1.6.0
func LoadSpecDocs(cxt context.Context, parserOptions ParserOptions, processingOptions pipeline.ProcessingOptions) (specDocs DocSet, err error)
type DocumentInfoCache ¶ added in v1.6.0
type DuplicateEntityIDError ¶
func (DuplicateEntityIDError) Error ¶
func (ddt DuplicateEntityIDError) Error() string
func (DuplicateEntityIDError) Origin ¶
func (ddt DuplicateEntityIDError) Origin() (path string, line int)
func (DuplicateEntityIDError) Type ¶
func (ddt DuplicateEntityIDError) Type() ErrorType
type DuplicateEntityNameError ¶
func (DuplicateEntityNameError) Error ¶
func (ddt DuplicateEntityNameError) Error() string
func (DuplicateEntityNameError) Origin ¶
func (ddt DuplicateEntityNameError) Origin() (path string, line int)
func (DuplicateEntityNameError) Type ¶
func (ddt DuplicateEntityNameError) Type() ErrorType
type ElementRequirementUnknownElementError ¶
type ElementRequirementUnknownElementError struct {
Requirement *matter.ElementRequirement
}
func (ElementRequirementUnknownElementError) Error ¶
func (ddt ElementRequirementUnknownElementError) Error() string
func (ElementRequirementUnknownElementError) Origin ¶
func (ddt ElementRequirementUnknownElementError) Origin() (path string, line int)
func (ElementRequirementUnknownElementError) Type ¶
func (ddt ElementRequirementUnknownElementError) Type() ErrorType
type ElementRequirementUnreferencedClusterError ¶
type ElementRequirementUnreferencedClusterError struct {
Requirement *matter.ElementRequirement
}
func (ElementRequirementUnreferencedClusterError) Error ¶
func (ddt ElementRequirementUnreferencedClusterError) Error() string
func (ElementRequirementUnreferencedClusterError) Origin ¶
func (ddt ElementRequirementUnreferencedClusterError) Origin() (path string, line int)
func (ElementRequirementUnreferencedClusterError) Type ¶
func (ddt ElementRequirementUnreferencedClusterError) Type() ErrorType
type EntityRefs ¶
type EntityRefs[T comparable] struct { sync.RWMutex // contains filtered or unexported fields }
func NewEntityRefs ¶
func NewEntityRefs[T comparable]() EntityRefs[T]
func (*EntityRefs[T]) Add ¶
func (cr *EntityRefs[T]) Add(c T, m types.Entity)
type ErrorType ¶
type ErrorType uint16
const ( ErrorTypeUnknown ErrorType = iota ErrorTypeGenericParse ErrorTypeDuplicateEntityID ErrorTypeDuplicateEntityName ErrorTypeUnknownConstraintIdentifier ErrorTypeUnknownConstraintReference ErrorTypeUnknownCustomDataType ErrorTypeUnknownSuperset ErrorTypeUnknownClusterRequirement ErrorTypeUnknownElementRequirementCluster ErrorTypeElementRequirementUnreferencedCluster ErrorTypeElementRequirementUnknownElement ErrorTypeComposingDeviceTypeRequirementUnknownDeviceType ErrorTypeComposingDeviceTypeClusterRequirementUnknownCluster ErrorTypeComposingDeviceTypeClusterRequirementUnknownDeviceType ErrorTypeComposingDeviceTypeClusterRequirementUnreferencedDeviceType ErrorTypeComposingDeviceTypeElementRequirementUnknownCluster ErrorTypeComposingDeviceTypeElementRequirementUnknownDeviceType ErrorTypeComposingDeviceTypeElementRequirementUnreferencedDeviceType ErrorTypeConditionRequirementUnknownDeviceType ErrorTypeConditionRequirementUnreferencedDeviceType ErrorTypeConditionRequirementUnknownCondition ErrorTypeTagRequirementUnreferencedDeviceType ErrorTypeTagRequirementUnknownNamespace ErrorTypeTagRequirementNamespaceNameMismatch ErrorTypeTagRequirementUnknownTag ErrorTypeTagRequirementTagNameMismatch ErrorTypeClusterReferenceNameMismatch ErrorTypeDeviceTypeReferenceNameMismatch ErrorTypeNamespaceNameMismatch ErrorTypeUnknownBaseCluster ErrorTypeUnknownConformanceIdentifier ErrorTypeUnknownConformanceReference ErrorTypeFabricScopingNotAllowed ErrorTypeFabricSensitivityNotAllowed ErrorTypeFabricScopedStructNotAllowed ErrorTypeInvalidConformance ErrorTypeInvalidConstraint ErrorTypeInvalidFallback ErrorTypeConformanceChoiceOrphan ErrorTypeConformanceChoiceMismatch )
type ExtraColumn ¶
type FabricScopedStructNotAllowedError ¶
func (FabricScopedStructNotAllowedError) ComparableEntity ¶ added in v1.5.56
func (cf FabricScopedStructNotAllowedError) ComparableEntity() types.Entity
func (FabricScopedStructNotAllowedError) Error ¶
func (ddt FabricScopedStructNotAllowedError) Error() string
func (FabricScopedStructNotAllowedError) Origin ¶
func (cf FabricScopedStructNotAllowedError) Origin() (path string, line int)
func (FabricScopedStructNotAllowedError) Type ¶
func (cf FabricScopedStructNotAllowedError) Type() ErrorType
type FabricScopingNotAllowedError ¶
func (FabricScopingNotAllowedError) ComparableEntity ¶ added in v1.5.56
func (cf FabricScopingNotAllowedError) ComparableEntity() types.Entity
func (FabricScopingNotAllowedError) Error ¶
func (ddt FabricScopingNotAllowedError) Error() string
func (FabricScopingNotAllowedError) Origin ¶
func (cf FabricScopingNotAllowedError) Origin() (path string, line int)
func (FabricScopingNotAllowedError) Type ¶
func (cf FabricScopingNotAllowedError) Type() ErrorType
type FabricSensitivityNotAllowedError ¶
func (FabricSensitivityNotAllowedError) ComparableEntity ¶ added in v1.5.56
func (cf FabricSensitivityNotAllowedError) ComparableEntity() types.Entity
func (FabricSensitivityNotAllowedError) Error ¶
func (ddt FabricSensitivityNotAllowedError) Error() string
func (FabricSensitivityNotAllowedError) Origin ¶
func (cf FabricSensitivityNotAllowedError) Origin() (path string, line int)
func (FabricSensitivityNotAllowedError) Type ¶
func (cf FabricSensitivityNotAllowedError) Type() ErrorType
type FilterOptions ¶
type FilterOptions struct {
Paths []string `arg:"" optional:"" help:"Paths of AsciiDoc files to use for generation" group:"Spec:"`
Exclude []string `short:"e" help:"exclude files matching this file pattern" group:"Spec:"`
Force bool `default:"false" help:"generate files even if there were spec parsing errors" group:"Spec:"`
IgnoreErrored bool `default:"false" help:"ignore any spec files with parsing errors" group:"Spec:"`
}
type GenericParseError ¶ added in v1.5.39
func (GenericParseError) Origin ¶ added in v1.5.39
func (gpe GenericParseError) Origin() (path string, line int)
func (GenericParseError) Type ¶ added in v1.5.39
func (gpe GenericParseError) Type() ErrorType
type InvalidConformanceError ¶
func (InvalidConformanceError) Error ¶
func (ddt InvalidConformanceError) Error() string
func (InvalidConformanceError) Origin ¶
func (cf InvalidConformanceError) Origin() (path string, line int)
func (InvalidConformanceError) Type ¶
func (cf InvalidConformanceError) Type() ErrorType
type InvalidConstraintError ¶
func (InvalidConstraintError) Error ¶
func (ice InvalidConstraintError) Error() string
func (InvalidConstraintError) Origin ¶
func (ice InvalidConstraintError) Origin() (path string, line int)
func (InvalidConstraintError) Type ¶
func (ice InvalidConstraintError) Type() ErrorType
type InvalidFallbackError ¶
func (InvalidFallbackError) Error ¶
func (ifbe InvalidFallbackError) Error() string
func (InvalidFallbackError) Origin ¶
func (ifbe InvalidFallbackError) Origin() (path string, line int)
func (InvalidFallbackError) Type ¶
func (ifbe InvalidFallbackError) Type() ErrorType
type Library ¶ added in v1.6.0
type Library struct {
Root *asciidoc.Document
Spec *Specification
Errata *errata.Collection
asciidoc.Reader
Docs []*asciidoc.Document
// contains filtered or unexported fields
}
func NewLibrary ¶ added in v1.6.0
func (*Library) CrossReferences ¶ added in v1.6.0
func (library *Library) CrossReferences(id string) []*CrossReference
func (*Library) CrossReferencesForDoc ¶ added in v1.6.0
func (library *Library) CrossReferencesForDoc(doc *asciidoc.Document) map[string][]*CrossReference
func (*Library) DiscoErrata ¶ added in v1.6.0
func (*Library) EntitiesForElement ¶ added in v1.6.0
func (*Library) ErrataForPath ¶ added in v1.6.0
func (*Library) FindAnchor ¶ added in v1.6.0
func (*Library) FindAnchorByID ¶ added in v1.6.0
func (*Library) FindAnchors ¶ added in v1.6.0
func (*Library) FindSectionByType ¶ added in v1.6.0
func (*Library) GetHeaderCellString ¶ added in v1.6.0
func (*Library) Identifier ¶ added in v1.6.0
func (*Library) IsUtilityPath ¶ added in v1.6.0
func (*Library) Preparse ¶ added in v1.6.0
func (library *Library) Preparse(specRoot string, attributes []asciidoc.AttributeName) (err error)
func (*Library) SectionLevel ¶ added in v1.6.0
func (*Library) SectionName ¶ added in v1.6.0
func (*Library) SectionType ¶ added in v1.6.0
func (*Library) SetDocType ¶ added in v1.6.0
func (*Library) SetSectionLevel ¶ added in v1.6.0
func (*Library) SetSectionName ¶ added in v1.6.0
func (*Library) SetSectionType ¶ added in v1.6.0
func (*Library) SpecErrata ¶ added in v1.6.0
func (*Library) SyncCrossReference ¶ added in v1.6.0
func (library *Library) SyncCrossReference(cr *CrossReference, id asciidoc.Elements)
type LibraryBuilder ¶ added in v1.6.0
type LibraryBuilder struct {
// contains filtered or unexported fields
}
func NewLibraryBuilder ¶ added in v1.6.0
func NewLibraryBuilder(specRoot string, config *config.Config, errata *errata.Collection) *LibraryBuilder
func (LibraryBuilder) Name ¶ added in v1.6.0
func (lb LibraryBuilder) Name() string
type LibraryParser ¶ added in v1.6.0
type LibraryParser struct {
// contains filtered or unexported fields
}
func NewLibraryParser ¶ added in v1.6.0
func NewLibraryParser(specRoot string, attributes []asciidoc.AttributeName) (*LibraryParser, error)
func (LibraryParser) Name ¶ added in v1.6.0
func (r LibraryParser) Name() string
type NamespaceNameMismatchTagRequirementError ¶ added in v1.5.46
type NamespaceNameMismatchTagRequirementError struct {
Requirement *matter.TagRequirement
Namespace *matter.Namespace
}
func (NamespaceNameMismatchTagRequirementError) Error ¶ added in v1.5.46
func (ddt NamespaceNameMismatchTagRequirementError) Error() string
func (NamespaceNameMismatchTagRequirementError) Origin ¶ added in v1.5.46
func (ddt NamespaceNameMismatchTagRequirementError) Origin() (path string, line int)
func (NamespaceNameMismatchTagRequirementError) Type ¶ added in v1.5.46
func (ddt NamespaceNameMismatchTagRequirementError) Type() ErrorType
type ParseErrors ¶
type ParseErrors struct {
Errors []Error
}
func (ParseErrors) Error ¶
func (pe ParseErrors) Error() string
type ParserOptions ¶
type ParserOptions struct {
Root string `` /* 159-byte string literal not displayed */
}
func (*ParserOptions) AfterApply ¶
func (po *ParserOptions) AfterApply() error
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func ParseFile(path asciidoc.Path, specRoot string, attributes ...asciidoc.AttributeName) (doc *asciidoc.Document, reader asciidoc.Reader, err error) {
var contents *os.File
contents, err = os.Open(path.Absolute)
if err != nil {
return
}
defer contents.Close()
doc, err = ReadFile(path.Absolute, specRoot)
if err != nil {
err = fmt.Errorf("parse error in \"%s\": %w", path, err)
return
}
reader, err = preparse(nil, doc, specRoot, attributes)
if err != nil {
return
}
return
}
func NewReader ¶
func NewReader(parserOptions ParserOptions) (Reader, error)
type SectionInfoCache ¶ added in v1.6.0
type SectionInfoCache interface {
SectionName(section *asciidoc.Section) string
SetSectionName(section *asciidoc.Section, name string)
SectionType(section *asciidoc.Section) matter.Section
SetSectionType(section *asciidoc.Section, sectionType matter.Section)
ErrataForPath(docPath string) *errata.Errata
}
type SpecPullRequest ¶ added in v1.5.56
type SpecPullRequest struct {
Base *Specification
BaseInProgress *Specification
Head *Specification
HeadInProgress *Specification
}
func LoadSpecPullRequest ¶ added in v1.5.56
func LoadSpecPullRequest(cxt context.Context, baseRoot string, headRoot string, pipelineOptions pipeline.ProcessingOptions) (ss SpecPullRequest, err error)
type Specification ¶
type Specification struct {
Root string
Config *config.Config
Errata *errata.Collection
Clusters map[*matter.Cluster]struct{}
ClustersByID map[uint64]*matter.Cluster
ClustersByName map[string]*matter.Cluster
DeviceTypes []*matter.DeviceType
DeviceTypesByID map[uint64]*matter.DeviceType
DeviceTypesByName map[string]*matter.DeviceType
BaseDeviceType *matter.DeviceType
RootNodeDeviceType *matter.DeviceType
Namespaces []*matter.Namespace
ClusterRefs EntityRefs[*matter.Cluster]
DataTypeRefs EntityRefs[types.Entity]
DocRefs map[types.Entity]*asciidoc.Document
LibraryRefs map[types.Entity]*Library
GlobalObjects types.EntitySet[*asciidoc.Document]
Docs map[string]*asciidoc.Document
UnusedDocs []*asciidoc.Document
Libraries []*Library
Errors []Error
// contains filtered or unexported fields
}
func (*Specification) BuildClusterReferences ¶
func (spec *Specification) BuildClusterReferences()
func (*Specification) BuildDataTypeReferences ¶
func (spec *Specification) BuildDataTypeReferences()
func (*Specification) ComposeDeviceType ¶
func (spec *Specification) ComposeDeviceType(deviceType *matter.DeviceType) (composition *matter.DeviceTypeComposition, err error)
func (*Specification) EntitiesForDocument ¶ added in v1.6.0
func (s *Specification) EntitiesForDocument(doc *asciidoc.Document) []types.Entity
func (*Specification) LibraryForDocument ¶ added in v1.6.0
func (s *Specification) LibraryForDocument(doc *asciidoc.Document) (library *Library, ok bool)
type StringReader ¶
type StringReader struct {
// contains filtered or unexported fields
}
func NewStringReader ¶
func NewStringReader(name string, rootPath string) (StringReader, error)
func (StringReader) Name ¶
func (r StringReader) Name() string
type TableInfo ¶
type TableInfo struct {
Doc *asciidoc.Document
Element *asciidoc.Table
Rows []*asciidoc.TableRow
HeaderRowIndex int
ColumnMap ColumnIndex
ExtraColumns []ExtraColumn
}
func (*TableInfo) AppendColumn ¶ added in v1.6.0
func (ti *TableInfo) AppendColumn(reader asciidoc.Reader, column matter.TableColumn, entityType types.EntityType) (appendedIndex int, err error)
func (*TableInfo) ColumnIndex ¶
func (ti *TableInfo) ColumnIndex(columns ...matter.TableColumn) (index int, ok bool)
func (*TableInfo) ContentRows ¶ added in v1.5.39
func (*TableInfo) ReadConformance ¶
func (ti *TableInfo) ReadConformance(reader asciidoc.Reader, row *asciidoc.TableRow, column matter.TableColumn) conformance.Set
func (*TableInfo) ReadConstraint ¶
func (ti *TableInfo) ReadConstraint(library *Library, row *asciidoc.TableRow, columns ...matter.TableColumn) constraint.Constraint
func (*TableInfo) ReadDataType ¶
func (*TableInfo) ReadFallback ¶
func (ti *TableInfo) ReadFallback(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) constraint.Limit
func (*TableInfo) ReadLocation ¶
func (ti *TableInfo) ReadLocation(reader asciidoc.Reader, row *asciidoc.TableRow, columns ...matter.TableColumn) (relation matter.DeviceTypeRequirementLocation, err error)
func (*TableInfo) ReadNameAtOffset ¶ added in v1.5.41
func (*TableInfo) ReadQuality ¶
func (*TableInfo) ReadString ¶
func (*TableInfo) ReadStringAtOffset ¶
func (*TableInfo) ReadValueByIndex ¶
func (*TableInfo) RenderColumn ¶
type TagNameMismatchTagRequirementError ¶ added in v1.5.46
type TagNameMismatchTagRequirementError struct {
Requirement *matter.TagRequirement
SemanticTag *matter.SemanticTag
}
func (TagNameMismatchTagRequirementError) Error ¶ added in v1.5.46
func (ddt TagNameMismatchTagRequirementError) Error() string
func (TagNameMismatchTagRequirementError) Origin ¶ added in v1.5.46
func (ddt TagNameMismatchTagRequirementError) Origin() (path string, line int)
func (TagNameMismatchTagRequirementError) Type ¶ added in v1.5.46
func (ddt TagNameMismatchTagRequirementError) Type() ErrorType
type UnknownBaseClusterError ¶
func (UnknownBaseClusterError) Error ¶
func (ddt UnknownBaseClusterError) Error() string
func (UnknownBaseClusterError) Origin ¶
func (ddt UnknownBaseClusterError) Origin() (path string, line int)
func (UnknownBaseClusterError) Type ¶
func (ddt UnknownBaseClusterError) Type() ErrorType
type UnknownClusterRequirementError ¶
type UnknownClusterRequirementError struct {
Requirement *matter.ClusterRequirement
}
func (UnknownClusterRequirementError) Error ¶
func (ddt UnknownClusterRequirementError) Error() string
func (UnknownClusterRequirementError) Origin ¶
func (ddt UnknownClusterRequirementError) Origin() (path string, line int)
func (UnknownClusterRequirementError) Type ¶
func (ddt UnknownClusterRequirementError) Type() ErrorType
type UnknownComposingDeviceTypeClusterRequirementDeviceTypeError ¶
type UnknownComposingDeviceTypeClusterRequirementDeviceTypeError struct {
Requirement *matter.DeviceTypeClusterRequirement
}
func (UnknownComposingDeviceTypeClusterRequirementDeviceTypeError) Error ¶
func (ddt UnknownComposingDeviceTypeClusterRequirementDeviceTypeError) Error() string
func (UnknownComposingDeviceTypeClusterRequirementDeviceTypeError) Origin ¶
func (ddt UnknownComposingDeviceTypeClusterRequirementDeviceTypeError) Origin() (path string, line int)
func (UnknownComposingDeviceTypeClusterRequirementDeviceTypeError) Type ¶
func (ddt UnknownComposingDeviceTypeClusterRequirementDeviceTypeError) Type() ErrorType
type UnknownComposingDeviceTypeElementRequirementDeviceTypeError ¶
type UnknownComposingDeviceTypeElementRequirementDeviceTypeError struct {
Requirement *matter.DeviceTypeElementRequirement
}
func (UnknownComposingDeviceTypeElementRequirementDeviceTypeError) Error ¶
func (ddt UnknownComposingDeviceTypeElementRequirementDeviceTypeError) Error() string
func (UnknownComposingDeviceTypeElementRequirementDeviceTypeError) Origin ¶
func (ddt UnknownComposingDeviceTypeElementRequirementDeviceTypeError) Origin() (path string, line int)
func (UnknownComposingDeviceTypeElementRequirementDeviceTypeError) Type ¶
func (ddt UnknownComposingDeviceTypeElementRequirementDeviceTypeError) Type() ErrorType
type UnknownComposingDeviceTypeRequirementClusterError ¶
type UnknownComposingDeviceTypeRequirementClusterError struct {
Requirement *matter.DeviceTypeClusterRequirement
}
func (UnknownComposingDeviceTypeRequirementClusterError) Error ¶
func (ddt UnknownComposingDeviceTypeRequirementClusterError) Error() string
func (UnknownComposingDeviceTypeRequirementClusterError) Origin ¶
func (ddt UnknownComposingDeviceTypeRequirementClusterError) Origin() (path string, line int)
func (UnknownComposingDeviceTypeRequirementClusterError) Type ¶
func (ddt UnknownComposingDeviceTypeRequirementClusterError) Type() ErrorType
type UnknownComposingDeviceTypeRequirementDeviceTypeError ¶
type UnknownComposingDeviceTypeRequirementDeviceTypeError struct {
Requirement *matter.DeviceTypeRequirement
}
func (UnknownComposingDeviceTypeRequirementDeviceTypeError) Error ¶
func (ddt UnknownComposingDeviceTypeRequirementDeviceTypeError) Error() string
func (UnknownComposingDeviceTypeRequirementDeviceTypeError) Origin ¶
func (ddt UnknownComposingDeviceTypeRequirementDeviceTypeError) Origin() (path string, line int)
func (UnknownComposingDeviceTypeRequirementDeviceTypeError) Type ¶
func (ddt UnknownComposingDeviceTypeRequirementDeviceTypeError) Type() ErrorType
type UnknownComposingDeviceTypeTagRequirementDeviceTypeError ¶ added in v1.5.46
type UnknownComposingDeviceTypeTagRequirementDeviceTypeError struct {
Requirement *matter.DeviceTypeTagRequirement
}
func (UnknownComposingDeviceTypeTagRequirementDeviceTypeError) Error ¶ added in v1.5.46
func (ddt UnknownComposingDeviceTypeTagRequirementDeviceTypeError) Error() string
func (UnknownComposingDeviceTypeTagRequirementDeviceTypeError) Origin ¶ added in v1.5.46
func (ddt UnknownComposingDeviceTypeTagRequirementDeviceTypeError) Origin() (path string, line int)
func (UnknownComposingDeviceTypeTagRequirementDeviceTypeError) Type ¶ added in v1.5.46
func (ddt UnknownComposingDeviceTypeTagRequirementDeviceTypeError) Type() ErrorType
type UnknownComposingElementRequirementClusterError ¶
type UnknownComposingElementRequirementClusterError struct {
Requirement *matter.DeviceTypeElementRequirement
}
func (UnknownComposingElementRequirementClusterError) Error ¶
func (ddt UnknownComposingElementRequirementClusterError) Error() string
func (UnknownComposingElementRequirementClusterError) Origin ¶
func (ddt UnknownComposingElementRequirementClusterError) Origin() (path string, line int)
func (UnknownComposingElementRequirementClusterError) Type ¶
func (ddt UnknownComposingElementRequirementClusterError) Type() ErrorType
type UnknownConditionRequirementConditionError ¶ added in v1.5.39
type UnknownConditionRequirementConditionError struct {
Requirement *matter.ConditionRequirement
}
func (UnknownConditionRequirementConditionError) Error ¶ added in v1.5.39
func (ddt UnknownConditionRequirementConditionError) Error() string
func (UnknownConditionRequirementConditionError) Origin ¶ added in v1.5.39
func (ddt UnknownConditionRequirementConditionError) Origin() (path string, line int)
func (UnknownConditionRequirementConditionError) Type ¶ added in v1.5.39
func (ddt UnknownConditionRequirementConditionError) Type() ErrorType
type UnknownConditionRequirementDeviceTypeError ¶ added in v1.5.39
type UnknownConditionRequirementDeviceTypeError struct {
Requirement *matter.ConditionRequirement
}
func (UnknownConditionRequirementDeviceTypeError) Error ¶ added in v1.5.39
func (ddt UnknownConditionRequirementDeviceTypeError) Error() string
func (UnknownConditionRequirementDeviceTypeError) Origin ¶ added in v1.5.39
func (ddt UnknownConditionRequirementDeviceTypeError) Origin() (path string, line int)
func (UnknownConditionRequirementDeviceTypeError) Type ¶ added in v1.5.39
func (ddt UnknownConditionRequirementDeviceTypeError) Type() ErrorType
type UnknownConformanceIdentifierError ¶
func (UnknownConformanceIdentifierError) ComparableEntity ¶ added in v1.5.56
func (cf UnknownConformanceIdentifierError) ComparableEntity() types.Entity
func (UnknownConformanceIdentifierError) Error ¶
func (ddt UnknownConformanceIdentifierError) Error() string
func (UnknownConformanceIdentifierError) Origin ¶
func (cf UnknownConformanceIdentifierError) Origin() (path string, line int)
func (UnknownConformanceIdentifierError) Type ¶
func (cf UnknownConformanceIdentifierError) Type() ErrorType
type UnknownConformanceReferenceError ¶
func (UnknownConformanceReferenceError) ComparableEntity ¶ added in v1.5.56
func (cf UnknownConformanceReferenceError) ComparableEntity() types.Entity
func (UnknownConformanceReferenceError) Error ¶
func (ddt UnknownConformanceReferenceError) Error() string
func (UnknownConformanceReferenceError) Origin ¶
func (cf UnknownConformanceReferenceError) Origin() (path string, line int)
func (UnknownConformanceReferenceError) Type ¶
func (cf UnknownConformanceReferenceError) Type() ErrorType
type UnknownConstraintIdentifierError ¶
type UnknownConstraintIdentifierError struct {
Identifier *constraint.IdentifierLimit
Source log.Source
}
func (UnknownConstraintIdentifierError) Error ¶
func (ddt UnknownConstraintIdentifierError) Error() string
func (UnknownConstraintIdentifierError) Origin ¶
func (ddt UnknownConstraintIdentifierError) Origin() (path string, line int)
func (UnknownConstraintIdentifierError) Type ¶
func (ddt UnknownConstraintIdentifierError) Type() ErrorType
type UnknownConstraintReferenceError ¶
type UnknownConstraintReferenceError struct {
Reference *constraint.ReferenceLimit
Source log.Source
}
func (UnknownConstraintReferenceError) Error ¶
func (ddt UnknownConstraintReferenceError) Error() string
func (UnknownConstraintReferenceError) Origin ¶
func (ddt UnknownConstraintReferenceError) Origin() (path string, line int)
func (UnknownConstraintReferenceError) Type ¶
func (ddt UnknownConstraintReferenceError) Type() ErrorType
type UnknownCustomDataTypeError ¶
func (UnknownCustomDataTypeError) Error ¶
func (ddt UnknownCustomDataTypeError) Error() string
func (UnknownCustomDataTypeError) Origin ¶
func (ddt UnknownCustomDataTypeError) Origin() (path string, line int)
func (UnknownCustomDataTypeError) Type ¶
func (ddt UnknownCustomDataTypeError) Type() ErrorType
type UnknownElementRequirementClusterError ¶
type UnknownElementRequirementClusterError struct {
Requirement *matter.ElementRequirement
}
func (UnknownElementRequirementClusterError) Error ¶
func (ddt UnknownElementRequirementClusterError) Error() string
func (UnknownElementRequirementClusterError) Origin ¶
func (ddt UnknownElementRequirementClusterError) Origin() (path string, line int)
func (UnknownElementRequirementClusterError) Type ¶
func (ddt UnknownElementRequirementClusterError) Type() ErrorType
type UnknownNamespaceTagRequirementError ¶ added in v1.5.46
type UnknownNamespaceTagRequirementError struct {
Requirement *matter.TagRequirement
}
func (UnknownNamespaceTagRequirementError) Error ¶ added in v1.5.46
func (ddt UnknownNamespaceTagRequirementError) Error() string
func (UnknownNamespaceTagRequirementError) Origin ¶ added in v1.5.46
func (ddt UnknownNamespaceTagRequirementError) Origin() (path string, line int)
func (UnknownNamespaceTagRequirementError) Type ¶ added in v1.5.46
func (ddt UnknownNamespaceTagRequirementError) Type() ErrorType
type UnknownSupersetError ¶
type UnknownSupersetError struct {
DeviceType *matter.DeviceType
}
func (UnknownSupersetError) Error ¶
func (ddt UnknownSupersetError) Error() string
func (UnknownSupersetError) Origin ¶
func (ddt UnknownSupersetError) Origin() (path string, line int)
func (UnknownSupersetError) Type ¶
func (ddt UnknownSupersetError) Type() ErrorType
type UnknownTagRequirementError ¶ added in v1.5.46
type UnknownTagRequirementError struct {
Requirement *matter.TagRequirement
}
func (UnknownTagRequirementError) Error ¶ added in v1.5.46
func (ddt UnknownTagRequirementError) Error() string
func (UnknownTagRequirementError) Origin ¶ added in v1.5.46
func (ddt UnknownTagRequirementError) Origin() (path string, line int)
func (UnknownTagRequirementError) Type ¶ added in v1.5.46
func (ddt UnknownTagRequirementError) Type() ErrorType
type UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError ¶
type UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError struct {
Requirement *matter.DeviceTypeClusterRequirement
}
func (UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError) Error ¶
func (ddt UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError) Error() string
func (UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError) Origin ¶
func (ddt UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError) Origin() (path string, line int)
func (UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError) Type ¶
func (ddt UnreferencedComposingDeviceTypeClusterRequirementDeviceTypeError) Type() ErrorType
type UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError ¶
type UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError struct {
Requirement *matter.DeviceTypeElementRequirement
}
func (UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError) Error ¶
func (ddt UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError) Error() string
func (UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError) Origin ¶
func (ddt UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError) Origin() (path string, line int)
func (UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError) Type ¶
func (ddt UnreferencedComposingDeviceTypeElementRequirementDeviceTypeError) Type() ErrorType
type UnreferencedConditionRequirementDeviceTypeError ¶ added in v1.5.39
type UnreferencedConditionRequirementDeviceTypeError struct {
Requirement *matter.ConditionRequirement
}
func (UnreferencedConditionRequirementDeviceTypeError) Error ¶ added in v1.5.39
func (ddt UnreferencedConditionRequirementDeviceTypeError) Error() string
func (UnreferencedConditionRequirementDeviceTypeError) Origin ¶ added in v1.5.39
func (ddt UnreferencedConditionRequirementDeviceTypeError) Origin() (path string, line int)
func (UnreferencedConditionRequirementDeviceTypeError) Type ¶ added in v1.5.39
func (ddt UnreferencedConditionRequirementDeviceTypeError) Type() ErrorType
type UnreferencedTagRequirementDeviceTypeError ¶ added in v1.5.45
type UnreferencedTagRequirementDeviceTypeError struct {
Requirement *matter.DeviceTypeTagRequirement
}
func (UnreferencedTagRequirementDeviceTypeError) Error ¶ added in v1.5.45
func (ddt UnreferencedTagRequirementDeviceTypeError) Error() string
func (UnreferencedTagRequirementDeviceTypeError) Origin ¶ added in v1.5.45
func (ddt UnreferencedTagRequirementDeviceTypeError) Origin() (path string, line int)
func (UnreferencedTagRequirementDeviceTypeError) Type ¶ added in v1.5.45
func (ddt UnreferencedTagRequirementDeviceTypeError) Type() ErrorType
type ViolationType ¶ added in v1.5.56
type ViolationType uint8
const ( ViolationTypeNone ViolationType = 0 ViolationTypeNonProvisional ViolationType = 1 << (iota - 1) ViolationTypeNotIfDefd ViolationNewParseError )
func (ViolationType) Has ¶ added in v1.5.56
func (vt ViolationType) Has(o ViolationType) bool
func (ViolationType) String ¶ added in v1.5.56
func (vt ViolationType) String() string
Source Files
¶
- access.go
- anchors.go
- attributes.go
- bitmap.go
- build.go
- cache.go
- cluster.go
- commands.go
- composition.go
- conditions.go
- conformance.go
- constraint.go
- datatypes.go
- devicetype.go
- doc.go
- entities.go
- enum.go
- errata.go
- error.go
- event.go
- feature.go
- field.go
- find.go
- global.go
- index.go
- library.go
- list.go
- namespace.go
- option.go
- overlay.go
- parse.go
- patch.go
- path.go
- pipeline.go
- quality.go
- read.go
- references.go
- refs.go
- requirements.go
- section.go
- source.go
- spec.go
- spec_set.go
- status.go
- struct.go
- table.go
- table_info.go
- target.go
- text.go
- tree.go
- type.go
- typedef.go
- validate.go
- violation.go
Click to show internal directories.
Click to hide internal directories.