Skip to content

Commit b53c461

Browse files
committed
perf: add pg_ssl_mode field
1 parent 1131a82 commit b53c461

10 files changed

Lines changed: 57282 additions & 12 deletions

File tree

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ proto_go_dir=./protobuf-go
7777
protobuf_py_dir=./protobuf-py/protobuf
7878

7979
.PHONY: proto
80-
proto: proto-go
80+
proto: proto-go proto-java
8181

8282
.PHONY: proto-go
8383
proto-go:
@@ -96,3 +96,11 @@ proto-py:
9696
--pyi_out=./protobuf-py/protobuf \
9797
--grpc_python_out=./protobuf-py/protobuf \
9898
${proto_files}
99+
100+
.PHONY: proto-java
101+
proto-java:
102+
@mkdir -p ./protobuf-java
103+
protoc --proto_path=${proto_path} --java_out=./protobuf-java \
104+
--grpc_out=./protobuf-java \
105+
--plugin=protoc-gen-grpc=$(shell which protoc-gen-grpc-java) \
106+
${proto_files}

cmd/impl/convert_pb.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func ConvertToProtobufAsset(asset model.Asset) *pb.Asset {
5151
Protocols: ConvertToProtobufProtocols(protocols),
5252
Specific: &pb.Asset_Specific{
5353
DbName: specific.DBName,
54+
PgSslMode: specific.PgSSLMode,
5455
UseSsl: specific.UseSSL,
5556
CaCert: secretInfo.CaCert,
5657
ClientCert: secretInfo.ClientCert,

pkg/jms-sdk-go/model/asset.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ type SpecInfo struct {
1515
// database
1616
DBName string `json:"db_name"`
1717

18+
PgSSLMode string `json:"pg_ssl_mode"`
19+
1820
UseSSL bool `json:"use_ssl"`
1921
AllowInvalidCert bool `json:"allow_invalid_cert"`
2022

@@ -127,3 +129,10 @@ const (
127129
ProtocolK8S = "k8s"
128130
ProtocolMysql = "mysql"
129131
)
132+
133+
const (
134+
PGSSLPrefer = "prefer"
135+
PGSSLRequire = "require"
136+
PGSSLVerifyCa = "verify-ca"
137+
PGSSLVerifyFull = "verify-full"
138+
)

protobuf-go/protobuf/common.pb.go

Lines changed: 17 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protobuf-go/protobuf/service.pb.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protobuf-go/protobuf/service_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)