15 Commits
v0.1.0 ... main

Author SHA1 Message Date
7e78b271f4 add opts struct to class logo method
All checks were successful
Build and Publish / check-chart (push) Successful in 14s
Build and Publish / helm-release (push) Successful in 59s
Build and Publish / release (push) Successful in 3m46s
2025-07-08 20:44:24 -04:00
d5abda89a1 update Dockerfile
All checks were successful
Build and Publish / check-chart (push) Successful in 16s
Build and Publish / helm-release (push) Successful in 52s
Build and Publish / release (push) Successful in 3m44s
2025-07-08 17:13:29 -04:00
02dc08fb1e update Dockerfile 2025-07-08 17:13:07 -04:00
ac8d62a98e update Dockerfile
All checks were successful
Build and Publish / check-chart (push) Successful in 13s
Build and Publish / helm-release (push) Has been skipped
Build and Publish / release (push) Successful in 3m36s
2025-07-08 17:04:34 -04:00
e4f099ffc0 bump chart
Some checks failed
Build and Publish / check-chart (push) Successful in 12s
Build and Publish / helm-release (push) Successful in 54s
Build and Publish / release (push) Failing after 3m33s
2025-07-08 16:59:40 -04:00
ff4ed783ac move helm out of lfs
All checks were successful
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 11s
Build and Publish / helm-release (push) Has been skipped
2025-07-08 16:58:00 -04:00
66b8a66ee7 move helm out of lfs
All checks were successful
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 10s
Build and Publish / helm-release (push) Has been skipped
2025-07-08 16:54:22 -04:00
dc00075412 move helm out of lfs
All checks were successful
Build and Publish / helm-release (push) Has been skipped
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 10s
2025-07-08 16:52:53 -04:00
f40e36b521 Delete helm/charts/hull-1.32.2.tgz
All checks were successful
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 11s
Build and Publish / helm-release (push) Has been skipped
2025-07-08 20:51:47 +00:00
1c68787811 move helm out of lfs
All checks were successful
Build and Publish / helm-release (push) Has been skipped
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 10s
2025-07-08 16:50:24 -04:00
b3d88571d2 move helm out of lfs
Some checks failed
Build and Publish / check-chart (push) Successful in 11s
Build and Publish / release (push) Has been skipped
Build and Publish / helm-release (push) Has been cancelled
2025-07-08 16:50:07 -04:00
5be3ae03d4 move to class-server
Some checks failed
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 11s
Build and Publish / helm-release (push) Failing after 16s
2025-07-08 16:47:21 -04:00
c5744ab561 vendor hull
Some checks failed
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 10s
Build and Publish / helm-release (push) Failing after 19s
2025-07-08 16:40:57 -04:00
ee9cad4715 vendor hull
All checks were successful
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 11s
Build and Publish / helm-release (push) Has been skipped
2025-07-08 16:37:42 -04:00
8756233291 class app helm
Some checks failed
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 17s
Build and Publish / helm-release (push) Failing after 22s
2025-07-08 16:32:01 -04:00
8 changed files with 482 additions and 18 deletions

View File

@ -5,9 +5,9 @@ on:
branches: ["main"] branches: ["main"]
env: env:
PACKAGE_NAME: go-server-with-otel PACKAGE_NAME: class-server
BINARY_PATH: bin BINARY_PATH: bin
BINARY_NAME: go-server-with-otel BINARY_NAME: class-server
GO_MOD_PATH: gitea.libretechconsulting.com/rmcguire/class-server GO_MOD_PATH: gitea.libretechconsulting.com/rmcguire/class-server
GO_GIT_HOST: gitea.libretechconsulting.com GO_GIT_HOST: gitea.libretechconsulting.com
VER_PKG: gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version 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 PLATFORMS: linux/amd64 linux/arm64 darwin/amd64 darwin/arm64
DOCKER_REGISTRY: gitea.libretechconsulting.com DOCKER_REGISTRY: gitea.libretechconsulting.com
DOCKER_USER: rmcguire DOCKER_USER: rmcguire
DOCKER_REPO: rmcguire/go-server-with-otel DOCKER_REPO: rmcguire/class-server
DOCKER_IMG: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO }} DOCKER_IMG: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO }}
CHART_DIR: helm/ CHART_DIR: helm/

View File

@ -7,7 +7,7 @@ ARG GOPROXY
ARG GONOSUMDB=gitea.libretechconsulting.com ARG GONOSUMDB=gitea.libretechconsulting.com
ARG VER_PKG=gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version ARG VER_PKG=gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version
ARG VERSION=(devel) ARG VERSION=(devel)
ARG APP_NAME=demo-app ARG APP_NAME=class-server
COPY ./go.mod ./go.sum ./ COPY ./go.mod ./go.sum ./
RUN go mod download RUN go mod download
@ -17,11 +17,11 @@ RUN go build -C . -v -ldflags "-extldflags '-static' -X ${VER_PKG}=${VERSION}" -
FROM alpine:latest FROM alpine:latest
ARG APP_NAME=demo-app ARG APP_NAME=class-server
WORKDIR /app WORKDIR /app
USER 100:101 USER 100:101
COPY --from=build --chown=100:101 /app/${APP_NAME} /app/ COPY --from=build --chown=100:101 /app/${APP_NAME} /app/app
ENTRYPOINT [ "/app/${APP_NAME}" ] ENTRYPOINT [ "/app/app" ]

View File

@ -1,6 +1,6 @@
.PHONY: all test build docker install clean proto check_protoc .PHONY: all test build docker install clean proto check_protoc
CMD_NAME := go-server-with-otel CMD_NAME := class-server
VERSION ?= development VERSION ?= development
API_DIR := api/ API_DIR := api/
SCHEMA_DIR := contrib/ SCHEMA_DIR := contrib/

View File

@ -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?"
}
}
}

View File

@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: go-server-with-otel name: class-server
description: Golang HTTP and GRPC server with OTEL description: Class GRPC
# A chart can be either an 'application' or a 'library' chart. # 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 # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0 version: 0.1.4
# This is the version number of the application being deployed. This version number should be # 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 # 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. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "v0.1.0" appVersion: "v0.2.0"
dependencies: dependencies:
- name: hull - name: hull

BIN
helm/charts/hull-1.32.2.tgz Normal file

Binary file not shown.

View File

@ -23,6 +23,7 @@ import (
optsgrpc "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/grpc/opts" optsgrpc "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/grpc/opts"
optshttp "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/http/opts" optshttp "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/http/opts"
class "gitea.libretechconsulting.com/rmcguire/class-server/api/class/v1alpha1"
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/classgrpc" "gitea.libretechconsulting.com/rmcguire/class-server/pkg/classgrpc"
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/config" "gitea.libretechconsulting.com/rmcguire/class-server/pkg/config"
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/demogrpc" "gitea.libretechconsulting.com/rmcguire/class-server/pkg/demogrpc"
@ -52,7 +53,11 @@ func main() {
demoHTTP := demohttp.NewDemoHTTPServer(ctx, demoApp) demoHTTP := demohttp.NewDemoHTTPServer(ctx, demoApp)
demoGRPC := demogrpc.NewDemoGRPCServer(ctx, demoApp) demoGRPC := demogrpc.NewDemoGRPCServer(ctx, demoApp)
classGRPC := classgrpc.New(ctx) classGRPC := classgrpc.New(&classgrpc.ClassServiceOpts{
Ctx: ctx,
Font: class.Font_FONT_AVATAR,
Text: "Indiana Tech Net 1500",
})
// Prepare app // Prepare app
app := &app.App{ app := &app.App{

View File

@ -1,3 +1,5 @@
// Package classgrpc provides demonstrative rpc implementation for class server
// TODO: Move font and text to ClassServiceOpts in New() and use
package classgrpc package classgrpc
import ( import (
@ -11,17 +13,25 @@ import (
type ClassService struct { type ClassService struct {
class.UnimplementedClassServiceServer class.UnimplementedClassServiceServer
ctx context.Context ctx context.Context
font class.Font
text string
}
type ClassServiceOpts struct {
Ctx context.Context
Font class.Font
Text string
} }
var DefaultFont = class.Font_FONT_BARBWIRE var DefaultFont = class.Font_FONT_BARBWIRE
func (s *ClassService) GetClassLogo(ctx context.Context, req *class.GetClassLogoRequest) (*class.GetClassLogoResponse, error) { func (s *ClassService) GetClassLogo(ctx context.Context, req *class.GetClassLogoRequest) (*class.GetClassLogoResponse, error) {
if req.GetFont() == class.Font_FONT_UNSPECIFIED { if req.GetFont() == class.Font_FONT_UNSPECIFIED {
req.Font = DefaultFont req.Font = s.font
} }
f := figure.NewFigure("Indiana Tech", getFontString(req.GetFont()), false) f := figure.NewFigure(s.text, getFontString(req.GetFont()), false)
resp := &class.GetClassLogoResponse{ resp := &class.GetClassLogoResponse{
LogoBytes: []byte(f.String()), LogoBytes: []byte(f.String()),
@ -38,8 +48,10 @@ func getFontString(font class.Font) string {
return strings.ToLower(strings.ReplaceAll(font.String(), "FONT_", "")) return strings.ToLower(strings.ReplaceAll(font.String(), "FONT_", ""))
} }
func New(ctx context.Context) *ClassService { func New(opts *ClassServiceOpts) *ClassService {
return &ClassService{ return &ClassService{
ctx: ctx, ctx: opts.Ctx,
font: opts.Font,
text: opts.Text,
} }
} }