-
Notifications
You must be signed in to change notification settings - Fork 15
/
structs_test.go
53 lines (44 loc) · 1.43 KB
/
structs_test.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
package lmdrouter
import "time"
type mockConst string
const (
mockConstOne mockConst = "one"
mockConstTwo mockConst = "two"
)
type Number string
const (
numberOne Number = "one"
numberTwo Number = "two"
numberThree Number = "three"
)
type mockListRequest struct {
ID string `lambda:"path.id"`
Page int64 `lambda:"query.page"`
PageSize int64 `lambda:"query.page_size"`
Terms []string `lambda:"query.terms"`
Numbers []float64 `lambda:"query.numbers"`
Const mockConst `lambda:"query.const"`
Bool bool `lambda:"query.bool"`
PBoolOne *bool `lambda:"query.pbool1"`
PBoolTwo *bool `lambda:"query.pbool2"`
Time *time.Time `lambda:"query.time"`
Alias stringAliasExample `lambda:"query.alias"`
AliasPtr *stringAliasExample `lambda:"query.alias_ptr"`
CommaSplit []Number `lambda:"query.commaSplit"`
Language string `lambda:"header.Accept-Language"`
Encoding []string `lambda:"header.Accept-Encoding"`
}
type mockGetRequest struct {
ID string `lambda:"path.id"`
ShowSomething bool `lambda:"query.show_something"`
}
type mockPostRequest struct {
ID string `lambda:"path.id"`
Name string `json:"name"`
Date time.Time `json:"date"`
}
type mockItem struct {
ID string
Name string
Date time.Time
}