Skip to content

Instantly share code, notes, and snippets.

@ikawaha
Last active March 9, 2020 15:15
Show Gist options
  • Save ikawaha/d8c9d2fca9728543954d3553be6980c3 to your computer and use it in GitHub Desktop.
Save ikawaha/d8c9d2fca9728543954d3553be6980c3 to your computer and use it in GitHub Desktop.
Goa v3 の(gRPC を含まない)最小限のデザインのサンプル
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