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

Method toURLValues

cloudstack/TemplateService.go:2073–2182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2071}
2072
2073func (p *ListTemplatesParams) toURLValues() url.Values {
2074 u := url.Values{}
2075 if p.p == nil {
2076 return u
2077 }
2078 if v, found := p.p["account"]; found {
2079 u.Set("account", v.(string))
2080 }
2081 if v, found := p.p["arch"]; found {
2082 u.Set("arch", v.(string))
2083 }
2084 if v, found := p.p["details"]; found {
2085 vv := strings.Join(v.([]string), ",")
2086 u.Set("details", vv)
2087 }
2088 if v, found := p.p["domainid"]; found {
2089 u.Set("domainid", v.(string))
2090 }
2091 if v, found := p.p["extensionid"]; found {
2092 u.Set("extensionid", v.(string))
2093 }
2094 if v, found := p.p["forcks"]; found {
2095 vv := strconv.FormatBool(v.(bool))
2096 u.Set("forcks", vv)
2097 }
2098 if v, found := p.p["hypervisor"]; found {
2099 u.Set("hypervisor", v.(string))
2100 }
2101 if v, found := p.p["id"]; found {
2102 u.Set("id", v.(string))
2103 }
2104 if v, found := p.p["ids"]; found {
2105 vv := strings.Join(v.([]string), ",")
2106 u.Set("ids", vv)
2107 }
2108 if v, found := p.p["imagestoreid"]; found {
2109 u.Set("imagestoreid", v.(string))
2110 }
2111 if v, found := p.p["isready"]; found {
2112 vv := strconv.FormatBool(v.(bool))
2113 u.Set("isready", vv)
2114 }
2115 if v, found := p.p["isrecursive"]; found {
2116 vv := strconv.FormatBool(v.(bool))
2117 u.Set("isrecursive", vv)
2118 }
2119 if v, found := p.p["isvnf"]; found {
2120 vv := strconv.FormatBool(v.(bool))
2121 u.Set("isvnf", vv)
2122 }
2123 if v, found := p.p["keyword"]; found {
2124 u.Set("keyword", v.(string))
2125 }
2126 if v, found := p.p["listall"]; found {
2127 vv := strconv.FormatBool(v.(bool))
2128 u.Set("listall", vv)
2129 }
2130 if v, found := p.p["name"]; found {

Callers

nothing calls this directly

Calls 1

getSortedKeysFromMapFunction · 0.85

Tested by

no test coverage detected