-
Notifications
You must be signed in to change notification settings - Fork 1
/
golden.go
39 lines (33 loc) · 1.09 KB
/
golden.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
package productstest
import (
"github.com/athomecomar/athome/backend/products/ent"
"github.com/athomecomar/athome/pb/pbimages"
"github.com/athomecomar/xtest/xload"
)
func Init(gDraftLines *GoldenDraftLines, gDrafts *GoldenDrafts, gProducts *GoldenProducts, gPbUsers *GoldenPbUsers, gPbImages *GoldenPbImages) {
xload.DecodeJsonnet("drafts", gDrafts)
xload.DecodeJsonnet("products", gProducts)
xload.DecodeJsonnet("users", gPbUsers)
xload.DecodeJsonnet("images", gPbImages)
xload.DecodeJsonnet("draft_lines", gDraftLines)
}
type GoldenDraftLines struct {
Foo *variadicDraftLines `json:"foo,omitempty"`
Bar *variadicDraftLines `json:"bar,omitempty"`
}
type GoldenPbImages struct {
Foo *pbimages.Image
Bar *pbimages.Image
}
type GoldenPbUsers struct {
Consumers *variadicPbUsers `json:"consumers,omitempty"`
Merchants *variadicPbUsers `json:"merchants,omitempty"`
}
type GoldenDrafts struct {
Foo *ent.Draft `json:"foo,omitempty"`
Bar *ent.Draft `json:"bar,omitempty"`
}
type GoldenProducts struct {
Foo *variadicProducts `json:"foo,omitempty"`
Bar *variadicProducts `json:"bar,omitempty"`
}