github.com/omniscale/go-osm@v0.3.1/parser/changeset/internal/osmxml/parser.go (about) 1 package osmxml 2 3 import ( 4 "time" 5 ) 6 7 type ChangeFile struct { 8 XMLName string `xml:"osm"` 9 Generator string `xml:"generator,attr"` 10 Changes []Changeset `xml:"changeset"` 11 } 12 13 type Changeset struct { 14 ID int64 `xml:"id,attr"` 15 CreatedAt time.Time `xml:"created_at,attr"` 16 ClosedAt time.Time `xml:"closed_at,attr"` 17 Open bool `xml:"open,attr"` 18 UserName string `xml:"user,attr"` 19 UserID int32 `xml:"uid,attr"` 20 NumChanges int32 `xml:"num_changes,attr"` 21 MinLon float64 `xml:"min_lon,attr"` 22 MinLat float64 `xml:"min_lat,attr"` 23 MaxLon float64 `xml:"max_lon,attr"` 24 MaxLat float64 `xml:"max_lat,attr"` 25 Comments []Comment `xml:"discussion>comment"` 26 Tags []Tag `xml:"tag"` 27 } 28 29 type Comment struct { 30 UserID int32 `xml:"uid,attr"` 31 UserName string `xml:"user,attr"` 32 Date time.Time `xml:"date,attr"` 33 Text string `xml:"text"` 34 } 35 36 type Tag struct { 37 Key string `xml:"k,attr"` 38 Value string `xml:"v,attr"` 39 }