Skip to content

Commit 30f9038

Browse files
committed
feat: Do basic port to go-app V10 and latest gRPC versions, bump dependencies, use correct default frontend API placeholders
Signed-off-by: Felicitas Pojtinger <[email protected]>
1 parent a2dc93f commit 30f9038

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1519
-1940
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ clean:
5151

5252
depend:
5353
# Setup CLIs
54-
GO111MODULE=on go get github.com/golang/protobuf/protoc-gen-go@latest
55-
GO111MODULE=on go get github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
56-
GO111MODULE=on go get github.com/golang/protobuf/protoc-gen-go@latest
54+
GO111MODULE=on go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
55+
GO111MODULE=on go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
5756
# Generate bindings
5857
go generate ./...

api/proto/v1/events.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ syntax = "proto3";
22

33
package com.pojtinger.felicitas.bofied;
44

5-
import "google/protobuf/empty.proto";
6-
75
option go_package = "github.com/pojntfx/bofied/pkg/api/proto/v1";
86

7+
import "metadata.proto";
8+
99
service EventsService {
10-
rpc SubscribeToEvents(google.protobuf.Empty) returns (stream EventMessage);
10+
rpc SubscribeToEvents(Empty) returns (stream EventMessage);
1111
}
1212

1313
message EventMessage {

api/proto/v1/metadata.proto

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ syntax = "proto3";
22

33
package com.pojtinger.felicitas.bofied;
44

5-
import "google/protobuf/empty.proto";
6-
75
option go_package = "github.com/pojntfx/bofied/pkg/api/proto/v1";
86

9-
service MetadataService {
10-
rpc GetMetadata(google.protobuf.Empty) returns (MetadataMessage);
11-
}
7+
message Empty {}
8+
9+
service MetadataService { rpc GetMetadata(Empty) returns (MetadataMessage); }
1210

1311
message MetadataMessage {
1412
string AdvertisedIP = 1;

cmd/bofied-backend/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/pojntfx/bofied/pkg/eventing"
1313
"github.com/pojntfx/bofied/pkg/servers"
1414
"github.com/pojntfx/bofied/pkg/services"
15-
"github.com/pojntfx/liwasc/pkg/validators"
15+
"github.com/pojntfx/bofied/pkg/validators"
1616
"github.com/spf13/cobra"
1717
"github.com/spf13/viper"
1818
)

cmd/bofied-frontend/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ import (
66
"net/http"
77

88
"github.com/kataras/compress"
9-
"github.com/maxence-charriere/go-app/v9/pkg/app"
9+
"github.com/maxence-charriere/go-app/v10/pkg/app"
1010
"github.com/pojntfx/bofied/pkg/components"
1111
)
1212

1313
func main() {
1414
// Client-side code
1515
{
1616
// Define the routes
17-
app.Route("/", &components.Home{})
17+
app.Route("/", func() app.Composer {
18+
return &components.Home{}
19+
})
1820

1921
// Start the app
2022
app.RunWhenOnBrowser()

go.mod

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,54 @@
11
module github.com/pojntfx/bofied
22

3-
go 1.16
3+
go 1.22.7
44

55
require (
6-
github.com/codeclysm/extract/v3 v3.0.2
7-
github.com/coreos/go-oidc/v3 v3.0.0
8-
github.com/fullstorydev/grpcurl v1.8.1 // indirect
9-
github.com/golang/protobuf v1.5.2
6+
github.com/codeclysm/extract/v3 v3.1.1
7+
github.com/coreos/go-oidc/v3 v3.11.0
108
github.com/google/gopacket v1.1.19
119
github.com/kataras/compress v0.0.6
12-
github.com/maxence-charriere/go-app/v9 v9.0.0-20210522022017-692ebc622535
13-
github.com/pin/tftp v2.1.0+incompatible
14-
github.com/pojntfx/go-app-grpc-chat-frontend-web v0.0.0-20200914214440-b28bb959fef9
15-
github.com/pojntfx/liwasc v0.0.0-20210418112916-18ce29ed848d
16-
github.com/rs/cors v1.7.0
17-
github.com/spf13/cobra v1.1.3
18-
github.com/spf13/viper v1.7.1
19-
github.com/studio-b12/gowebdav v0.0.0-20210203212356-8244b5a5f51a
20-
github.com/traefik/yaegi v0.9.17
10+
github.com/maxence-charriere/go-app/v10 v10.0.8
11+
github.com/pin/tftp/v3 v3.1.0
12+
github.com/rs/cors v1.11.1
13+
github.com/spf13/cobra v1.8.1
14+
github.com/spf13/viper v1.19.0
15+
github.com/studio-b12/gowebdav v0.9.0
16+
github.com/traefik/yaegi v0.16.1
2117
github.com/ugjka/messenger v1.1.3
22-
golang.org/x/net v0.0.0-20210420210106-798c2154c571
23-
golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78
24-
google.golang.org/grpc v1.37.0
25-
google.golang.org/protobuf v1.26.0
26-
nhooyr.io/websocket v1.8.6
18+
golang.org/x/net v0.30.0
19+
golang.org/x/oauth2 v0.23.0
20+
google.golang.org/grpc v1.67.1
21+
google.golang.org/protobuf v1.35.1
22+
nhooyr.io/websocket v1.8.17
23+
)
24+
25+
require (
26+
github.com/andybalholm/brotli v1.1.1 // indirect
27+
github.com/fsnotify/fsnotify v1.7.0 // indirect
28+
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
29+
github.com/google/uuid v1.6.0 // indirect
30+
github.com/h2non/filetype v1.1.3 // indirect
31+
github.com/hashicorp/hcl v1.0.0 // indirect
32+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
33+
github.com/juju/errors v1.0.0 // indirect
34+
github.com/klauspost/compress v1.17.11 // indirect
35+
github.com/magiconair/properties v1.8.7 // indirect
36+
github.com/mitchellh/mapstructure v1.5.0 // indirect
37+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
38+
github.com/sagikazarmark/locafero v0.6.0 // indirect
39+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
40+
github.com/sourcegraph/conc v0.3.0 // indirect
41+
github.com/spf13/afero v1.11.0 // indirect
42+
github.com/spf13/cast v1.7.0 // indirect
43+
github.com/spf13/pflag v1.0.5 // indirect
44+
github.com/subosito/gotenv v1.6.0 // indirect
45+
github.com/ulikunitz/xz v0.5.12 // indirect
46+
go.uber.org/multierr v1.11.0 // indirect
47+
golang.org/x/crypto v0.28.0 // indirect
48+
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
49+
golang.org/x/sys v0.26.0 // indirect
50+
golang.org/x/text v0.19.0 // indirect
51+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
52+
gopkg.in/ini.v1 v1.67.0 // indirect
53+
gopkg.in/yaml.v3 v3.0.1 // indirect
2754
)

0 commit comments

Comments
 (0)