generated from rmcguire/go-server-with-otel
rename and frame out proto
This commit is contained in:
@ -8,7 +8,7 @@ env:
|
||||
PACKAGE_NAME: go-server-with-otel
|
||||
BINARY_PATH: bin
|
||||
BINARY_NAME: go-server-with-otel
|
||||
GO_MOD_PATH: gitea.libretechconsulting.com/rmcguire/go-server-with-otel
|
||||
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
|
||||
VERSION: ${{ github.ref_name }}
|
||||
|
2
Makefile
2
Makefile
@ -8,7 +8,7 @@ PROTO_DIRS := $(wildcard proto/demo/app/*) # TODO: Update path (probably not dem
|
||||
PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64
|
||||
OUTPUT_DIR := bin
|
||||
VER_PKG := gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version
|
||||
GIT_REPO := gitea.libretechconsulting.com/rmcguire/go-server-with-otel
|
||||
GIT_REPO := gitea.libretechconsulting.com/rmcguire/class-server
|
||||
|
||||
all: proto test build docker
|
||||
|
||||
|
@ -153,7 +153,7 @@ const file_demo_app_v1alpha1_app_proto_rawDesc = "" +
|
||||
"\x06source\x18\x03 \x01(\tR\x06source\x12\x1a\n" +
|
||||
"\blanguage\x18\x04 \x01(\tR\blanguage2z\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/go-server-with-otel/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/demoBNZLgitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/demob\x06proto3"
|
||||
|
||||
var (
|
||||
file_demo_app_v1alpha1_app_proto_rawDescOnce sync.Once
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module gitea.libretechconsulting.com/rmcguire/go-server-with-otel
|
||||
module gitea.libretechconsulting.com/rmcguire/class-server
|
||||
|
||||
go 1.24.1
|
||||
|
||||
|
@ -32,7 +32,7 @@ hull:
|
||||
## Chart settings
|
||||
settings:
|
||||
resources: {} # Applies to the app container
|
||||
repo: gitea.libretechconsulting.com/rmcguire/go-server-with-otel
|
||||
repo: gitea.libretechconsulting.com/rmcguire/class-server
|
||||
tag: _HT**Chart.AppVersion
|
||||
|
||||
httpPort: 8080 # Should match appConfig http.listen
|
||||
|
6
main.go
6
main.go
@ -23,9 +23,9 @@ import (
|
||||
optsgrpc "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/grpc/opts"
|
||||
optshttp "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/http/opts"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/go-server-with-otel/pkg/config"
|
||||
"gitea.libretechconsulting.com/rmcguire/go-server-with-otel/pkg/demogrpc"
|
||||
"gitea.libretechconsulting.com/rmcguire/go-server-with-otel/pkg/demohttp"
|
||||
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/config"
|
||||
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/demogrpc"
|
||||
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/demohttp"
|
||||
)
|
||||
|
||||
var flagSchema bool
|
||||
|
@ -15,8 +15,8 @@ import (
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/otel"
|
||||
|
||||
pb "gitea.libretechconsulting.com/rmcguire/go-server-with-otel/api/demo/app/v1alpha1"
|
||||
"gitea.libretechconsulting.com/rmcguire/go-server-with-otel/pkg/config"
|
||||
pb "gitea.libretechconsulting.com/rmcguire/class-server/api/demo/app/v1alpha1"
|
||||
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/config"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -3,7 +3,7 @@ package demogrpc
|
||||
import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
pb "gitea.libretechconsulting.com/rmcguire/go-server-with-otel/api/demo/app/v1alpha1"
|
||||
pb "gitea.libretechconsulting.com/rmcguire/class-server/api/demo/app/v1alpha1"
|
||||
)
|
||||
|
||||
type RandomFact struct {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
demoAppPb "gitea.libretechconsulting.com/rmcguire/go-server-with-otel/api/demo/app/v1alpha1"
|
||||
demoAppPb "gitea.libretechconsulting.com/rmcguire/class-server/api/demo/app/v1alpha1"
|
||||
)
|
||||
|
||||
func (ds *DemoGRPCServer) GetDialOpts() []grpc.DialOption {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/http/opts"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/go-server-with-otel/pkg/config"
|
||||
"gitea.libretechconsulting.com/rmcguire/class-server/pkg/config"
|
||||
)
|
||||
|
||||
type DemoHTTPServer struct {
|
||||
|
31
proto/class/v1alpha1/class.proto
Normal file
31
proto/class/v1alpha1/class.proto
Normal file
@ -0,0 +1,31 @@
|
||||
syntax = "proto3";
|
||||
package class.v1alpha1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/class";
|
||||
|
||||
enum LogoType {
|
||||
LOGO_TYPE_UNSPECIFIED = 0;
|
||||
LOGO_TYPE_RANDOM = 1;
|
||||
LOGO_TYPE_TECH = 2;
|
||||
}
|
||||
|
||||
message GetClassLogoRequest {
|
||||
LogoType logo_type = 1;
|
||||
// Default is no padding
|
||||
optional uint32 logo_padding = 2;
|
||||
optional bool include_string = 3;
|
||||
}
|
||||
|
||||
message GetClassLogoResponse {
|
||||
bytes logo_bytes = 1;
|
||||
string logo_string = 2;
|
||||
}
|
||||
|
||||
service ClassService {
|
||||
rpc GetClassLogo(GetClassLogoRequest) returns (GetClassLogoResponse) {
|
||||
option (google.api.http) = {get: "/v1alpha1/class/logo"}; // grpc-gateway endpoint
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ package demo.app.v1alpha1;
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gitea.libretechconsulting.com/rmcguire/go-server-with-otel/api/v1alpha1/demo";
|
||||
option go_package = "gitea.libretechconsulting.com/rmcguire/class-server/api/v1alpha1/demo";
|
||||
|
||||
// Options for random fact, in this case
|
||||
// just a language
|
||||
|
Reference in New Issue
Block a user