-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.go
33 lines (27 loc) · 816 Bytes
/
schema.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// schema contains a manual XML mapping for the ietf-netconf-monitoring
// YANG schema needed to download YANG/YIN schema stored on a device.
package main
import "encoding/xml"
type DataType struct {
XMLName xml.Name `xml:"data"`
NetconfState NetconfStateType `xml:"netconf-state"`
}
type NetconfStateType struct {
Name string `xml:"xmlns,attr"`
Schemas SchemasType `xml:"schemas"`
}
type SchemasType struct {
SchemaList []SchemaType `xml:"schema"`
}
type SchemaType struct {
Identifier string `xml:"identifier"`
Version string `xml:"version"`
Format string `xml:"format"`
Namespace string `xml:"namespace"`
Location string `xml:"location"`
}
type SourceType struct {
XMLName xml.Name `xml:"data"`
Name string `xml:"xmlns,attr"`
Data string `xml:",chardata"`
}