-
Notifications
You must be signed in to change notification settings - Fork 0
/
bottle.go
37 lines (28 loc) · 868 Bytes
/
bottle.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
package main
import (
"github.com/goadesign/goa"
"go-playground/app"
)
// BottleController implements the bottle resource.
type BottleController struct {
*goa.Controller
}
// NewBottleController creates a bottle controller.
func NewBottleController(service *goa.Service) *BottleController {
return &BottleController{Controller: service.NewController("BottleController")}
}
// Create runs the create action.
func (c *BottleController) Create(ctx *app.CreateBottleContext) error {
// BottleController_Create: start_implement
// Put your logic here
return nil
// BottleController_Create: end_implement
}
// Show runs the show action.
func (c *BottleController) Show(ctx *app.ShowBottleContext) error {
// BottleController_Show: start_implement
// Put your logic here
res := &app.Bottle{}
return ctx.OK(res)
// BottleController_Show: end_implement
}