-
Notifications
You must be signed in to change notification settings - Fork 0
/
portal_req.go
54 lines (45 loc) · 1.34 KB
/
portal_req.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package cmd
// APIM REST request/response structs
// A few details we need from the 'get instance' response
type apimDetails struct {
Properties struct {
MgmtURL string `json:"managementApiURL"`
PortalURL string `json:"developerPortalURL"`
HostnameConfigurations []struct {
Type string
Hostname string
}
}
}
// request body for the ApiManagementUserToken request
type apimTokenRequestProperties struct {
KeyType string `json:"keyType"`
Expiry string `json:"expiry"`
}
type apimTokenRequest struct {
Propties apimTokenRequestProperties `json:"properties"`
}
// response from ApiManagementUserToken request
type apimTokenRequestResponse struct {
Value string `json:"value"`
}
// response from the listSecrets request
type apimListSecretsResponse struct {
URL string `json:"containerSasURL"`
}
// response from contentTypes portal request
type apimPortalContentTypesResponse struct {
Value []apimPortalContentType `json:"value"`
}
// we only need the Id for now
type apimPortalContentType struct {
ID string `json:"id"`
}
// response from the contentItems portal reqiest
type apimPortalContentItemsResponse struct {
Value []interface{} `json:"value"`
}
// response from the contentItems portal reqiest but as a map
type apimPortalContentItemsResponseMap struct {
Value []map[string]interface{} `json:"value"`
}