-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.go
35 lines (29 loc) · 907 Bytes
/
index.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
package main
import (
"github.com/GwentAPI/gwentapi/app"
"github.com/GwentAPI/gwentapi/helpers"
"github.com/goadesign/goa"
)
// IndexController implements the index resource.
type IndexController struct {
*goa.Controller
}
// NewIndexController creates a index controller.
func NewIndexController(service *goa.Service) *IndexController {
return &IndexController{Controller: service.NewController("IndexController")}
}
// Show runs the show action.
func (c *IndexController) Show(ctx *app.ShowIndexContext) error {
// IndexController_Show: start_implement
// IndexController_Show: end_implement
res := &app.GwentapiResource{
Cards: helpers.CardURL(""),
Factions: helpers.FactionURL(""),
Rarities: helpers.RarityURL(""),
Categories: helpers.CategoryURL(""),
Groups: helpers.GroupURL(""),
Swagger: helpers.SwaggerURL(),
Version: version,
}
return ctx.OK(res)
}