generated from rmcguire/go-server-with-otel
implement class logo
This commit is contained in:
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
@ -8,9 +8,12 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}",
|
"program": "${workspaceFolder}",
|
||||||
"env": {
|
"env": {
|
||||||
"APP_NAME": "Go HTTP with OTEL"
|
"APP_NAME": "Class GRPC Server"
|
||||||
},
|
},
|
||||||
"args": []
|
"args": [
|
||||||
|
"-config",
|
||||||
|
"config.yaml"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
4
Makefile
4
Makefile
@ -4,7 +4,7 @@ CMD_NAME := go-server-with-otel
|
|||||||
VERSION ?= development
|
VERSION ?= development
|
||||||
API_DIR := api/
|
API_DIR := api/
|
||||||
SCHEMA_DIR := contrib/
|
SCHEMA_DIR := contrib/
|
||||||
PROTO_DIRS := $(wildcard proto/demo/app/*) # TODO: Update path (probably not demo)
|
PROTO_FILES := $(shell find proto -name '*.proto' -not -path 'proto/google/*')
|
||||||
PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64
|
PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64
|
||||||
OUTPUT_DIR := bin
|
OUTPUT_DIR := bin
|
||||||
VER_PKG := gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version
|
VER_PKG := gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version
|
||||||
@ -20,7 +20,7 @@ proto: check_protoc $(API_DIR)
|
|||||||
--openapiv2_out=$(SCHEMA_DIR) \
|
--openapiv2_out=$(SCHEMA_DIR) \
|
||||||
--openapiv2_opt allow_merge=true \
|
--openapiv2_opt allow_merge=true \
|
||||||
--openapiv2_opt merge_file_name=$(CMD_NAME) \
|
--openapiv2_opt merge_file_name=$(CMD_NAME) \
|
||||||
$(foreach dir, $(PROTO_DIRS), $(wildcard $(dir)/*.proto))
|
$(PROTO_FILES)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -v ./...
|
go test -v ./...
|
||||||
|
840
api/class/v1alpha1/class.pb.go
Normal file
840
api/class/v1alpha1/class.pb.go
Normal file
@ -0,0 +1,840 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.36.6
|
||||||
|
// protoc v5.29.3
|
||||||
|
// source: class/v1alpha1/class.proto
|
||||||
|
|
||||||
|
package class
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
unsafe "unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
type Font int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
Font_FONT_UNSPECIFIED Font = 0
|
||||||
|
Font_FONT_3X5 Font = 2
|
||||||
|
Font_FONT_5LINEOBLIQUE Font = 3
|
||||||
|
Font_FONT_ACROBATIC Font = 4
|
||||||
|
Font_FONT_ALLIGATOR Font = 5
|
||||||
|
Font_FONT_ALLIGATOR2 Font = 6
|
||||||
|
Font_FONT_ALPHABET Font = 7
|
||||||
|
Font_FONT_AVATAR Font = 8
|
||||||
|
Font_FONT_BANNER Font = 9
|
||||||
|
Font_FONT_BANNER3 Font = 11
|
||||||
|
Font_FONT_BANNER4 Font = 12
|
||||||
|
Font_FONT_BARBWIRE Font = 13
|
||||||
|
Font_FONT_BASIC Font = 14
|
||||||
|
Font_FONT_BELL Font = 15
|
||||||
|
Font_FONT_BIG Font = 16
|
||||||
|
Font_FONT_BIGCHIEF Font = 17
|
||||||
|
Font_FONT_BINARY Font = 18
|
||||||
|
Font_FONT_BLOCK Font = 19
|
||||||
|
Font_FONT_BUBBLE Font = 20
|
||||||
|
Font_FONT_BULBHEAD Font = 21
|
||||||
|
Font_FONT_CALGPHY2 Font = 22
|
||||||
|
Font_FONT_CALIGRAPHY Font = 23
|
||||||
|
Font_FONT_CATWALK Font = 24
|
||||||
|
Font_FONT_CHUNKY Font = 25
|
||||||
|
Font_FONT_COINSTAK Font = 26
|
||||||
|
Font_FONT_COLOSSAL Font = 27
|
||||||
|
Font_FONT_COMPUTER Font = 28
|
||||||
|
Font_FONT_CONTESSA Font = 29
|
||||||
|
Font_FONT_CONTRAST Font = 30
|
||||||
|
Font_FONT_COSMIC Font = 31
|
||||||
|
Font_FONT_COSMIKE Font = 32
|
||||||
|
Font_FONT_CRICKET Font = 33
|
||||||
|
Font_FONT_CURSIVE Font = 34
|
||||||
|
Font_FONT_CYBERLARGE Font = 35
|
||||||
|
Font_FONT_CYBERMEDIUM Font = 36
|
||||||
|
Font_FONT_CYBERSMALL Font = 37
|
||||||
|
Font_FONT_DIAMOND Font = 38
|
||||||
|
Font_FONT_DIGITAL Font = 39
|
||||||
|
Font_FONT_DOH Font = 40
|
||||||
|
Font_FONT_DOOM Font = 41
|
||||||
|
Font_FONT_DOTMATRIX Font = 42
|
||||||
|
Font_FONT_DRPEPPER Font = 43
|
||||||
|
Font_FONT_EFTICHESS Font = 44
|
||||||
|
Font_FONT_EFTIFONT Font = 45
|
||||||
|
Font_FONT_EFTIPITI Font = 46
|
||||||
|
Font_FONT_EFTIROBOT Font = 47
|
||||||
|
Font_FONT_EFTITALIC Font = 48
|
||||||
|
Font_FONT_EFTIWALL Font = 49
|
||||||
|
Font_FONT_EFTIWATER Font = 50
|
||||||
|
Font_FONT_EPIC Font = 51
|
||||||
|
Font_FONT_FENDER Font = 52
|
||||||
|
Font_FONT_FOURTOPS Font = 53
|
||||||
|
Font_FONT_FUZZY Font = 54
|
||||||
|
Font_FONT_GOOFY Font = 55
|
||||||
|
Font_FONT_GOTHIC Font = 56
|
||||||
|
Font_FONT_GRAFFITI Font = 57
|
||||||
|
Font_FONT_HOLLYWOOD Font = 58
|
||||||
|
Font_FONT_INVITA Font = 59
|
||||||
|
Font_FONT_ISOMETRIC1 Font = 60
|
||||||
|
Font_FONT_ISOMETRIC2 Font = 61
|
||||||
|
Font_FONT_ISOMETRIC3 Font = 62
|
||||||
|
Font_FONT_ISOMETRIC4 Font = 63
|
||||||
|
Font_FONT_ITALIC Font = 64
|
||||||
|
Font_FONT_IVRIT Font = 65
|
||||||
|
Font_FONT_JAZMINE Font = 66
|
||||||
|
Font_FONT_JERUSALEM Font = 67
|
||||||
|
Font_FONT_KATAKANA Font = 68
|
||||||
|
Font_FONT_KBAN Font = 69
|
||||||
|
Font_FONT_LARRY3D Font = 70
|
||||||
|
Font_FONT_LCD Font = 71
|
||||||
|
Font_FONT_LEAN Font = 72
|
||||||
|
Font_FONT_LETTERS Font = 73
|
||||||
|
Font_FONT_LINUX Font = 74
|
||||||
|
Font_FONT_LOCKERGNOME Font = 75
|
||||||
|
Font_FONT_MADRID Font = 76
|
||||||
|
Font_FONT_MARQUEE Font = 77
|
||||||
|
Font_FONT_MAXFOUR Font = 78
|
||||||
|
Font_FONT_MIKE Font = 79
|
||||||
|
Font_FONT_MINI Font = 80
|
||||||
|
Font_FONT_MIRROR Font = 81
|
||||||
|
Font_FONT_MNEMONIC Font = 82
|
||||||
|
Font_FONT_MORSE Font = 83
|
||||||
|
Font_FONT_MOSCOW Font = 84
|
||||||
|
Font_FONT_NANCYJ Font = 87
|
||||||
|
Font_FONT_NIPPLES Font = 88
|
||||||
|
Font_FONT_NTGREEK Font = 89
|
||||||
|
Font_FONT_O8 Font = 90
|
||||||
|
Font_FONT_OGRE Font = 91
|
||||||
|
Font_FONT_PAWP Font = 92
|
||||||
|
Font_FONT_PEAKS Font = 93
|
||||||
|
Font_FONT_PEBBLES Font = 94
|
||||||
|
Font_FONT_PEPPER Font = 95
|
||||||
|
Font_FONT_POISON Font = 96
|
||||||
|
Font_FONT_PUFFY Font = 97
|
||||||
|
Font_FONT_PYRAMID Font = 98
|
||||||
|
Font_FONT_RECTANGLES Font = 99
|
||||||
|
Font_FONT_RELIEF Font = 100
|
||||||
|
Font_FONT_RELIEF2 Font = 101
|
||||||
|
Font_FONT_REV Font = 102
|
||||||
|
Font_FONT_ROMAN Font = 103
|
||||||
|
Font_FONT_ROT13 Font = 104
|
||||||
|
Font_FONT_ROUNDED Font = 105
|
||||||
|
Font_FONT_ROWANCAP Font = 106
|
||||||
|
Font_FONT_ROZZO Font = 107
|
||||||
|
Font_FONT_RUNIC Font = 108
|
||||||
|
Font_FONT_RUNYC Font = 109
|
||||||
|
Font_FONT_SBLOOD Font = 110
|
||||||
|
Font_FONT_SCRIPT Font = 111
|
||||||
|
Font_FONT_SERIFCAP Font = 112
|
||||||
|
Font_FONT_SHADOW Font = 113
|
||||||
|
Font_FONT_SHORT Font = 114
|
||||||
|
Font_FONT_SLANT Font = 115
|
||||||
|
Font_FONT_SLIDE Font = 116
|
||||||
|
Font_FONT_SLSCRIPT Font = 117
|
||||||
|
Font_FONT_SMALL Font = 118
|
||||||
|
Font_FONT_SMISOME1 Font = 119
|
||||||
|
Font_FONT_SMKEYBOARD Font = 120
|
||||||
|
Font_FONT_SMSCRIPT Font = 121
|
||||||
|
Font_FONT_SMSHADOW Font = 122
|
||||||
|
Font_FONT_SMSLANT Font = 123
|
||||||
|
Font_FONT_SMTENGWAR Font = 124
|
||||||
|
Font_FONT_SPEED Font = 125
|
||||||
|
Font_FONT_STAMPATELLO Font = 126
|
||||||
|
Font_FONT_STANDARD Font = 127
|
||||||
|
Font_FONT_STARWARS Font = 128
|
||||||
|
Font_FONT_STELLAR Font = 129
|
||||||
|
Font_FONT_STOP Font = 130
|
||||||
|
Font_FONT_STRAIGHT Font = 131
|
||||||
|
Font_FONT_TANJA Font = 132
|
||||||
|
Font_FONT_TENGWAR Font = 133
|
||||||
|
Font_FONT_TERM Font = 134
|
||||||
|
Font_FONT_THICK Font = 135
|
||||||
|
Font_FONT_THIN Font = 136
|
||||||
|
Font_FONT_THREEPOINT Font = 137
|
||||||
|
Font_FONT_TICKS Font = 138
|
||||||
|
Font_FONT_TICKSSLANT Font = 139
|
||||||
|
Font_FONT_TOMBSTONE Font = 141
|
||||||
|
Font_FONT_TREK Font = 142
|
||||||
|
Font_FONT_TSALAGI Font = 143
|
||||||
|
Font_FONT_TWOPOINT Font = 144
|
||||||
|
Font_FONT_UNIVERS Font = 145
|
||||||
|
Font_FONT_USAFLAG Font = 146
|
||||||
|
Font_FONT_WAVY Font = 147
|
||||||
|
Font_FONT_WEIRD Font = 148
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for Font.
|
||||||
|
var (
|
||||||
|
Font_name = map[int32]string{
|
||||||
|
0: "FONT_UNSPECIFIED",
|
||||||
|
2: "FONT_3X5",
|
||||||
|
3: "FONT_5LINEOBLIQUE",
|
||||||
|
4: "FONT_ACROBATIC",
|
||||||
|
5: "FONT_ALLIGATOR",
|
||||||
|
6: "FONT_ALLIGATOR2",
|
||||||
|
7: "FONT_ALPHABET",
|
||||||
|
8: "FONT_AVATAR",
|
||||||
|
9: "FONT_BANNER",
|
||||||
|
11: "FONT_BANNER3",
|
||||||
|
12: "FONT_BANNER4",
|
||||||
|
13: "FONT_BARBWIRE",
|
||||||
|
14: "FONT_BASIC",
|
||||||
|
15: "FONT_BELL",
|
||||||
|
16: "FONT_BIG",
|
||||||
|
17: "FONT_BIGCHIEF",
|
||||||
|
18: "FONT_BINARY",
|
||||||
|
19: "FONT_BLOCK",
|
||||||
|
20: "FONT_BUBBLE",
|
||||||
|
21: "FONT_BULBHEAD",
|
||||||
|
22: "FONT_CALGPHY2",
|
||||||
|
23: "FONT_CALIGRAPHY",
|
||||||
|
24: "FONT_CATWALK",
|
||||||
|
25: "FONT_CHUNKY",
|
||||||
|
26: "FONT_COINSTAK",
|
||||||
|
27: "FONT_COLOSSAL",
|
||||||
|
28: "FONT_COMPUTER",
|
||||||
|
29: "FONT_CONTESSA",
|
||||||
|
30: "FONT_CONTRAST",
|
||||||
|
31: "FONT_COSMIC",
|
||||||
|
32: "FONT_COSMIKE",
|
||||||
|
33: "FONT_CRICKET",
|
||||||
|
34: "FONT_CURSIVE",
|
||||||
|
35: "FONT_CYBERLARGE",
|
||||||
|
36: "FONT_CYBERMEDIUM",
|
||||||
|
37: "FONT_CYBERSMALL",
|
||||||
|
38: "FONT_DIAMOND",
|
||||||
|
39: "FONT_DIGITAL",
|
||||||
|
40: "FONT_DOH",
|
||||||
|
41: "FONT_DOOM",
|
||||||
|
42: "FONT_DOTMATRIX",
|
||||||
|
43: "FONT_DRPEPPER",
|
||||||
|
44: "FONT_EFTICHESS",
|
||||||
|
45: "FONT_EFTIFONT",
|
||||||
|
46: "FONT_EFTIPITI",
|
||||||
|
47: "FONT_EFTIROBOT",
|
||||||
|
48: "FONT_EFTITALIC",
|
||||||
|
49: "FONT_EFTIWALL",
|
||||||
|
50: "FONT_EFTIWATER",
|
||||||
|
51: "FONT_EPIC",
|
||||||
|
52: "FONT_FENDER",
|
||||||
|
53: "FONT_FOURTOPS",
|
||||||
|
54: "FONT_FUZZY",
|
||||||
|
55: "FONT_GOOFY",
|
||||||
|
56: "FONT_GOTHIC",
|
||||||
|
57: "FONT_GRAFFITI",
|
||||||
|
58: "FONT_HOLLYWOOD",
|
||||||
|
59: "FONT_INVITA",
|
||||||
|
60: "FONT_ISOMETRIC1",
|
||||||
|
61: "FONT_ISOMETRIC2",
|
||||||
|
62: "FONT_ISOMETRIC3",
|
||||||
|
63: "FONT_ISOMETRIC4",
|
||||||
|
64: "FONT_ITALIC",
|
||||||
|
65: "FONT_IVRIT",
|
||||||
|
66: "FONT_JAZMINE",
|
||||||
|
67: "FONT_JERUSALEM",
|
||||||
|
68: "FONT_KATAKANA",
|
||||||
|
69: "FONT_KBAN",
|
||||||
|
70: "FONT_LARRY3D",
|
||||||
|
71: "FONT_LCD",
|
||||||
|
72: "FONT_LEAN",
|
||||||
|
73: "FONT_LETTERS",
|
||||||
|
74: "FONT_LINUX",
|
||||||
|
75: "FONT_LOCKERGNOME",
|
||||||
|
76: "FONT_MADRID",
|
||||||
|
77: "FONT_MARQUEE",
|
||||||
|
78: "FONT_MAXFOUR",
|
||||||
|
79: "FONT_MIKE",
|
||||||
|
80: "FONT_MINI",
|
||||||
|
81: "FONT_MIRROR",
|
||||||
|
82: "FONT_MNEMONIC",
|
||||||
|
83: "FONT_MORSE",
|
||||||
|
84: "FONT_MOSCOW",
|
||||||
|
87: "FONT_NANCYJ",
|
||||||
|
88: "FONT_NIPPLES",
|
||||||
|
89: "FONT_NTGREEK",
|
||||||
|
90: "FONT_O8",
|
||||||
|
91: "FONT_OGRE",
|
||||||
|
92: "FONT_PAWP",
|
||||||
|
93: "FONT_PEAKS",
|
||||||
|
94: "FONT_PEBBLES",
|
||||||
|
95: "FONT_PEPPER",
|
||||||
|
96: "FONT_POISON",
|
||||||
|
97: "FONT_PUFFY",
|
||||||
|
98: "FONT_PYRAMID",
|
||||||
|
99: "FONT_RECTANGLES",
|
||||||
|
100: "FONT_RELIEF",
|
||||||
|
101: "FONT_RELIEF2",
|
||||||
|
102: "FONT_REV",
|
||||||
|
103: "FONT_ROMAN",
|
||||||
|
104: "FONT_ROT13",
|
||||||
|
105: "FONT_ROUNDED",
|
||||||
|
106: "FONT_ROWANCAP",
|
||||||
|
107: "FONT_ROZZO",
|
||||||
|
108: "FONT_RUNIC",
|
||||||
|
109: "FONT_RUNYC",
|
||||||
|
110: "FONT_SBLOOD",
|
||||||
|
111: "FONT_SCRIPT",
|
||||||
|
112: "FONT_SERIFCAP",
|
||||||
|
113: "FONT_SHADOW",
|
||||||
|
114: "FONT_SHORT",
|
||||||
|
115: "FONT_SLANT",
|
||||||
|
116: "FONT_SLIDE",
|
||||||
|
117: "FONT_SLSCRIPT",
|
||||||
|
118: "FONT_SMALL",
|
||||||
|
119: "FONT_SMISOME1",
|
||||||
|
120: "FONT_SMKEYBOARD",
|
||||||
|
121: "FONT_SMSCRIPT",
|
||||||
|
122: "FONT_SMSHADOW",
|
||||||
|
123: "FONT_SMSLANT",
|
||||||
|
124: "FONT_SMTENGWAR",
|
||||||
|
125: "FONT_SPEED",
|
||||||
|
126: "FONT_STAMPATELLO",
|
||||||
|
127: "FONT_STANDARD",
|
||||||
|
128: "FONT_STARWARS",
|
||||||
|
129: "FONT_STELLAR",
|
||||||
|
130: "FONT_STOP",
|
||||||
|
131: "FONT_STRAIGHT",
|
||||||
|
132: "FONT_TANJA",
|
||||||
|
133: "FONT_TENGWAR",
|
||||||
|
134: "FONT_TERM",
|
||||||
|
135: "FONT_THICK",
|
||||||
|
136: "FONT_THIN",
|
||||||
|
137: "FONT_THREEPOINT",
|
||||||
|
138: "FONT_TICKS",
|
||||||
|
139: "FONT_TICKSSLANT",
|
||||||
|
141: "FONT_TOMBSTONE",
|
||||||
|
142: "FONT_TREK",
|
||||||
|
143: "FONT_TSALAGI",
|
||||||
|
144: "FONT_TWOPOINT",
|
||||||
|
145: "FONT_UNIVERS",
|
||||||
|
146: "FONT_USAFLAG",
|
||||||
|
147: "FONT_WAVY",
|
||||||
|
148: "FONT_WEIRD",
|
||||||
|
}
|
||||||
|
Font_value = map[string]int32{
|
||||||
|
"FONT_UNSPECIFIED": 0,
|
||||||
|
"FONT_3X5": 2,
|
||||||
|
"FONT_5LINEOBLIQUE": 3,
|
||||||
|
"FONT_ACROBATIC": 4,
|
||||||
|
"FONT_ALLIGATOR": 5,
|
||||||
|
"FONT_ALLIGATOR2": 6,
|
||||||
|
"FONT_ALPHABET": 7,
|
||||||
|
"FONT_AVATAR": 8,
|
||||||
|
"FONT_BANNER": 9,
|
||||||
|
"FONT_BANNER3": 11,
|
||||||
|
"FONT_BANNER4": 12,
|
||||||
|
"FONT_BARBWIRE": 13,
|
||||||
|
"FONT_BASIC": 14,
|
||||||
|
"FONT_BELL": 15,
|
||||||
|
"FONT_BIG": 16,
|
||||||
|
"FONT_BIGCHIEF": 17,
|
||||||
|
"FONT_BINARY": 18,
|
||||||
|
"FONT_BLOCK": 19,
|
||||||
|
"FONT_BUBBLE": 20,
|
||||||
|
"FONT_BULBHEAD": 21,
|
||||||
|
"FONT_CALGPHY2": 22,
|
||||||
|
"FONT_CALIGRAPHY": 23,
|
||||||
|
"FONT_CATWALK": 24,
|
||||||
|
"FONT_CHUNKY": 25,
|
||||||
|
"FONT_COINSTAK": 26,
|
||||||
|
"FONT_COLOSSAL": 27,
|
||||||
|
"FONT_COMPUTER": 28,
|
||||||
|
"FONT_CONTESSA": 29,
|
||||||
|
"FONT_CONTRAST": 30,
|
||||||
|
"FONT_COSMIC": 31,
|
||||||
|
"FONT_COSMIKE": 32,
|
||||||
|
"FONT_CRICKET": 33,
|
||||||
|
"FONT_CURSIVE": 34,
|
||||||
|
"FONT_CYBERLARGE": 35,
|
||||||
|
"FONT_CYBERMEDIUM": 36,
|
||||||
|
"FONT_CYBERSMALL": 37,
|
||||||
|
"FONT_DIAMOND": 38,
|
||||||
|
"FONT_DIGITAL": 39,
|
||||||
|
"FONT_DOH": 40,
|
||||||
|
"FONT_DOOM": 41,
|
||||||
|
"FONT_DOTMATRIX": 42,
|
||||||
|
"FONT_DRPEPPER": 43,
|
||||||
|
"FONT_EFTICHESS": 44,
|
||||||
|
"FONT_EFTIFONT": 45,
|
||||||
|
"FONT_EFTIPITI": 46,
|
||||||
|
"FONT_EFTIROBOT": 47,
|
||||||
|
"FONT_EFTITALIC": 48,
|
||||||
|
"FONT_EFTIWALL": 49,
|
||||||
|
"FONT_EFTIWATER": 50,
|
||||||
|
"FONT_EPIC": 51,
|
||||||
|
"FONT_FENDER": 52,
|
||||||
|
"FONT_FOURTOPS": 53,
|
||||||
|
"FONT_FUZZY": 54,
|
||||||
|
"FONT_GOOFY": 55,
|
||||||
|
"FONT_GOTHIC": 56,
|
||||||
|
"FONT_GRAFFITI": 57,
|
||||||
|
"FONT_HOLLYWOOD": 58,
|
||||||
|
"FONT_INVITA": 59,
|
||||||
|
"FONT_ISOMETRIC1": 60,
|
||||||
|
"FONT_ISOMETRIC2": 61,
|
||||||
|
"FONT_ISOMETRIC3": 62,
|
||||||
|
"FONT_ISOMETRIC4": 63,
|
||||||
|
"FONT_ITALIC": 64,
|
||||||
|
"FONT_IVRIT": 65,
|
||||||
|
"FONT_JAZMINE": 66,
|
||||||
|
"FONT_JERUSALEM": 67,
|
||||||
|
"FONT_KATAKANA": 68,
|
||||||
|
"FONT_KBAN": 69,
|
||||||
|
"FONT_LARRY3D": 70,
|
||||||
|
"FONT_LCD": 71,
|
||||||
|
"FONT_LEAN": 72,
|
||||||
|
"FONT_LETTERS": 73,
|
||||||
|
"FONT_LINUX": 74,
|
||||||
|
"FONT_LOCKERGNOME": 75,
|
||||||
|
"FONT_MADRID": 76,
|
||||||
|
"FONT_MARQUEE": 77,
|
||||||
|
"FONT_MAXFOUR": 78,
|
||||||
|
"FONT_MIKE": 79,
|
||||||
|
"FONT_MINI": 80,
|
||||||
|
"FONT_MIRROR": 81,
|
||||||
|
"FONT_MNEMONIC": 82,
|
||||||
|
"FONT_MORSE": 83,
|
||||||
|
"FONT_MOSCOW": 84,
|
||||||
|
"FONT_NANCYJ": 87,
|
||||||
|
"FONT_NIPPLES": 88,
|
||||||
|
"FONT_NTGREEK": 89,
|
||||||
|
"FONT_O8": 90,
|
||||||
|
"FONT_OGRE": 91,
|
||||||
|
"FONT_PAWP": 92,
|
||||||
|
"FONT_PEAKS": 93,
|
||||||
|
"FONT_PEBBLES": 94,
|
||||||
|
"FONT_PEPPER": 95,
|
||||||
|
"FONT_POISON": 96,
|
||||||
|
"FONT_PUFFY": 97,
|
||||||
|
"FONT_PYRAMID": 98,
|
||||||
|
"FONT_RECTANGLES": 99,
|
||||||
|
"FONT_RELIEF": 100,
|
||||||
|
"FONT_RELIEF2": 101,
|
||||||
|
"FONT_REV": 102,
|
||||||
|
"FONT_ROMAN": 103,
|
||||||
|
"FONT_ROT13": 104,
|
||||||
|
"FONT_ROUNDED": 105,
|
||||||
|
"FONT_ROWANCAP": 106,
|
||||||
|
"FONT_ROZZO": 107,
|
||||||
|
"FONT_RUNIC": 108,
|
||||||
|
"FONT_RUNYC": 109,
|
||||||
|
"FONT_SBLOOD": 110,
|
||||||
|
"FONT_SCRIPT": 111,
|
||||||
|
"FONT_SERIFCAP": 112,
|
||||||
|
"FONT_SHADOW": 113,
|
||||||
|
"FONT_SHORT": 114,
|
||||||
|
"FONT_SLANT": 115,
|
||||||
|
"FONT_SLIDE": 116,
|
||||||
|
"FONT_SLSCRIPT": 117,
|
||||||
|
"FONT_SMALL": 118,
|
||||||
|
"FONT_SMISOME1": 119,
|
||||||
|
"FONT_SMKEYBOARD": 120,
|
||||||
|
"FONT_SMSCRIPT": 121,
|
||||||
|
"FONT_SMSHADOW": 122,
|
||||||
|
"FONT_SMSLANT": 123,
|
||||||
|
"FONT_SMTENGWAR": 124,
|
||||||
|
"FONT_SPEED": 125,
|
||||||
|
"FONT_STAMPATELLO": 126,
|
||||||
|
"FONT_STANDARD": 127,
|
||||||
|
"FONT_STARWARS": 128,
|
||||||
|
"FONT_STELLAR": 129,
|
||||||
|
"FONT_STOP": 130,
|
||||||
|
"FONT_STRAIGHT": 131,
|
||||||
|
"FONT_TANJA": 132,
|
||||||
|
"FONT_TENGWAR": 133,
|
||||||
|
"FONT_TERM": 134,
|
||||||
|
"FONT_THICK": 135,
|
||||||
|
"FONT_THIN": 136,
|
||||||
|
"FONT_THREEPOINT": 137,
|
||||||
|
"FONT_TICKS": 138,
|
||||||
|
"FONT_TICKSSLANT": 139,
|
||||||
|
"FONT_TOMBSTONE": 141,
|
||||||
|
"FONT_TREK": 142,
|
||||||
|
"FONT_TSALAGI": 143,
|
||||||
|
"FONT_TWOPOINT": 144,
|
||||||
|
"FONT_UNIVERS": 145,
|
||||||
|
"FONT_USAFLAG": 146,
|
||||||
|
"FONT_WAVY": 147,
|
||||||
|
"FONT_WEIRD": 148,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x Font) Enum() *Font {
|
||||||
|
p := new(Font)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x Font) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Font) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_class_v1alpha1_class_proto_enumTypes[0].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Font) Type() protoreflect.EnumType {
|
||||||
|
return &file_class_v1alpha1_class_proto_enumTypes[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x Font) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Font.Descriptor instead.
|
||||||
|
func (Font) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_class_v1alpha1_class_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetClassLogoRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Font Font `protobuf:"varint,1,opt,name=font,proto3,enum=class.v1alpha1.Font" json:"font,omitempty"`
|
||||||
|
IncludeString *bool `protobuf:"varint,2,opt,name=include_string,json=includeString,proto3,oneof" json:"include_string,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoRequest) Reset() {
|
||||||
|
*x = GetClassLogoRequest{}
|
||||||
|
mi := &file_class_v1alpha1_class_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetClassLogoRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetClassLogoRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_class_v1alpha1_class_proto_msgTypes[0]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetClassLogoRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetClassLogoRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_class_v1alpha1_class_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoRequest) GetFont() Font {
|
||||||
|
if x != nil {
|
||||||
|
return x.Font
|
||||||
|
}
|
||||||
|
return Font_FONT_UNSPECIFIED
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoRequest) GetIncludeString() bool {
|
||||||
|
if x != nil && x.IncludeString != nil {
|
||||||
|
return *x.IncludeString
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetClassLogoResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
LogoBytes []byte `protobuf:"bytes,1,opt,name=logo_bytes,json=logoBytes,proto3" json:"logo_bytes,omitempty"`
|
||||||
|
LogoString string `protobuf:"bytes,2,opt,name=logo_string,json=logoString,proto3" json:"logo_string,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoResponse) Reset() {
|
||||||
|
*x = GetClassLogoResponse{}
|
||||||
|
mi := &file_class_v1alpha1_class_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetClassLogoResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetClassLogoResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_class_v1alpha1_class_proto_msgTypes[1]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetClassLogoResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetClassLogoResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_class_v1alpha1_class_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoResponse) GetLogoBytes() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.LogoBytes
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetClassLogoResponse) GetLogoString() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.LogoString
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_class_v1alpha1_class_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
const file_class_v1alpha1_class_proto_rawDesc = "" +
|
||||||
|
"\n" +
|
||||||
|
"\x1aclass/v1alpha1/class.proto\x12\x0eclass.v1alpha1\x1a\x1cgoogle/api/annotations.proto\"~\n" +
|
||||||
|
"\x13GetClassLogoRequest\x12(\n" +
|
||||||
|
"\x04font\x18\x01 \x01(\x0e2\x14.class.v1alpha1.FontR\x04font\x12*\n" +
|
||||||
|
"\x0einclude_string\x18\x02 \x01(\bH\x00R\rincludeString\x88\x01\x01B\x11\n" +
|
||||||
|
"\x0f_include_string\"V\n" +
|
||||||
|
"\x14GetClassLogoResponse\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"logo_bytes\x18\x01 \x01(\fR\tlogoBytes\x12\x1f\n" +
|
||||||
|
"\vlogo_string\x18\x02 \x01(\tR\n" +
|
||||||
|
"logoString*\xa0\x14\n" +
|
||||||
|
"\x04Font\x12\x14\n" +
|
||||||
|
"\x10FONT_UNSPECIFIED\x10\x00\x12\f\n" +
|
||||||
|
"\bFONT_3X5\x10\x02\x12\x15\n" +
|
||||||
|
"\x11FONT_5LINEOBLIQUE\x10\x03\x12\x12\n" +
|
||||||
|
"\x0eFONT_ACROBATIC\x10\x04\x12\x12\n" +
|
||||||
|
"\x0eFONT_ALLIGATOR\x10\x05\x12\x13\n" +
|
||||||
|
"\x0fFONT_ALLIGATOR2\x10\x06\x12\x11\n" +
|
||||||
|
"\rFONT_ALPHABET\x10\a\x12\x0f\n" +
|
||||||
|
"\vFONT_AVATAR\x10\b\x12\x0f\n" +
|
||||||
|
"\vFONT_BANNER\x10\t\x12\x10\n" +
|
||||||
|
"\fFONT_BANNER3\x10\v\x12\x10\n" +
|
||||||
|
"\fFONT_BANNER4\x10\f\x12\x11\n" +
|
||||||
|
"\rFONT_BARBWIRE\x10\r\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_BASIC\x10\x0e\x12\r\n" +
|
||||||
|
"\tFONT_BELL\x10\x0f\x12\f\n" +
|
||||||
|
"\bFONT_BIG\x10\x10\x12\x11\n" +
|
||||||
|
"\rFONT_BIGCHIEF\x10\x11\x12\x0f\n" +
|
||||||
|
"\vFONT_BINARY\x10\x12\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_BLOCK\x10\x13\x12\x0f\n" +
|
||||||
|
"\vFONT_BUBBLE\x10\x14\x12\x11\n" +
|
||||||
|
"\rFONT_BULBHEAD\x10\x15\x12\x11\n" +
|
||||||
|
"\rFONT_CALGPHY2\x10\x16\x12\x13\n" +
|
||||||
|
"\x0fFONT_CALIGRAPHY\x10\x17\x12\x10\n" +
|
||||||
|
"\fFONT_CATWALK\x10\x18\x12\x0f\n" +
|
||||||
|
"\vFONT_CHUNKY\x10\x19\x12\x11\n" +
|
||||||
|
"\rFONT_COINSTAK\x10\x1a\x12\x11\n" +
|
||||||
|
"\rFONT_COLOSSAL\x10\x1b\x12\x11\n" +
|
||||||
|
"\rFONT_COMPUTER\x10\x1c\x12\x11\n" +
|
||||||
|
"\rFONT_CONTESSA\x10\x1d\x12\x11\n" +
|
||||||
|
"\rFONT_CONTRAST\x10\x1e\x12\x0f\n" +
|
||||||
|
"\vFONT_COSMIC\x10\x1f\x12\x10\n" +
|
||||||
|
"\fFONT_COSMIKE\x10 \x12\x10\n" +
|
||||||
|
"\fFONT_CRICKET\x10!\x12\x10\n" +
|
||||||
|
"\fFONT_CURSIVE\x10\"\x12\x13\n" +
|
||||||
|
"\x0fFONT_CYBERLARGE\x10#\x12\x14\n" +
|
||||||
|
"\x10FONT_CYBERMEDIUM\x10$\x12\x13\n" +
|
||||||
|
"\x0fFONT_CYBERSMALL\x10%\x12\x10\n" +
|
||||||
|
"\fFONT_DIAMOND\x10&\x12\x10\n" +
|
||||||
|
"\fFONT_DIGITAL\x10'\x12\f\n" +
|
||||||
|
"\bFONT_DOH\x10(\x12\r\n" +
|
||||||
|
"\tFONT_DOOM\x10)\x12\x12\n" +
|
||||||
|
"\x0eFONT_DOTMATRIX\x10*\x12\x11\n" +
|
||||||
|
"\rFONT_DRPEPPER\x10+\x12\x12\n" +
|
||||||
|
"\x0eFONT_EFTICHESS\x10,\x12\x11\n" +
|
||||||
|
"\rFONT_EFTIFONT\x10-\x12\x11\n" +
|
||||||
|
"\rFONT_EFTIPITI\x10.\x12\x12\n" +
|
||||||
|
"\x0eFONT_EFTIROBOT\x10/\x12\x12\n" +
|
||||||
|
"\x0eFONT_EFTITALIC\x100\x12\x11\n" +
|
||||||
|
"\rFONT_EFTIWALL\x101\x12\x12\n" +
|
||||||
|
"\x0eFONT_EFTIWATER\x102\x12\r\n" +
|
||||||
|
"\tFONT_EPIC\x103\x12\x0f\n" +
|
||||||
|
"\vFONT_FENDER\x104\x12\x11\n" +
|
||||||
|
"\rFONT_FOURTOPS\x105\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_FUZZY\x106\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_GOOFY\x107\x12\x0f\n" +
|
||||||
|
"\vFONT_GOTHIC\x108\x12\x11\n" +
|
||||||
|
"\rFONT_GRAFFITI\x109\x12\x12\n" +
|
||||||
|
"\x0eFONT_HOLLYWOOD\x10:\x12\x0f\n" +
|
||||||
|
"\vFONT_INVITA\x10;\x12\x13\n" +
|
||||||
|
"\x0fFONT_ISOMETRIC1\x10<\x12\x13\n" +
|
||||||
|
"\x0fFONT_ISOMETRIC2\x10=\x12\x13\n" +
|
||||||
|
"\x0fFONT_ISOMETRIC3\x10>\x12\x13\n" +
|
||||||
|
"\x0fFONT_ISOMETRIC4\x10?\x12\x0f\n" +
|
||||||
|
"\vFONT_ITALIC\x10@\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_IVRIT\x10A\x12\x10\n" +
|
||||||
|
"\fFONT_JAZMINE\x10B\x12\x12\n" +
|
||||||
|
"\x0eFONT_JERUSALEM\x10C\x12\x11\n" +
|
||||||
|
"\rFONT_KATAKANA\x10D\x12\r\n" +
|
||||||
|
"\tFONT_KBAN\x10E\x12\x10\n" +
|
||||||
|
"\fFONT_LARRY3D\x10F\x12\f\n" +
|
||||||
|
"\bFONT_LCD\x10G\x12\r\n" +
|
||||||
|
"\tFONT_LEAN\x10H\x12\x10\n" +
|
||||||
|
"\fFONT_LETTERS\x10I\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_LINUX\x10J\x12\x14\n" +
|
||||||
|
"\x10FONT_LOCKERGNOME\x10K\x12\x0f\n" +
|
||||||
|
"\vFONT_MADRID\x10L\x12\x10\n" +
|
||||||
|
"\fFONT_MARQUEE\x10M\x12\x10\n" +
|
||||||
|
"\fFONT_MAXFOUR\x10N\x12\r\n" +
|
||||||
|
"\tFONT_MIKE\x10O\x12\r\n" +
|
||||||
|
"\tFONT_MINI\x10P\x12\x0f\n" +
|
||||||
|
"\vFONT_MIRROR\x10Q\x12\x11\n" +
|
||||||
|
"\rFONT_MNEMONIC\x10R\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_MORSE\x10S\x12\x0f\n" +
|
||||||
|
"\vFONT_MOSCOW\x10T\x12\x0f\n" +
|
||||||
|
"\vFONT_NANCYJ\x10W\x12\x10\n" +
|
||||||
|
"\fFONT_NIPPLES\x10X\x12\x10\n" +
|
||||||
|
"\fFONT_NTGREEK\x10Y\x12\v\n" +
|
||||||
|
"\aFONT_O8\x10Z\x12\r\n" +
|
||||||
|
"\tFONT_OGRE\x10[\x12\r\n" +
|
||||||
|
"\tFONT_PAWP\x10\\\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_PEAKS\x10]\x12\x10\n" +
|
||||||
|
"\fFONT_PEBBLES\x10^\x12\x0f\n" +
|
||||||
|
"\vFONT_PEPPER\x10_\x12\x0f\n" +
|
||||||
|
"\vFONT_POISON\x10`\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_PUFFY\x10a\x12\x10\n" +
|
||||||
|
"\fFONT_PYRAMID\x10b\x12\x13\n" +
|
||||||
|
"\x0fFONT_RECTANGLES\x10c\x12\x0f\n" +
|
||||||
|
"\vFONT_RELIEF\x10d\x12\x10\n" +
|
||||||
|
"\fFONT_RELIEF2\x10e\x12\f\n" +
|
||||||
|
"\bFONT_REV\x10f\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_ROMAN\x10g\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_ROT13\x10h\x12\x10\n" +
|
||||||
|
"\fFONT_ROUNDED\x10i\x12\x11\n" +
|
||||||
|
"\rFONT_ROWANCAP\x10j\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_ROZZO\x10k\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_RUNIC\x10l\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_RUNYC\x10m\x12\x0f\n" +
|
||||||
|
"\vFONT_SBLOOD\x10n\x12\x0f\n" +
|
||||||
|
"\vFONT_SCRIPT\x10o\x12\x11\n" +
|
||||||
|
"\rFONT_SERIFCAP\x10p\x12\x0f\n" +
|
||||||
|
"\vFONT_SHADOW\x10q\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_SHORT\x10r\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_SLANT\x10s\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_SLIDE\x10t\x12\x11\n" +
|
||||||
|
"\rFONT_SLSCRIPT\x10u\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_SMALL\x10v\x12\x11\n" +
|
||||||
|
"\rFONT_SMISOME1\x10w\x12\x13\n" +
|
||||||
|
"\x0fFONT_SMKEYBOARD\x10x\x12\x11\n" +
|
||||||
|
"\rFONT_SMSCRIPT\x10y\x12\x11\n" +
|
||||||
|
"\rFONT_SMSHADOW\x10z\x12\x10\n" +
|
||||||
|
"\fFONT_SMSLANT\x10{\x12\x12\n" +
|
||||||
|
"\x0eFONT_SMTENGWAR\x10|\x12\x0e\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_SPEED\x10}\x12\x14\n" +
|
||||||
|
"\x10FONT_STAMPATELLO\x10~\x12\x11\n" +
|
||||||
|
"\rFONT_STANDARD\x10\x7f\x12\x12\n" +
|
||||||
|
"\rFONT_STARWARS\x10\x80\x01\x12\x11\n" +
|
||||||
|
"\fFONT_STELLAR\x10\x81\x01\x12\x0e\n" +
|
||||||
|
"\tFONT_STOP\x10\x82\x01\x12\x12\n" +
|
||||||
|
"\rFONT_STRAIGHT\x10\x83\x01\x12\x0f\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_TANJA\x10\x84\x01\x12\x11\n" +
|
||||||
|
"\fFONT_TENGWAR\x10\x85\x01\x12\x0e\n" +
|
||||||
|
"\tFONT_TERM\x10\x86\x01\x12\x0f\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_THICK\x10\x87\x01\x12\x0e\n" +
|
||||||
|
"\tFONT_THIN\x10\x88\x01\x12\x14\n" +
|
||||||
|
"\x0fFONT_THREEPOINT\x10\x89\x01\x12\x0f\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_TICKS\x10\x8a\x01\x12\x14\n" +
|
||||||
|
"\x0fFONT_TICKSSLANT\x10\x8b\x01\x12\x13\n" +
|
||||||
|
"\x0eFONT_TOMBSTONE\x10\x8d\x01\x12\x0e\n" +
|
||||||
|
"\tFONT_TREK\x10\x8e\x01\x12\x11\n" +
|
||||||
|
"\fFONT_TSALAGI\x10\x8f\x01\x12\x12\n" +
|
||||||
|
"\rFONT_TWOPOINT\x10\x90\x01\x12\x11\n" +
|
||||||
|
"\fFONT_UNIVERS\x10\x91\x01\x12\x11\n" +
|
||||||
|
"\fFONT_USAFLAG\x10\x92\x01\x12\x0e\n" +
|
||||||
|
"\tFONT_WAVY\x10\x93\x01\x12\x0f\n" +
|
||||||
|
"\n" +
|
||||||
|
"FONT_WEIRD\x10\x94\x012\x87\x01\n" +
|
||||||
|
"\fClassService\x12w\n" +
|
||||||
|
"\fGetClassLogo\x12#.class.v1alpha1.GetClassLogoRequest\x1a$.class.v1alpha1.GetClassLogoResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/v1alpha1/class/logoBHZFgitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/classb\x06proto3"
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_class_v1alpha1_class_proto_rawDescOnce sync.Once
|
||||||
|
file_class_v1alpha1_class_proto_rawDescData []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_class_v1alpha1_class_proto_rawDescGZIP() []byte {
|
||||||
|
file_class_v1alpha1_class_proto_rawDescOnce.Do(func() {
|
||||||
|
file_class_v1alpha1_class_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_class_v1alpha1_class_proto_rawDesc), len(file_class_v1alpha1_class_proto_rawDesc)))
|
||||||
|
})
|
||||||
|
return file_class_v1alpha1_class_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_class_v1alpha1_class_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
|
var file_class_v1alpha1_class_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_class_v1alpha1_class_proto_goTypes = []any{
|
||||||
|
(Font)(0), // 0: class.v1alpha1.Font
|
||||||
|
(*GetClassLogoRequest)(nil), // 1: class.v1alpha1.GetClassLogoRequest
|
||||||
|
(*GetClassLogoResponse)(nil), // 2: class.v1alpha1.GetClassLogoResponse
|
||||||
|
}
|
||||||
|
var file_class_v1alpha1_class_proto_depIdxs = []int32{
|
||||||
|
0, // 0: class.v1alpha1.GetClassLogoRequest.font:type_name -> class.v1alpha1.Font
|
||||||
|
1, // 1: class.v1alpha1.ClassService.GetClassLogo:input_type -> class.v1alpha1.GetClassLogoRequest
|
||||||
|
2, // 2: class.v1alpha1.ClassService.GetClassLogo:output_type -> class.v1alpha1.GetClassLogoResponse
|
||||||
|
2, // [2:3] is the sub-list for method output_type
|
||||||
|
1, // [1:2] is the sub-list for method input_type
|
||||||
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
|
0, // [0:1] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_class_v1alpha1_class_proto_init() }
|
||||||
|
func file_class_v1alpha1_class_proto_init() {
|
||||||
|
if File_class_v1alpha1_class_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_class_v1alpha1_class_proto_msgTypes[0].OneofWrappers = []any{}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_class_v1alpha1_class_proto_rawDesc), len(file_class_v1alpha1_class_proto_rawDesc)),
|
||||||
|
NumEnums: 1,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_class_v1alpha1_class_proto_goTypes,
|
||||||
|
DependencyIndexes: file_class_v1alpha1_class_proto_depIdxs,
|
||||||
|
EnumInfos: file_class_v1alpha1_class_proto_enumTypes,
|
||||||
|
MessageInfos: file_class_v1alpha1_class_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_class_v1alpha1_class_proto = out.File
|
||||||
|
file_class_v1alpha1_class_proto_goTypes = nil
|
||||||
|
file_class_v1alpha1_class_proto_depIdxs = nil
|
||||||
|
}
|
163
api/class/v1alpha1/class.pb.gw.go
Normal file
163
api/class/v1alpha1/class.pb.gw.go
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||||
|
// source: class/v1alpha1/class.proto
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package class is a reverse proxy.
|
||||||
|
|
||||||
|
It translates gRPC into RESTful JSON APIs.
|
||||||
|
*/
|
||||||
|
package class
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
|
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/grpclog"
|
||||||
|
"google.golang.org/grpc/metadata"
|
||||||
|
"google.golang.org/grpc/status"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Suppress "imported and not used" errors
|
||||||
|
var (
|
||||||
|
_ codes.Code
|
||||||
|
_ io.Reader
|
||||||
|
_ status.Status
|
||||||
|
_ = errors.New
|
||||||
|
_ = runtime.String
|
||||||
|
_ = utilities.NewDoubleArray
|
||||||
|
_ = metadata.Join
|
||||||
|
)
|
||||||
|
|
||||||
|
var filter_ClassService_GetClassLogo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||||
|
|
||||||
|
func request_ClassService_GetClassLogo_0(ctx context.Context, marshaler runtime.Marshaler, client ClassServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var (
|
||||||
|
protoReq GetClassLogoRequest
|
||||||
|
metadata runtime.ServerMetadata
|
||||||
|
)
|
||||||
|
io.Copy(io.Discard, req.Body)
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClassService_GetClassLogo_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
msg, err := client.GetClassLogo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_ClassService_GetClassLogo_0(ctx context.Context, marshaler runtime.Marshaler, server ClassServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var (
|
||||||
|
protoReq GetClassLogoRequest
|
||||||
|
metadata runtime.ServerMetadata
|
||||||
|
)
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClassService_GetClassLogo_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
msg, err := server.GetClassLogo(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterClassServiceHandlerServer registers the http handlers for service ClassService to "mux".
|
||||||
|
// UnaryRPC :call ClassServiceServer directly.
|
||||||
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClassServiceHandlerFromEndpoint instead.
|
||||||
|
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
|
||||||
|
func RegisterClassServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClassServiceServer) error {
|
||||||
|
mux.Handle(http.MethodGet, pattern_ClassService_GetClassLogo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/class.v1alpha1.ClassService/GetClassLogo", runtime.WithHTTPPathPattern("/v1alpha1/class/logo"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_ClassService_GetClassLogo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
forward_ClassService_GetClassLogo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterClassServiceHandlerFromEndpoint is same as RegisterClassServiceHandler but
|
||||||
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||||
|
func RegisterClassServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||||
|
conn, err := grpc.NewClient(endpoint, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if err != nil {
|
||||||
|
if cerr := conn.Close(); cerr != nil {
|
||||||
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
go func() {
|
||||||
|
<-ctx.Done()
|
||||||
|
if cerr := conn.Close(); cerr != nil {
|
||||||
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}()
|
||||||
|
return RegisterClassServiceHandler(ctx, mux, conn)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterClassServiceHandler registers the http handlers for service ClassService to "mux".
|
||||||
|
// The handlers forward requests to the grpc endpoint over "conn".
|
||||||
|
func RegisterClassServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||||
|
return RegisterClassServiceHandlerClient(ctx, mux, NewClassServiceClient(conn))
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterClassServiceHandlerClient registers the http handlers for service ClassService
|
||||||
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClassServiceClient".
|
||||||
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClassServiceClient"
|
||||||
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||||
|
// "ClassServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
|
||||||
|
func RegisterClassServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClassServiceClient) error {
|
||||||
|
mux.Handle(http.MethodGet, pattern_ClassService_GetClassLogo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/class.v1alpha1.ClassService/GetClassLogo", runtime.WithHTTPPathPattern("/v1alpha1/class/logo"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_ClassService_GetClassLogo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
forward_ClassService_GetClassLogo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
})
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
pattern_ClassService_GetClassLogo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1alpha1", "class", "logo"}, ""))
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
forward_ClassService_GetClassLogo_0 = runtime.ForwardResponseMessage
|
||||||
|
)
|
121
api/class/v1alpha1/class_grpc.pb.go
Normal file
121
api/class/v1alpha1/class_grpc.pb.go
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
|
// - protoc v5.29.3
|
||||||
|
// source: class/v1alpha1/class.proto
|
||||||
|
|
||||||
|
package class
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.64.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
|
const (
|
||||||
|
ClassService_GetClassLogo_FullMethodName = "/class.v1alpha1.ClassService/GetClassLogo"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ClassServiceClient is the client API for ClassService service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type ClassServiceClient interface {
|
||||||
|
GetClassLogo(ctx context.Context, in *GetClassLogoRequest, opts ...grpc.CallOption) (*GetClassLogoResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type classServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewClassServiceClient(cc grpc.ClientConnInterface) ClassServiceClient {
|
||||||
|
return &classServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *classServiceClient) GetClassLogo(ctx context.Context, in *GetClassLogoRequest, opts ...grpc.CallOption) (*GetClassLogoResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetClassLogoResponse)
|
||||||
|
err := c.cc.Invoke(ctx, ClassService_GetClassLogo_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClassServiceServer is the server API for ClassService service.
|
||||||
|
// All implementations must embed UnimplementedClassServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type ClassServiceServer interface {
|
||||||
|
GetClassLogo(context.Context, *GetClassLogoRequest) (*GetClassLogoResponse, error)
|
||||||
|
mustEmbedUnimplementedClassServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedClassServiceServer must be embedded to have
|
||||||
|
// forward compatible implementations.
|
||||||
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedClassServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedClassServiceServer) GetClassLogo(context.Context, *GetClassLogoRequest) (*GetClassLogoResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetClassLogo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedClassServiceServer) mustEmbedUnimplementedClassServiceServer() {}
|
||||||
|
func (UnimplementedClassServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeClassServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to ClassServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeClassServiceServer interface {
|
||||||
|
mustEmbedUnimplementedClassServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterClassServiceServer(s grpc.ServiceRegistrar, srv ClassServiceServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedClassServiceServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
|
s.RegisterService(&ClassService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ClassService_GetClassLogo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetClassLogoRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ClassServiceServer).GetClassLogo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ClassService_GetClassLogo_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ClassServiceServer).GetClassLogo(ctx, req.(*GetClassLogoRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ClassService_ServiceDesc is the grpc.ServiceDesc for ClassService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var ClassService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "class.v1alpha1.ClassService",
|
||||||
|
HandlerType: (*ClassServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "GetClassLogo",
|
||||||
|
Handler: _ClassService_GetClassLogo_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "class/v1alpha1/class.proto",
|
||||||
|
}
|
@ -153,7 +153,7 @@ const file_demo_app_v1alpha1_app_proto_rawDesc = "" +
|
|||||||
"\x06source\x18\x03 \x01(\tR\x06source\x12\x1a\n" +
|
"\x06source\x18\x03 \x01(\tR\x06source\x12\x1a\n" +
|
||||||
"\blanguage\x18\x04 \x01(\tR\blanguage2z\n" +
|
"\blanguage\x18\x04 \x01(\tR\blanguage2z\n" +
|
||||||
"\x0eDemoAppService\x12h\n" +
|
"\x0eDemoAppService\x12h\n" +
|
||||||
"\aGetDemo\x12!.demo.app.v1alpha1.GetDemoRequest\x1a\".demo.app.v1alpha1.GetDemoResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/v1alpha1/demoBNZLgitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/demob\x06proto3"
|
"\aGetDemo\x12!.demo.app.v1alpha1.GetDemoRequest\x1a\".demo.app.v1alpha1.GetDemoResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/v1alpha1/demoBGZEgitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/demob\x06proto3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_demo_app_v1alpha1_app_proto_rawDescOnce sync.Once
|
file_demo_app_v1alpha1_app_proto_rawDescOnce sync.Once
|
||||||
|
@ -7,9 +7,9 @@ opts:
|
|||||||
factType: random
|
factType: random
|
||||||
|
|
||||||
# go-app config
|
# go-app config
|
||||||
name: Demo go-app
|
name: Class App
|
||||||
logging:
|
logging:
|
||||||
format: console
|
format: json
|
||||||
level: trace
|
level: trace
|
||||||
enabled: true
|
enabled: true
|
||||||
otel:
|
otel:
|
||||||
@ -17,12 +17,12 @@ otel:
|
|||||||
stdoutEnabled: false
|
stdoutEnabled: false
|
||||||
http:
|
http:
|
||||||
enabled: true
|
enabled: true
|
||||||
listen: :8080
|
listen: :18080
|
||||||
logRequests: true
|
logRequests: true
|
||||||
grpc:
|
grpc:
|
||||||
enabled: true
|
enabled: true
|
||||||
enableReflection: true
|
enableReflection: true
|
||||||
listen: :8081
|
listen: :18081
|
||||||
grpcGatewayPath: /api
|
grpcGatewayPath: /api
|
||||||
enableGRPCGateway: true
|
enableGRPCGateway: true
|
||||||
enableInstrumentation: true
|
enableInstrumentation: true
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "demo/app/v1alpha1/app.proto",
|
"title": "class/v1alpha1/class.proto",
|
||||||
"version": "version not set"
|
"version": "version not set"
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
|
{
|
||||||
|
"name": "ClassService"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "DemoAppService"
|
"name": "DemoAppService"
|
||||||
}
|
}
|
||||||
@ -16,6 +19,189 @@
|
|||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"paths": {
|
"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": {
|
"/v1alpha1/demo": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "DemoAppService_GetDemo",
|
"operationId": "DemoAppService_GetDemo",
|
||||||
@ -76,6 +262,168 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"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": {
|
"v1alpha1GetDemoResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
1
go.mod
1
go.mod
@ -4,6 +4,7 @@ go 1.24.1
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
gitea.libretechconsulting.com/rmcguire/go-app v0.9.2
|
gitea.libretechconsulting.com/rmcguire/go-app v0.9.2
|
||||||
|
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be
|
||||||
github.com/go-resty/resty/v2 v2.16.5
|
github.com/go-resty/resty/v2 v2.16.5
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3
|
||||||
github.com/rs/zerolog v1.34.0
|
github.com/rs/zerolog v1.34.0
|
||||||
|
3
go.sum
3
go.sum
@ -12,6 +12,8 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3
|
|||||||
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
|
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be h1:J5BL2kskAlV9ckgEsNQXscjIaLiOYiZ75d4e94E6dcQ=
|
||||||
|
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w=
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@ -33,7 +35,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
|||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1 h1:KcFzXwzM/kGhIRHvc8jdixfIJjVzuUJdnv+5xsPutog=
|
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1 h1:KcFzXwzM/kGhIRHvc8jdixfIJjVzuUJdnv+5xsPutog=
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc=
|
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc=
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
|
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
|
||||||
github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc=
|
github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc=
|
||||||
|
7
main.go
7
main.go
@ -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"
|
||||||
|
|
||||||
|
"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"
|
||||||
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/demohttp"
|
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/demohttp"
|
||||||
@ -51,12 +52,14 @@ 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)
|
||||||
|
|
||||||
// Prepare app
|
// Prepare app
|
||||||
app := &app.App{
|
app := &app.App{
|
||||||
AppContext: ctx,
|
AppContext: ctx,
|
||||||
GRPC: &optsgrpc.AppGRPC{
|
GRPC: &optsgrpc.AppGRPC{
|
||||||
Services: demoGRPC.GetServices(),
|
Services: append(demoGRPC.GetServices(), classGRPC.GetServices()...),
|
||||||
GRPCDialOpts: demoGRPC.GetDialOpts(),
|
GRPCDialOpts: append(demoGRPC.GetDialOpts(), classGRPC.GetDialOpts()...),
|
||||||
},
|
},
|
||||||
HTTP: &optshttp.AppHTTP{
|
HTTP: &optshttp.AppHTTP{
|
||||||
Ctx: ctx,
|
Ctx: ctx,
|
||||||
|
45
pkg/classgrpc/class.go
Normal file
45
pkg/classgrpc/class.go
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package classgrpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
figure "github.com/common-nighthawk/go-figure"
|
||||||
|
|
||||||
|
class "gitea.libretechconsulting.com/rmcguire/class-server/api/class/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ClassService struct {
|
||||||
|
class.UnimplementedClassServiceServer
|
||||||
|
ctx context.Context
|
||||||
|
}
|
||||||
|
|
||||||
|
var DefaultFont = class.Font_FONT_BARBWIRE
|
||||||
|
|
||||||
|
func (s *ClassService) GetClassLogo(ctx context.Context, req *class.GetClassLogoRequest) (*class.GetClassLogoResponse, error) {
|
||||||
|
if req.GetFont() == class.Font_FONT_UNSPECIFIED {
|
||||||
|
req.Font = DefaultFont
|
||||||
|
}
|
||||||
|
|
||||||
|
f := figure.NewFigure("Indiana Tech", getFontString(req.GetFont()), false)
|
||||||
|
|
||||||
|
resp := &class.GetClassLogoResponse{
|
||||||
|
LogoBytes: []byte(f.String()),
|
||||||
|
}
|
||||||
|
|
||||||
|
if req.GetIncludeString() {
|
||||||
|
resp.LogoString = f.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func getFontString(font class.Font) string {
|
||||||
|
return strings.ToLower(strings.ReplaceAll(font.String(), "FONT_", ""))
|
||||||
|
}
|
||||||
|
|
||||||
|
func New(ctx context.Context) *ClassService {
|
||||||
|
return &ClassService{
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
30
pkg/classgrpc/server.go
Normal file
30
pkg/classgrpc/server.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package classgrpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/grpc/opts"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
|
|
||||||
|
class "gitea.libretechconsulting.com/rmcguire/class-server/api/class/v1alpha1"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (s *ClassService) GetDialOpts() []grpc.DialOption {
|
||||||
|
return []grpc.DialOption{
|
||||||
|
// NOTE: Necessary for grpc-gateway to connect to grpc server
|
||||||
|
// Update if grpc service has credentials, tls, etc..
|
||||||
|
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *ClassService) GetServices() []*opts.GRPCService {
|
||||||
|
return []*opts.GRPCService{
|
||||||
|
{
|
||||||
|
Name: "Class App",
|
||||||
|
Type: &class.ClassService_ServiceDesc,
|
||||||
|
Service: s,
|
||||||
|
GwRegistrationFuncs: []opts.GwRegistrationFunc{
|
||||||
|
class.RegisterClassServiceHandler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
@ -2,21 +2,159 @@ syntax = "proto3";
|
|||||||
package class.v1alpha1;
|
package class.v1alpha1;
|
||||||
|
|
||||||
import "google/api/annotations.proto";
|
import "google/api/annotations.proto";
|
||||||
import "google/protobuf/timestamp.proto";
|
|
||||||
|
|
||||||
option go_package = "gitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/class";
|
option go_package = "gitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/class";
|
||||||
|
|
||||||
enum LogoType {
|
enum Font {
|
||||||
LOGO_TYPE_UNSPECIFIED = 0;
|
FONT_UNSPECIFIED = 0;
|
||||||
LOGO_TYPE_RANDOM = 1;
|
FONT_3X5 = 2;
|
||||||
LOGO_TYPE_TECH = 2;
|
FONT_5LINEOBLIQUE = 3;
|
||||||
|
FONT_ACROBATIC = 4;
|
||||||
|
FONT_ALLIGATOR = 5;
|
||||||
|
FONT_ALLIGATOR2 = 6;
|
||||||
|
FONT_ALPHABET = 7;
|
||||||
|
FONT_AVATAR = 8;
|
||||||
|
FONT_BANNER = 9;
|
||||||
|
FONT_BANNER3 = 11;
|
||||||
|
FONT_BANNER4 = 12;
|
||||||
|
FONT_BARBWIRE = 13;
|
||||||
|
FONT_BASIC = 14;
|
||||||
|
FONT_BELL = 15;
|
||||||
|
FONT_BIG = 16;
|
||||||
|
FONT_BIGCHIEF = 17;
|
||||||
|
FONT_BINARY = 18;
|
||||||
|
FONT_BLOCK = 19;
|
||||||
|
FONT_BUBBLE = 20;
|
||||||
|
FONT_BULBHEAD = 21;
|
||||||
|
FONT_CALGPHY2 = 22;
|
||||||
|
FONT_CALIGRAPHY = 23;
|
||||||
|
FONT_CATWALK = 24;
|
||||||
|
FONT_CHUNKY = 25;
|
||||||
|
FONT_COINSTAK = 26;
|
||||||
|
FONT_COLOSSAL = 27;
|
||||||
|
FONT_COMPUTER = 28;
|
||||||
|
FONT_CONTESSA = 29;
|
||||||
|
FONT_CONTRAST = 30;
|
||||||
|
FONT_COSMIC = 31;
|
||||||
|
FONT_COSMIKE = 32;
|
||||||
|
FONT_CRICKET = 33;
|
||||||
|
FONT_CURSIVE = 34;
|
||||||
|
FONT_CYBERLARGE = 35;
|
||||||
|
FONT_CYBERMEDIUM = 36;
|
||||||
|
FONT_CYBERSMALL = 37;
|
||||||
|
FONT_DIAMOND = 38;
|
||||||
|
FONT_DIGITAL = 39;
|
||||||
|
FONT_DOH = 40;
|
||||||
|
FONT_DOOM = 41;
|
||||||
|
FONT_DOTMATRIX = 42;
|
||||||
|
FONT_DRPEPPER = 43;
|
||||||
|
FONT_EFTICHESS = 44;
|
||||||
|
FONT_EFTIFONT = 45;
|
||||||
|
FONT_EFTIPITI = 46;
|
||||||
|
FONT_EFTIROBOT = 47;
|
||||||
|
FONT_EFTITALIC = 48;
|
||||||
|
FONT_EFTIWALL = 49;
|
||||||
|
FONT_EFTIWATER = 50;
|
||||||
|
FONT_EPIC = 51;
|
||||||
|
FONT_FENDER = 52;
|
||||||
|
FONT_FOURTOPS = 53;
|
||||||
|
FONT_FUZZY = 54;
|
||||||
|
FONT_GOOFY = 55;
|
||||||
|
FONT_GOTHIC = 56;
|
||||||
|
FONT_GRAFFITI = 57;
|
||||||
|
FONT_HOLLYWOOD = 58;
|
||||||
|
FONT_INVITA = 59;
|
||||||
|
FONT_ISOMETRIC1 = 60;
|
||||||
|
FONT_ISOMETRIC2 = 61;
|
||||||
|
FONT_ISOMETRIC3 = 62;
|
||||||
|
FONT_ISOMETRIC4 = 63;
|
||||||
|
FONT_ITALIC = 64;
|
||||||
|
FONT_IVRIT = 65;
|
||||||
|
FONT_JAZMINE = 66;
|
||||||
|
FONT_JERUSALEM = 67;
|
||||||
|
FONT_KATAKANA = 68;
|
||||||
|
FONT_KBAN = 69;
|
||||||
|
FONT_LARRY3D = 70;
|
||||||
|
FONT_LCD = 71;
|
||||||
|
FONT_LEAN = 72;
|
||||||
|
FONT_LETTERS = 73;
|
||||||
|
FONT_LINUX = 74;
|
||||||
|
FONT_LOCKERGNOME = 75;
|
||||||
|
FONT_MADRID = 76;
|
||||||
|
FONT_MARQUEE = 77;
|
||||||
|
FONT_MAXFOUR = 78;
|
||||||
|
FONT_MIKE = 79;
|
||||||
|
FONT_MINI = 80;
|
||||||
|
FONT_MIRROR = 81;
|
||||||
|
FONT_MNEMONIC = 82;
|
||||||
|
FONT_MORSE = 83;
|
||||||
|
FONT_MOSCOW = 84;
|
||||||
|
FONT_NANCYJ = 87;
|
||||||
|
FONT_NIPPLES = 88;
|
||||||
|
FONT_NTGREEK = 89;
|
||||||
|
FONT_O8 = 90;
|
||||||
|
FONT_OGRE = 91;
|
||||||
|
FONT_PAWP = 92;
|
||||||
|
FONT_PEAKS = 93;
|
||||||
|
FONT_PEBBLES = 94;
|
||||||
|
FONT_PEPPER = 95;
|
||||||
|
FONT_POISON = 96;
|
||||||
|
FONT_PUFFY = 97;
|
||||||
|
FONT_PYRAMID = 98;
|
||||||
|
FONT_RECTANGLES = 99;
|
||||||
|
FONT_RELIEF = 100;
|
||||||
|
FONT_RELIEF2 = 101;
|
||||||
|
FONT_REV = 102;
|
||||||
|
FONT_ROMAN = 103;
|
||||||
|
FONT_ROT13 = 104;
|
||||||
|
FONT_ROUNDED = 105;
|
||||||
|
FONT_ROWANCAP = 106;
|
||||||
|
FONT_ROZZO = 107;
|
||||||
|
FONT_RUNIC = 108;
|
||||||
|
FONT_RUNYC = 109;
|
||||||
|
FONT_SBLOOD = 110;
|
||||||
|
FONT_SCRIPT = 111;
|
||||||
|
FONT_SERIFCAP = 112;
|
||||||
|
FONT_SHADOW = 113;
|
||||||
|
FONT_SHORT = 114;
|
||||||
|
FONT_SLANT = 115;
|
||||||
|
FONT_SLIDE = 116;
|
||||||
|
FONT_SLSCRIPT = 117;
|
||||||
|
FONT_SMALL = 118;
|
||||||
|
FONT_SMISOME1 = 119;
|
||||||
|
FONT_SMKEYBOARD = 120;
|
||||||
|
FONT_SMSCRIPT = 121;
|
||||||
|
FONT_SMSHADOW = 122;
|
||||||
|
FONT_SMSLANT = 123;
|
||||||
|
FONT_SMTENGWAR = 124;
|
||||||
|
FONT_SPEED = 125;
|
||||||
|
FONT_STAMPATELLO = 126;
|
||||||
|
FONT_STANDARD = 127;
|
||||||
|
FONT_STARWARS = 128;
|
||||||
|
FONT_STELLAR = 129;
|
||||||
|
FONT_STOP = 130;
|
||||||
|
FONT_STRAIGHT = 131;
|
||||||
|
FONT_TANJA = 132;
|
||||||
|
FONT_TENGWAR = 133;
|
||||||
|
FONT_TERM = 134;
|
||||||
|
FONT_THICK = 135;
|
||||||
|
FONT_THIN = 136;
|
||||||
|
FONT_THREEPOINT = 137;
|
||||||
|
FONT_TICKS = 138;
|
||||||
|
FONT_TICKSSLANT = 139;
|
||||||
|
FONT_TOMBSTONE = 141;
|
||||||
|
FONT_TREK = 142;
|
||||||
|
FONT_TSALAGI = 143;
|
||||||
|
FONT_TWOPOINT = 144;
|
||||||
|
FONT_UNIVERS = 145;
|
||||||
|
FONT_USAFLAG = 146;
|
||||||
|
FONT_WAVY = 147;
|
||||||
|
FONT_WEIRD = 148;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetClassLogoRequest {
|
message GetClassLogoRequest {
|
||||||
LogoType logo_type = 1;
|
Font font = 1;
|
||||||
// Default is no padding
|
optional bool include_string = 2;
|
||||||
optional uint32 logo_padding = 2;
|
|
||||||
optional bool include_string = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetClassLogoResponse {
|
message GetClassLogoResponse {
|
||||||
|
Reference in New Issue
Block a user