-
Notifications
You must be signed in to change notification settings - Fork 124
/
mocks.go
64 lines (51 loc) · 991 Bytes
/
mocks.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
55
56
57
58
59
60
61
62
63
64
package model
import "time"
type MockModel struct {
FieldId string
FieldInt1 int
FieldInt2 int
FieldMap map[string]string
FieldStruct *MockSubStruct
}
type MockSubStruct struct {
SubInt int
}
func (m *MockModel) ToService() (interface{}, error) {
return nil, nil
}
func (m *MockModel) BuildFromService(in interface{}) error {
return nil
}
type MockScalars struct {
TimeType time.Time
MapType map[string]interface{}
AnyType interface{}
}
type MockEmbedded struct {
One MockLayerOne
}
type MockLayerOne struct {
Two MockLayerTwo
}
type MockLayerTwo struct {
SomeField *string
}
type MockTypes struct {
BoolType bool
BoolPtrType *bool
IntType int
IntPtrType *int
StringType string
StringPtrType *string
Uint64Type uint64
Uint64PtrType *uint64
Float64Type float64
Float64PtrType *float64
RuneType rune
RunePtrType *rune
}
type StructWithAliased struct {
Foo AliasedType
Bar string
}
type AliasedType string