Splitting design into separate services

This commit is contained in:
Brandon Watson
2023-08-10 13:14:38 -05:00
parent 2f149f2c6d
commit 54c2632cec
15 changed files with 699 additions and 235 deletions

View File

@ -0,0 +1,44 @@
package design
import (
. "goa.design/goa/v3/dsl"
)
var _ = API("inventory", func() {
Title("Inventory Service")
Server("inventory", func() {
Host("localhost", func() {
URI("grpc://localhost:8081")
})
})
})
var _ = Service("inventory", func() {
Description("A GRPC back service that handles CRUD operations for the characters inventories")
// Method("listItems", func() {
// })
Method("addItem", func() {
Payload(Int)
Result(Empty)
Error("NotFound")
Error("BadRequest")
GRPC(func() {
Response(CodeOK)
})
})
Method("removeItem", func() {
Payload(Int)
Result(Empty)
Error("NotFound")
Error("BadRequest")
GRPC(func() {
Response(CodeOK)
Response("NotFound", CodeNotFound)
Response("BadRequest", CodeInvalidArgument)
})
})
})