Implemented first pass of character and inventory services

This commit is contained in:
Brandon Watson
2023-08-14 19:22:40 -05:00
parent a9eed6f284
commit 6799b59f9c
9 changed files with 232 additions and 57 deletions

View File

@ -1,16 +1,17 @@
package design
import (
"crossnokaye-interview-assignment/design"
. "goa.design/goa/v3/dsl"
)
var _ = API("inventory", func() {
Title("Inventory Service")
Server("inventory", func() {
Host("localhost", func() {
URI("grpc://localhost:8081")
})
})
Host("localhost", func() {
URI("grpc://localhost:8081")
})
})
})
var _ = Service("inventory", func() {
@ -19,7 +20,7 @@ var _ = Service("inventory", func() {
// })
Method("addItem", func() {
Payload(Int)
Payload(design.InventoryRecord)
Result(Empty)
Error("NotFound")
Error("BadRequest")
@ -30,7 +31,7 @@ var _ = Service("inventory", func() {
})
Method("removeItem", func() {
Payload(Int)
Payload(design.InventoryRecord)
Result(Empty)
Error("NotFound")
Error("BadRequest")