Documentation
¶
Index ¶
- type Bibliography
- type Boolean
- type DataModel
- type DataType
- type DataTypeRef
- type DateTime
- type Document
- type Enumeration
- type List
- type Object
- type Parameter
- type ParameterRef
- type Pattern
- type Range
- type Reference
- type Size
- type StringCons
- type StringType
- type Syntax
- type UniqueKey
- type UnsignedInt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bibliography ¶
type Bibliography struct {
References []Reference `xml:"reference"`
}
Bibliography contains references used in the document
type DataModel ¶
type DataModel struct {
XMLName xml.Name `xml:"model"`
Name string `xml:"name,attr"`
Description string `xml:"description,omitempty"`
Version string `xml:"version,attr,omitempty"`
Objects []Object `xml:"object"`
Parameters []Parameter `xml:"parameter"`
}
DataModel represents a CWMP data model
type DataType ¶
type DataType struct {
Name string `xml:"name,attr"`
Description string `xml:"description,omitempty"`
String *StringType `xml:"string,omitempty"`
}
DataType represents a custom data type definition
type DataTypeRef ¶
type DataTypeRef struct {
Ref string `xml:"ref,attr"`
}
DataTypeRef references a custom data type
type Document ¶
type Document struct {
XMLName xml.Name `xml:"document"`
Xmlns string `xml:"xmlns,attr,omitempty"`
Spec string `xml:"spec,attr,omitempty"`
DataTypes []DataType `xml:"dataType"`
Bibliography Bibliography `xml:"bibliography"`
Models []DataModel `xml:"model"`
}
Document represents the top-level XML element in a CWMP data model file
type Enumeration ¶
type Enumeration struct {
Value string `xml:"value,attr"`
Optional string `xml:"optional,attr,omitempty"`
}
Enumeration defines an enum value
type Object ¶
type Object struct {
Name string `xml:"name,attr"`
Description string `xml:"description,omitempty"`
Access string `xml:"access,attr,omitempty"`
MinEntries string `xml:"minEntries,attr,omitempty"`
MaxEntries string `xml:"maxEntries,attr,omitempty"`
NumEntriesParameter string `xml:"numEntriesParameter,attr,omitempty"`
EnableParameter string `xml:"enableParameter,attr,omitempty"`
UniqueKeys []UniqueKey `xml:"uniqueKey"`
Objects []Object `xml:"object"`
Parameters []Parameter `xml:"parameter"`
MultiInstance bool // Derived field for code generation
Path string // Full path including parent object paths
HasIndexPlaceholder bool // Whether the path contains an {i} placeholder
ParentPath string // Path to parent object
BaseName string // Name without the trailing dot (if any)
}
Object represents a CWMP object
func (*Object) IsMultiInstance ¶
IsMultiInstance returns true if this object can have multiple instances
type Parameter ¶
type Parameter struct {
Name string `xml:"name,attr"`
Description string `xml:"description,omitempty"`
Access string `xml:"access,attr,omitempty"`
Syntax Syntax `xml:"syntax"`
Type string // Derived field for code generation
ParentPath string // Path to parent object
FullPath string // Complete path including parent
}
Parameter represents a CWMP parameter
func (*Parameter) GetFullPath ¶
GetFullPath returns the full path to this parameter including parent paths
type ParameterRef ¶
type ParameterRef struct {
Ref string `xml:"ref,attr"`
}
ParameterRef is a reference to a parameter
type Range ¶
type Range struct {
MinInclusive string `xml:"minInclusive,attr,omitempty"`
MaxInclusive string `xml:"maxInclusive,attr,omitempty"`
Min string `xml:"min,attr,omitempty"`
Max string `xml:"max,attr,omitempty"`
}
Range defines min/max values for a parameter
type Reference ¶
type Reference struct {
ID string `xml:"id,attr"`
Name string `xml:"name"`
Title string `xml:"title,omitempty"`
Organization string `xml:"organization,omitempty"`
Category string `xml:"category,omitempty"`
Date string `xml:"date,omitempty"`
Hyperlink string `xml:"hyperlink,omitempty"`
}
Reference represents a bibliographic reference
type StringCons ¶
type StringCons struct {
Size *Size `xml:"size,omitempty"`
Enumeration []Enumeration `xml:"enumeration,omitempty"`
}
StringCons defines string constraints
type StringType ¶
type StringType struct {
Size *Size `xml:"size,omitempty"`
Pattern []Pattern `xml:"pattern,omitempty"`
}
StringType represents string data type constraints
type Syntax ¶
type Syntax struct {
Hidden string `xml:"hidden,attr,omitempty"`
Default string `xml:"default,omitempty"`
List *List `xml:"list,omitempty"`
String *StringCons `xml:"string,omitempty"`
Boolean *Boolean `xml:"boolean,omitempty"`
DateTime *DateTime `xml:"dateTime,omitempty"`
UnsignedInt *UnsignedInt `xml:"unsignedInt,omitempty"`
DataTypeRef *DataTypeRef `xml:"dataType,omitempty"`
}
Syntax defines the value constraints for a parameter
type UniqueKey ¶
type UniqueKey struct {
Parameters []ParameterRef `xml:"parameter"`
}
UniqueKey represents a unique key constraint
type UnsignedInt ¶
type UnsignedInt struct {
Range *Range `xml:"range,omitempty"`
}
UnsignedInt represents an unsignedInt parameter type