Last active
March 9, 2020 15:15
-
-
Save ikawaha/d8c9d2fca9728543954d3553be6980c3 to your computer and use it in GitHub Desktop.
Goa v3 の(gRPC を含まない)最小限のデザインのサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package design | |
import ( | |
. "goa.design/goa/v3/dsl" | |
) | |
var _ = Service("calc", func() { | |
Method("add", func() { | |
Payload(func() { | |
Attribute("a", Int, "Left operand") | |
Attribute("b", Int, "Right operand") | |
Required("a", "b") | |
}) | |
Result(Int) | |
HTTP(func() { | |
GET("/add/{a}/{b}") | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment