Skip to content

Commit

Permalink
perf: add pg_ssl_mode field
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Sep 13, 2024
1 parent 1131a82 commit 2582e63
Show file tree
Hide file tree
Showing 10 changed files with 57,282 additions and 12 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ proto_go_dir=./protobuf-go
protobuf_py_dir=./protobuf-py/protobuf

.PHONY: proto
proto: proto-go
proto: proto-go proto-java

.PHONY: proto-go
proto-go:
Expand All @@ -96,3 +96,11 @@ proto-py:
--pyi_out=./protobuf-py/protobuf \
--grpc_python_out=./protobuf-py/protobuf \
${proto_files}

.PHONY: proto-java
proto-java:
@mkdir -p ./protobuf-java
protoc --proto_path=${proto_path} --java_out=./protobuf-java \
--grpc_out=./protobuf-java \
--plugin=protoc-gen-grpc=$(shell which protoc-gen-grpc-java) \
${proto_files}
1 change: 1 addition & 0 deletions cmd/impl/convert_pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func ConvertToProtobufAsset(asset model.Asset) *pb.Asset {
Protocols: ConvertToProtobufProtocols(protocols),
Specific: &pb.Asset_Specific{
DbName: specific.DBName,
PgSslMode: specific.PgSSLMode,
UseSsl: specific.UseSSL,
CaCert: secretInfo.CaCert,
ClientCert: secretInfo.ClientCert,
Expand Down
9 changes: 9 additions & 0 deletions pkg/jms-sdk-go/model/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type SpecInfo struct {
// database
DBName string `json:"db_name"`

PgSSLMode string `json:"pg_ssl_mode"`

UseSSL bool `json:"use_ssl"`
AllowInvalidCert bool `json:"allow_invalid_cert"`

Expand Down Expand Up @@ -127,3 +129,10 @@ const (
ProtocolK8S = "k8s"
ProtocolMysql = "mysql"
)

const (
PGSSLPrefer = "prefer"
PGSSLRequire = "require"
PGSSLVerifyCa = "verify-ca"
PGSSLVerifyFull = "verify-full"
)
23 changes: 17 additions & 6 deletions protobuf-go/protobuf/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions protobuf-go/protobuf/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protobuf-go/protobuf/service_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2582e63

Please sign in to comment.