7
type ImageProperties map[string]string
9
type ImageAliasesEntry struct {
10
Name string `json:"name"`
11
Description string `json:"description"`
12
Target string `json:"target"`
15
type ImageAliases []ImageAliasesEntry
17
type ImageAlias struct {
18
Name string `json:"name"`
19
Description string `json:"description"`
22
type ImageSource struct {
23
Server string `json:"server"`
24
Protocol string `json:"protocol"`
25
Certificate string `json:"certificate"`
26
Alias string `json:"alias"`
29
type ImageInfo struct {
30
Aliases []ImageAlias `json:"aliases"`
31
Architecture string `json:"architecture"`
32
Cached bool `json:"cached"`
33
Filename string `json:"filename"`
34
Fingerprint string `json:"fingerprint"`
35
Properties map[string]string `json:"properties"`
36
Public bool `json:"public"`
37
Size int64 `json:"size"`
39
AutoUpdate bool `json:"auto_update"`
40
Source *ImageSource `json:"update_source,omitempty"`
42
CreationDate time.Time `json:"created_at"`
43
ExpiryDate time.Time `json:"expires_at"`
44
LastUsedDate time.Time `json:"last_used_at"`
45
UploadDate time.Time `json:"uploaded_at"`
49
* BriefImageInfo contains a subset of the fields in
50
* ImageInfo, namely those which a user may update
52
type BriefImageInfo struct {
53
AutoUpdate bool `json:"auto_update"`
54
Properties map[string]string `json:"properties"`
55
Public bool `json:"public"`
58
func (i *ImageInfo) Brief() BriefImageInfo {
59
retstate := BriefImageInfo{
60
AutoUpdate: i.AutoUpdate,
61
Properties: i.Properties,