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

@ -9,17 +9,19 @@ import (
var _ = API("character", func() {
Title("Character Srvice")
Server("character", func() {
Host("localhost", func() {
URI("grpc://localhost:8083")
})
})
Host("localhost", func() {
URI("grpc://localhost:8083")
})
})
})
var _ = Service("character", func() {
Description("A GRPC back service that handles CRUD operations for the characters and their attributes")
Method("getCharacter", func() {
Payload(Int)
Payload(func() {
Field(1, "id", Int)
})
Result(Character)
Error("NotFound")
Error("BadRequest")
@ -61,7 +63,9 @@ var _ = Service("character", func() {
})
Method("deleteCharacter", func() {
Payload(Int)
Payload(func() {
Field(1, "id", Int)
})
Result(Empty)
Error("NotFound")
Error("BadRequest")