-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
38 lines (32 loc) · 1002 Bytes
/
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
//go:generate goagen bootstrap -d ChamaconektVisa/design
package main
import (
"ChamaconektVisa/app"
"github.com/goadesign/goa"
"github.com/goadesign/goa/middleware"
)
func main() {
// Create service
service := goa.New("ChamaconektVisa")
// Mount middleware
service.Use(middleware.RequestID())
service.Use(middleware.LogRequest(true))
service.Use(middleware.ErrorHandler(service, true))
service.Use(middleware.Recover())
// Mount "deposit" controller
c := NewDepositController(service)
app.MountDepositController(service, c)
// Mount "payment" controller
c2 := NewPaymentController(service)
app.MountPaymentController(service, c2)
// Mount "swagger" controller
c3 := NewSwaggerController(service)
app.MountSwaggerController(service, c3)
// Mount "withdrawal" controller
c4 := NewWithdrawalController(service)
app.MountWithdrawalController(service, c4)
// Start service
if err := service.ListenAndServe(":8080"); err != nil {
service.LogError("startup", "err", err)
}
}