Implemented first pass of character and inventory services
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user