Checking in cmd files | first attempt at linking up item service

This commit is contained in:
Brandon Watson
2023-08-13 19:26:45 -05:00
parent fd45b9e0f2
commit 98796d96fd
26 changed files with 1448 additions and 66 deletions

View File

@@ -9,11 +9,11 @@ import (
var _ = API("front", func() {
Title("API Front Service")
Description("An HTTP/JSON front service which provides an API to manipulate the Characters, their inventories, and the Items that exist")
Server("front", func() {
Host("localhost", func() {
URI("http://localhost:8000")
})
})
Server("front", func() {
Host("localhost", func() {
URI("http://localhost:8000")
})
})
})
var _ = Service("front", func() {
@@ -30,10 +30,6 @@ var _ = Service("front", func() {
Response(StatusBadRequest)
Response(StatusNotFound)
})
GRPC(func() {
Response(CodeOK)
})
})
// Method("listItems", func() {
@@ -50,10 +46,6 @@ var _ = Service("front", func() {
Response(StatusOK)
Response(StatusBadRequest)
})
GRPC(func() {
Response(CodeOK)
})
})
Method("updateItem", func() {
@@ -69,10 +61,6 @@ var _ = Service("front", func() {
Response(StatusBadRequest)
Response(StatusNotFound)
})
GRPC(func() {
Response(CodeOK)
})
})
Method("deleteItem", func() {
@@ -87,12 +75,6 @@ var _ = Service("front", func() {
Response(StatusBadRequest)
Response(StatusNotFound)
})
GRPC(func() {
Response(CodeOK)
Response("NotFound", CodeNotFound)
Response("BadRequest", CodeInvalidArgument)
})
})
Method("getCharacter", func() {
@@ -107,12 +89,6 @@ var _ = Service("front", func() {
Response(StatusBadRequest)
Response(StatusNotFound)
})
GRPC(func() {
Response(CodeOK)
Response("NotFound", CodeNotFound)
Response("BadRequest", CodeInvalidArgument)
})
})
// Method("listCharacters", func() {
@@ -131,12 +107,6 @@ var _ = Service("front", func() {
Response(StatusOK)
Response(StatusInternalServerError)
})
GRPC(func() {
Response(CodeOK)
Response("NotFound", CodeNotFound)
Response("BadRequest", CodeInvalidArgument)
})
})
Method("updateCharacter", func() {
@@ -152,12 +122,6 @@ var _ = Service("front", func() {
Response(StatusBadRequest)
Response(StatusNotFound)
})
GRPC(func() {
Response(CodeOK)
Response("NotFound", CodeNotFound)
Response("BadRequest", CodeInvalidArgument)
})
})
Method("deleteCharacter", func() {
@@ -172,12 +136,6 @@ var _ = Service("front", func() {
Response(StatusBadRequest)
Response(StatusNotFound)
})
GRPC(func() {
Response(CodeOK)
Response("NotFound", CodeNotFound)
Response("BadRequest", CodeInvalidArgument)
})
})
Method("addItemToInventory", func() {
@@ -191,10 +149,6 @@ var _ = Service("front", func() {
Response(StatusOK)
Response(StatusBadRequest)
})
GRPC(func() {
Response(CodeOK)
})
})
Method("removeItemFromInventory", func() {
@@ -208,12 +162,6 @@ var _ = Service("front", func() {
Response(StatusOK)
Response(StatusBadRequest)
})
GRPC(func() {
Response(CodeOK)
Response("NotFound", CodeNotFound)
Response("BadRequest", CodeInvalidArgument)
})
})
Files("/openapi.json", "./gen/http/openapi.json")