-
Notifications
You must be signed in to change notification settings - Fork 0
/
comment.go
38 lines (28 loc) · 893 Bytes
/
comment.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
package main
import (
"forent_api/app"
"github.com/goadesign/goa"
)
// CommentController implements the comment resource.
type CommentController struct {
*goa.Controller
}
// NewCommentController creates a comment controller.
func NewCommentController(service *goa.Service) *CommentController {
return &CommentController{Controller: service.NewController("CommentController")}
}
// Create runs the create action.
func (c *CommentController) Create(ctx *app.CreateCommentContext) error {
// CommentController_Create: start_implement
// Put your logic here
return nil
// CommentController_Create: end_implement
}
// List runs the list action.
func (c *CommentController) List(ctx *app.ListCommentContext) error {
// CommentController_List: start_implement
// Put your logic here
res := app.CommentCollection{}
return ctx.OK(res)
// CommentController_List: end_implement
}