forked from lusis/go-rundeck
-
Notifications
You must be signed in to change notification settings - Fork 1
/
storage.go
40 lines (34 loc) · 1.17 KB
/
storage.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
34
35
36
37
38
39
40
package rundeck
import (
"encoding/xml"
)
type Resources struct {
Resources []Resource `xml:"resource"`
}
type Resource struct {
XMLName xml.Name `xml:"resource"`
Path string `xml:"path,attr"`
ResourceType string `xml:"type,attr"`
URL string `xml:"url,attr"`
Name string `xml:"name,omitempty"`
MetaData ResourceMeta `xml:"resource-meta,omitempty"`
Contents Contents `xml:"contents,omitempty"`
}
type Contents struct {
XMLName xml.Name `xml:"contents"`
Count int64 `xml:"count"`
Resources []Resource `xml:"resource"`
}
type ResourceMeta struct {
XMLName xml.Name `xml:"resource-meta"`
ContentType string `xml:"Rundeck-content-type"`
Size int64 `xml:"Rundeck-content-size"`
CreationTime string `xml:"Rundeck-content-creation-time"`
ModifyTime string `xml:"Rundeck-content-modify-time"`
AuthCreatedUsername string `xml:"Rundeck-auth-created-username"`
KeyType string `xml:"Rundeck-key-type"`
}
// returns the raw data associated with a storage item
//func (r *Resource) GetRaw() (data string, err error) {
//
//}