MCPcopy Index your code
hub / github.com/apache/cloudstack-go / toURLValues

Method toURLValues

cloudstack/GuestOSService.go:64–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62}
63
64func (p *AddGuestOsParams) toURLValues() url.Values {
65 u := url.Values{}
66 if p.p == nil {
67 return u
68 }
69 if v, found := p.p["details"]; found {
70 m := v.(map[string]string)
71 for i, k := range getSortedKeysFromMap(m) {
72 u.Set(fmt.Sprintf("details[%d].key", i), k)
73 u.Set(fmt.Sprintf("details[%d].value", i), m[k])
74 }
75 }
76 if v, found := p.p["forDisplay"]; found {
77 vv := strconv.FormatBool(v.(bool))
78 u.Set("forDisplay", vv)
79 }
80 if v, found := p.p["name"]; found {
81 u.Set("name", v.(string))
82 }
83 if v, found := p.p["oscategoryid"]; found {
84 u.Set("oscategoryid", v.(string))
85 }
86 if v, found := p.p["osdisplayname"]; found {
87 u.Set("osdisplayname", v.(string))
88 }
89 return u
90}
91
92func (p *AddGuestOsParams) SetDetails(v map[string]string) {
93 if p.p == nil {

Callers 10

AddGuestOsMethod · 0.45
AddGuestOsMappingMethod · 0.45
ListGuestOsMappingMethod · 0.45
ListOsCategoriesMethod · 0.45
ListOsTypesMethod · 0.45
RemoveGuestOsMethod · 0.45
RemoveGuestOsMappingMethod · 0.45
UpdateGuestOsMethod · 0.45
UpdateGuestOsMappingMethod · 0.45

Calls 1

getSortedKeysFromMapFunction · 0.85

Tested by

no test coverage detected