/
parameters.go
36 lines (32 loc) · 1.59 KB
/
parameters.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
package apiendpoints
type Parameters struct {
APIChildParameters []*Parameters `json:"apiChildParameters"`
APIParameterID int `json:"apiParameterId"`
APIParameterRequired bool `json:"apiParameterRequired"`
APIParameterName string `json:"apiParameterName"`
APIParameterLocation APIParameterLocationValue `json:"apiParameterLocation"`
APIParameterType APIParameterTypeValue `json:"apiParameterType"`
APIParameterNotes *string `json:"apiParameterNotes"`
APIParamLogicID int `json:"apiParamLogicId"`
Array bool `json:"array"`
APIParameterRestriction struct {
RangeRestriction struct {
RangeMin int `json:"rangeMin"`
RangeMax int `json:"rangeMax"`
} `json:"rangeRestriction"`
} `json:"apiParameterRestriction"`
}
type APIParameterLocationValue string
type APIParameterTypeValue string
const (
APIParameterLocationHeader APIParameterLocationValue = "header"
APIParameterLocationCookie APIParameterLocationValue = "cookie"
APIParameterLocationQuery APIParameterLocationValue = "query"
APIParameterLocationBody APIParameterLocationValue = "body"
APIParameterTypeString APIParameterTypeValue = "string"
APIParameterTypeInteger APIParameterTypeValue = "integer"
APIParameterTypeNumber APIParameterTypeValue = "number"
APIParameterTypeBoolean APIParameterTypeValue = "boolean"
APIParameterTypeJson APIParameterTypeValue = "json/xml"
APIParameterTypeXml APIParameterTypeValue = "json/xml"
)