-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmain.go
83 lines (74 loc) · 2.38 KB
/
main.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package main
import (
"flamingo.me/dingo"
"flamingo.me/graphql"
"flamingo.me/flamingo-commerce-adapter-standalone/commercesearch"
"flamingo.me/flamingo-commerce-adapter-standalone/csvindexing"
"flamingo.me/flamingo-commerce/v3/cart"
"flamingo.me/flamingo-commerce/v3/category"
"flamingo.me/flamingo-commerce/v3/checkout"
"flamingo.me/flamingo-commerce/v3/customer"
"flamingo.me/flamingo-commerce/v3/payment"
"flamingo.me/flamingo-commerce/v3/product"
"flamingo.me/flamingo/v3"
"flamingo.me/flamingo/v3/core/healthcheck"
"flamingo.me/flamingo/v3/core/locale"
"flamingo.me/flamingo/v3/core/requestlogger"
"flamingo.me/flamingo/v3/framework/config"
flamingoFramework "flamingo.me/flamingo/v3/framework/flamingo"
"flamingo.me/flamingo/v3/framework/opencensus"
"flamingo.me/flamingo/v3/framework/prefixrouter"
"flamingo.me/flamingo/v3/framework/systemendpoint"
"flamingo.me/form"
"flamingo.me/pugtemplate"
"flamingo.me/swagger"
projectGraphql "flamingo.me/commerce-demo-carotene/graphql"
)
//go:generate rm -f graphql/generated.go
//go:generate go run -tags graphql main.go graphql
//go:generate go run github.com/swaggo/swag/cmd/swag init --parseDependency=1 --generalInfo=main.go
// main is our entry point
// @title Flamingo Commerce Demo Shop
// @version 1.0
// @BasePath /en
// @license.name MIT
// @contact.name Flamingo
// @contact.url https://gitter.im/i-love-flamingo/community#
// @contact.email flamingo@aoe.com
func main() {
flamingo.App([]dingo.Module{
//flamingo framework modules:
new(requestlogger.Module), // requestlogger show request logs
new(prefixrouter.Module),
new(flamingoFramework.SessionModule),
new(locale.Module),
new(opencensus.Module),
new(systemendpoint.Module),
new(healthcheck.Module),
new(projectGraphql.Module),
//form module (required by commerce)
new(form.Module),
//flamingo-commerce modules
new(product.Module),
//new(price.Module),
new(category.Module),
new(cart.Module),
new(customer.Module),
new(payment.Module),
new(checkout.Module),
//flamingo-commerce-adpater-standalone modules:
new(commercesearch.Module),
new(commercesearch.CategoryModule),
new(commercesearch.SearchModule),
new(csvindexing.ProductModule),
//new(emailplaceorder.Module),
new(graphql.Module),
new(pugtemplate.Module),
new(swagger.Module),
}, flamingo.ChildAreas(
config.NewArea("csv", nil,
config.NewArea("de", nil),
),
),
)
}