Skip to content

Commit 197215e

Browse files
committed
protobuf build refactor and go upgrade
1 parent cfea203 commit 197215e

File tree

22 files changed

+270
-431
lines changed

22 files changed

+270
-431
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Started rest API with clean architecture monorepo golang
1111
- [Notification Service](#notification-service)
1212

1313
## Required
14-
1. [Golang](https://go.dev/) v1.21.5 or above
14+
1. [Golang](https://go.dev/) v1.22.7 or above
1515
2. [MongoDB](https://www.mongodb.com/)
16-
3. [Buf](https://docs.buf.build/) to generate protobuf grpc
16+
3. [Buf](https://docs.buf.build/) to generate protobuf grpc (buf v1.47 or above)
1717

1818
## Installation
1919
1. copy environment by services `cp .env.example .env`

buf.gen.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
version: v1
1+
version: v2
22
managed:
33
enabled: true
4-
go_package_prefix:
5-
default: github.com/febrihidayan/go-architecture-monorepo/proto
64
plugins:
7-
- plugin: buf.build/protocolbuffers/go:v1.28.1
5+
- remote: buf.build/grpc/go
86
out: proto/_generated
97
opt:
108
- paths=source_relative
11-
- plugin: buf.build/grpc/go
9+
- require_unimplemented_servers=false
10+
- remote: buf.build/protocolbuffers/go
1211
out: proto/_generated
1312
opt:
1413
- paths=source_relative
15-
- require_unimplemented_servers=false
14+
inputs:
15+
- directory: proto

buf.work.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

buf.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
version: v1
2-
name: buf.build/github.com/febrihidayan/go-architecture-monorepo
3-
deps:
4-
- buf.build/googleapis/googleapis
1+
version: v2
2+
modules:
3+
- path: proto
4+
lint:
5+
use:
6+
- STANDARD
7+
breaking:
8+
use:
9+
- FILE

docker/auth/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# argument for Go version
2-
ARG GO_VERSION=1.21.5
2+
ARG GO_VERSION=1.22.7
33

44
# STAGE 1: building the executable
55
FROM golang:${GO_VERSION} AS builder

docker/notification/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# argument for Go version
2-
ARG GO_VERSION=1.21.5
2+
ARG GO_VERSION=1.22.7
33

44
# STAGE 1: building the executable
55
FROM golang:${GO_VERSION} AS builder

docker/storage/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# argument for Go version
2-
ARG GO_VERSION=1.21.5
2+
ARG GO_VERSION=1.22.7
33

44
# STAGE 1: building the executable
55
FROM golang:${GO_VERSION} AS builder

docker/user/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# argument for Go version
2-
ARG GO_VERSION=1.21.5
2+
ARG GO_VERSION=1.22.7
33

44
# STAGE 1: building the executable
55
FROM golang:${GO_VERSION} AS builder

go.mod

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/febrihidayan/go-architecture-monorepo
22

3-
go 1.18
3+
go 1.22.7
4+
5+
toolchain go1.23.3
46

57
require (
68
bou.ke/monkey v1.0.2
@@ -9,25 +11,24 @@ require (
911
github.com/aws/aws-sdk-go-v2/credentials v1.16.13
1012
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.7
1113
github.com/go-co-op/gocron/v2 v2.1.1
12-
github.com/google/uuid v1.5.0
14+
github.com/google/uuid v1.6.0
1315
github.com/gorilla/mux v1.8.0
1416
github.com/hashicorp/go-multierror v1.1.1
1517
github.com/kmacute/golvalidator v0.0.0-20210528052904-5a0248be89be
1618
github.com/mailgun/mailgun-go v2.0.0+incompatible
1719
github.com/rabbitmq/amqp091-go v1.10.0
1820
github.com/stretchr/testify v1.8.4
1921
go.mongodb.org/mongo-driver v1.10.2
20-
golang.org/x/crypto v0.17.0
22+
golang.org/x/crypto v0.27.0
2123
golang.org/x/exp v0.0.0-20231219180239-dc181d75b848
2224
google.golang.org/api v0.155.0
23-
google.golang.org/grpc v1.60.1
24-
google.golang.org/protobuf v1.31.0
25+
google.golang.org/grpc v1.68.0
26+
google.golang.org/protobuf v1.34.2
2527
)
2628

2729
require (
2830
cloud.google.com/go v0.110.10 // indirect
29-
cloud.google.com/go/compute v1.23.3 // indirect
30-
cloud.google.com/go/compute/metadata v0.2.3 // indirect
31+
cloud.google.com/go/compute/metadata v0.5.0 // indirect
3132
cloud.google.com/go/firestore v1.14.0 // indirect
3233
cloud.google.com/go/iam v1.1.5 // indirect
3334
cloud.google.com/go/longrunning v0.5.4 // indirect
@@ -50,7 +51,7 @@ require (
5051
github.com/go-logr/stdr v1.2.2 // indirect
5152
github.com/gobuffalo/envy v1.10.2 // indirect
5253
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
53-
github.com/golang/protobuf v1.5.3 // indirect
54+
github.com/golang/protobuf v1.5.4 // indirect
5455
github.com/golang/snappy v0.0.4 // indirect
5556
github.com/google/s2a-go v0.1.7 // indirect
5657
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
@@ -77,16 +78,16 @@ require (
7778
go.opentelemetry.io/otel v1.21.0 // indirect
7879
go.opentelemetry.io/otel/metric v1.21.0 // indirect
7980
go.opentelemetry.io/otel/trace v1.21.0 // indirect
80-
golang.org/x/net v0.19.0 // indirect
81-
golang.org/x/oauth2 v0.15.0 // indirect
82-
golang.org/x/sync v0.5.0 // indirect
83-
golang.org/x/sys v0.15.0 // indirect
84-
golang.org/x/text v0.14.0 // indirect
81+
golang.org/x/net v0.29.0 // indirect
82+
golang.org/x/oauth2 v0.23.0 // indirect
83+
golang.org/x/sync v0.8.0 // indirect
84+
golang.org/x/sys v0.25.0 // indirect
85+
golang.org/x/text v0.18.0 // indirect
8586
golang.org/x/time v0.5.0 // indirect
8687
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
8788
google.golang.org/appengine v1.6.8 // indirect
8889
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
89-
google.golang.org/genproto/googleapis/api v0.0.0-20231211222908-989df2bf70f3 // indirect
90-
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
90+
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
91+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
9192
gopkg.in/yaml.v3 v3.0.1 // indirect
9293
)

0 commit comments

Comments
 (0)