/
bottle.go
executable file
·49 lines (39 loc) · 1.14 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
package main
import (
"goaTest/app"
"github.com/raphael/goa"
)
// 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 {
return nil
}
// Delete runs the delete action.
func (c *BottleController) Delete(ctx *app.DeleteBottleContext) error {
return nil
}
// List runs the list action.
func (c *BottleController) List(ctx *app.ListBottleContext) error {
res := app.BottleCollection{}
return ctx.OK(res, "default")
}
// Rate runs the rate action.
func (c *BottleController) Rate(ctx *app.RateBottleContext) error {
return nil
}
// Show runs the show action.
func (c *BottleController) Show(ctx *app.ShowBottleContext) error {
res := &app.Bottle{}
return ctx.OK(res, "default")
}
// Update runs the update action.
func (c *BottleController) Update(ctx *app.UpdateBottleContext) error {
return nil
}