From 5be3ae03d4ac5eecb79423138a88b34804ca947b Mon Sep 17 00:00:00 2001 From: Ryan McGuire Date: Tue, 8 Jul 2025 16:47:21 -0400 Subject: [PATCH] move to class-server --- .gitea/workflows/ci.yml | 6 +- Dockerfile | 2 +- Makefile | 2 +- contrib/class-server.swagger.json | 447 ++++++++++++++++++++++++++++++ helm/Chart.yaml | 6 +- 5 files changed, 455 insertions(+), 8 deletions(-) create mode 100644 contrib/class-server.swagger.json diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9d1626f..f687224 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,9 +5,9 @@ on: branches: ["main"] env: - PACKAGE_NAME: go-server-with-otel + PACKAGE_NAME: class-server BINARY_PATH: bin - BINARY_NAME: go-server-with-otel + BINARY_NAME: class-server GO_MOD_PATH: gitea.libretechconsulting.com/rmcguire/class-server GO_GIT_HOST: gitea.libretechconsulting.com VER_PKG: gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version @@ -15,7 +15,7 @@ env: PLATFORMS: linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 DOCKER_REGISTRY: gitea.libretechconsulting.com DOCKER_USER: rmcguire - DOCKER_REPO: rmcguire/go-server-with-otel + DOCKER_REPO: rmcguire/class-server DOCKER_IMG: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO }} CHART_DIR: helm/ diff --git a/Dockerfile b/Dockerfile index c2b59e1..171d6b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG GOPROXY ARG GONOSUMDB=gitea.libretechconsulting.com ARG VER_PKG=gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version ARG VERSION=(devel) -ARG APP_NAME=demo-app +ARG APP_NAME=class-server COPY ./go.mod ./go.sum ./ RUN go mod download diff --git a/Makefile b/Makefile index a62498f..c38d9ae 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: all test build docker install clean proto check_protoc -CMD_NAME := go-server-with-otel +CMD_NAME := class-server VERSION ?= development API_DIR := api/ SCHEMA_DIR := contrib/ diff --git a/contrib/class-server.swagger.json b/contrib/class-server.swagger.json new file mode 100644 index 0000000..62f5093 --- /dev/null +++ b/contrib/class-server.swagger.json @@ -0,0 +1,447 @@ +{ + "swagger": "2.0", + "info": { + "title": "class/v1alpha1/class.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ClassService" + }, + { + "name": "DemoAppService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1alpha1/class/logo": { + "get": { + "operationId": "ClassService_GetClassLogo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1GetClassLogoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "font", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "FONT_UNSPECIFIED", + "FONT_3X5", + "FONT_5LINEOBLIQUE", + "FONT_ACROBATIC", + "FONT_ALLIGATOR", + "FONT_ALLIGATOR2", + "FONT_ALPHABET", + "FONT_AVATAR", + "FONT_BANNER", + "FONT_BANNER3", + "FONT_BANNER4", + "FONT_BARBWIRE", + "FONT_BASIC", + "FONT_BELL", + "FONT_BIG", + "FONT_BIGCHIEF", + "FONT_BINARY", + "FONT_BLOCK", + "FONT_BUBBLE", + "FONT_BULBHEAD", + "FONT_CALGPHY2", + "FONT_CALIGRAPHY", + "FONT_CATWALK", + "FONT_CHUNKY", + "FONT_COINSTAK", + "FONT_COLOSSAL", + "FONT_COMPUTER", + "FONT_CONTESSA", + "FONT_CONTRAST", + "FONT_COSMIC", + "FONT_COSMIKE", + "FONT_CRICKET", + "FONT_CURSIVE", + "FONT_CYBERLARGE", + "FONT_CYBERMEDIUM", + "FONT_CYBERSMALL", + "FONT_DIAMOND", + "FONT_DIGITAL", + "FONT_DOH", + "FONT_DOOM", + "FONT_DOTMATRIX", + "FONT_DRPEPPER", + "FONT_EFTICHESS", + "FONT_EFTIFONT", + "FONT_EFTIPITI", + "FONT_EFTIROBOT", + "FONT_EFTITALIC", + "FONT_EFTIWALL", + "FONT_EFTIWATER", + "FONT_EPIC", + "FONT_FENDER", + "FONT_FOURTOPS", + "FONT_FUZZY", + "FONT_GOOFY", + "FONT_GOTHIC", + "FONT_GRAFFITI", + "FONT_HOLLYWOOD", + "FONT_INVITA", + "FONT_ISOMETRIC1", + "FONT_ISOMETRIC2", + "FONT_ISOMETRIC3", + "FONT_ISOMETRIC4", + "FONT_ITALIC", + "FONT_IVRIT", + "FONT_JAZMINE", + "FONT_JERUSALEM", + "FONT_KATAKANA", + "FONT_KBAN", + "FONT_LARRY3D", + "FONT_LCD", + "FONT_LEAN", + "FONT_LETTERS", + "FONT_LINUX", + "FONT_LOCKERGNOME", + "FONT_MADRID", + "FONT_MARQUEE", + "FONT_MAXFOUR", + "FONT_MIKE", + "FONT_MINI", + "FONT_MIRROR", + "FONT_MNEMONIC", + "FONT_MORSE", + "FONT_MOSCOW", + "FONT_NANCYJ", + "FONT_NIPPLES", + "FONT_NTGREEK", + "FONT_O8", + "FONT_OGRE", + "FONT_PAWP", + "FONT_PEAKS", + "FONT_PEBBLES", + "FONT_PEPPER", + "FONT_POISON", + "FONT_PUFFY", + "FONT_PYRAMID", + "FONT_RECTANGLES", + "FONT_RELIEF", + "FONT_RELIEF2", + "FONT_REV", + "FONT_ROMAN", + "FONT_ROT13", + "FONT_ROUNDED", + "FONT_ROWANCAP", + "FONT_ROZZO", + "FONT_RUNIC", + "FONT_RUNYC", + "FONT_SBLOOD", + "FONT_SCRIPT", + "FONT_SERIFCAP", + "FONT_SHADOW", + "FONT_SHORT", + "FONT_SLANT", + "FONT_SLIDE", + "FONT_SLSCRIPT", + "FONT_SMALL", + "FONT_SMISOME1", + "FONT_SMKEYBOARD", + "FONT_SMSCRIPT", + "FONT_SMSHADOW", + "FONT_SMSLANT", + "FONT_SMTENGWAR", + "FONT_SPEED", + "FONT_STAMPATELLO", + "FONT_STANDARD", + "FONT_STARWARS", + "FONT_STELLAR", + "FONT_STOP", + "FONT_STRAIGHT", + "FONT_TANJA", + "FONT_TENGWAR", + "FONT_TERM", + "FONT_THICK", + "FONT_THIN", + "FONT_THREEPOINT", + "FONT_TICKS", + "FONT_TICKSSLANT", + "FONT_TOMBSTONE", + "FONT_TREK", + "FONT_TSALAGI", + "FONT_TWOPOINT", + "FONT_UNIVERS", + "FONT_USAFLAG", + "FONT_WAVY", + "FONT_WEIRD" + ], + "default": "FONT_UNSPECIFIED" + }, + { + "name": "includeString", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "ClassService" + ] + } + }, + "/v1alpha1/demo": { + "get": { + "operationId": "DemoAppService_GetDemo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1GetDemoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "language", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "DemoAppService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1alpha1Font": { + "type": "string", + "enum": [ + "FONT_UNSPECIFIED", + "FONT_3X5", + "FONT_5LINEOBLIQUE", + "FONT_ACROBATIC", + "FONT_ALLIGATOR", + "FONT_ALLIGATOR2", + "FONT_ALPHABET", + "FONT_AVATAR", + "FONT_BANNER", + "FONT_BANNER3", + "FONT_BANNER4", + "FONT_BARBWIRE", + "FONT_BASIC", + "FONT_BELL", + "FONT_BIG", + "FONT_BIGCHIEF", + "FONT_BINARY", + "FONT_BLOCK", + "FONT_BUBBLE", + "FONT_BULBHEAD", + "FONT_CALGPHY2", + "FONT_CALIGRAPHY", + "FONT_CATWALK", + "FONT_CHUNKY", + "FONT_COINSTAK", + "FONT_COLOSSAL", + "FONT_COMPUTER", + "FONT_CONTESSA", + "FONT_CONTRAST", + "FONT_COSMIC", + "FONT_COSMIKE", + "FONT_CRICKET", + "FONT_CURSIVE", + "FONT_CYBERLARGE", + "FONT_CYBERMEDIUM", + "FONT_CYBERSMALL", + "FONT_DIAMOND", + "FONT_DIGITAL", + "FONT_DOH", + "FONT_DOOM", + "FONT_DOTMATRIX", + "FONT_DRPEPPER", + "FONT_EFTICHESS", + "FONT_EFTIFONT", + "FONT_EFTIPITI", + "FONT_EFTIROBOT", + "FONT_EFTITALIC", + "FONT_EFTIWALL", + "FONT_EFTIWATER", + "FONT_EPIC", + "FONT_FENDER", + "FONT_FOURTOPS", + "FONT_FUZZY", + "FONT_GOOFY", + "FONT_GOTHIC", + "FONT_GRAFFITI", + "FONT_HOLLYWOOD", + "FONT_INVITA", + "FONT_ISOMETRIC1", + "FONT_ISOMETRIC2", + "FONT_ISOMETRIC3", + "FONT_ISOMETRIC4", + "FONT_ITALIC", + "FONT_IVRIT", + "FONT_JAZMINE", + "FONT_JERUSALEM", + "FONT_KATAKANA", + "FONT_KBAN", + "FONT_LARRY3D", + "FONT_LCD", + "FONT_LEAN", + "FONT_LETTERS", + "FONT_LINUX", + "FONT_LOCKERGNOME", + "FONT_MADRID", + "FONT_MARQUEE", + "FONT_MAXFOUR", + "FONT_MIKE", + "FONT_MINI", + "FONT_MIRROR", + "FONT_MNEMONIC", + "FONT_MORSE", + "FONT_MOSCOW", + "FONT_NANCYJ", + "FONT_NIPPLES", + "FONT_NTGREEK", + "FONT_O8", + "FONT_OGRE", + "FONT_PAWP", + "FONT_PEAKS", + "FONT_PEBBLES", + "FONT_PEPPER", + "FONT_POISON", + "FONT_PUFFY", + "FONT_PYRAMID", + "FONT_RECTANGLES", + "FONT_RELIEF", + "FONT_RELIEF2", + "FONT_REV", + "FONT_ROMAN", + "FONT_ROT13", + "FONT_ROUNDED", + "FONT_ROWANCAP", + "FONT_ROZZO", + "FONT_RUNIC", + "FONT_RUNYC", + "FONT_SBLOOD", + "FONT_SCRIPT", + "FONT_SERIFCAP", + "FONT_SHADOW", + "FONT_SHORT", + "FONT_SLANT", + "FONT_SLIDE", + "FONT_SLSCRIPT", + "FONT_SMALL", + "FONT_SMISOME1", + "FONT_SMKEYBOARD", + "FONT_SMSCRIPT", + "FONT_SMSHADOW", + "FONT_SMSLANT", + "FONT_SMTENGWAR", + "FONT_SPEED", + "FONT_STAMPATELLO", + "FONT_STANDARD", + "FONT_STARWARS", + "FONT_STELLAR", + "FONT_STOP", + "FONT_STRAIGHT", + "FONT_TANJA", + "FONT_TENGWAR", + "FONT_TERM", + "FONT_THICK", + "FONT_THIN", + "FONT_THREEPOINT", + "FONT_TICKS", + "FONT_TICKSSLANT", + "FONT_TOMBSTONE", + "FONT_TREK", + "FONT_TSALAGI", + "FONT_TWOPOINT", + "FONT_UNIVERS", + "FONT_USAFLAG", + "FONT_WAVY", + "FONT_WEIRD" + ], + "default": "FONT_UNSPECIFIED" + }, + "v1alpha1GetClassLogoResponse": { + "type": "object", + "properties": { + "logoBytes": { + "type": "string", + "format": "byte" + }, + "logoString": { + "type": "string" + } + } + }, + "v1alpha1GetDemoResponse": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "fact": { + "type": "string" + }, + "source": { + "type": "string" + }, + "language": { + "type": "string" + } + }, + "title": "Returns a randome fact, because this is a demo app\nso what else do we do?" + } + } +} diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 4a2e818..ce9eb6f 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: class-app +name: class-server description: Class GRPC # A chart can be either an 'application' or a 'library' chart. @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v0.1.0" +appVersion: "v0.1.1" dependencies: - name: hull