Skip to content

Commit

Permalink
Merge 8c61df4 into c4c6d81
Browse files Browse the repository at this point in the history
  • Loading branch information
macalimlim committed Jul 28, 2021
2 parents c4c6d81 + 8c61df4 commit 0178445
Show file tree
Hide file tree
Showing 27 changed files with 4,502 additions and 841 deletions.
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -34,3 +34,8 @@ test-cluster: setup-cluster
coverage: setup
lein code-coverage
docker-compose down

proto:
protoc -I=resources --java_out=test/ resources/proto/example.proto
protoc -I=resources --java_out=test/ resources/proto/person.proto
protoc -I=resources --java_out=src/ resources/proto/message-payload.proto
10 changes: 5 additions & 5 deletions project.clj
Expand Up @@ -36,7 +36,6 @@
[org.clojure/tools.logging "1.1.0"]
[nrepl/nrepl "0.8.3"]
[clojusc/protobuf "3.5.1-v1.1"]
[org.flatland/protobuf "0.8.1"]
[prismatic/schema "1.1.12"]
[clj-statsd "0.4.0"]
[ring/ring "1.9.3"]
Expand All @@ -53,7 +52,8 @@
com.fasterxml.jackson.core/jackson-core
com.fasterxml.jackson.dataformat/jackson-dataformat-smile
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor]]
[metosin/ring-swagger-ui "3.46.0"]]
[metosin/ring-swagger-ui "3.46.0"]
[com.google.protobuf/protobuf-java "3.17.3"]] ;; NOTE: protoc should have same version as this
:deploy-repositories [["clojars" {:url "https://clojars.org/repo"
:username :env/clojars_username
:password :env/clojars_password
Expand All @@ -68,12 +68,12 @@
:pedantic? :abort}
:test {:java-source-paths ["src/com" "test/com"]
:jvm-opts ["-Dlog4j.configurationFile=resources/log4j2.test.xml"]
:dependencies [[com.google.protobuf/protobuf-java "3.17.0"]
[junit/junit "4.13.2"]
:dependencies [[junit/junit "4.13.2"]
[org.hamcrest/hamcrest-core "2.2"]
[org.apache.kafka/kafka-streams "2.8.0" :classifier "test" :exclusions [org.slf4j/slf4j-log4j12 log4j]]
[org.apache.kafka/kafka-clients "2.8.0" :classifier "test"]
[org.clojure/test.check "1.1.0"]]
[org.clojure/test.check "1.1.0"]
[com.google.protobuf/protobuf-java "3.17.3"]] ;; NOTE: protoc should have same version as this
:plugins [[lein-cloverage "1.0.13" :exclusions [org.clojure/clojure]]]
:repositories [["confluent-repo" "https://packages.confluent.io/maven/"]]}
:dev {:plugins [[lein-ancient "0.6.15"]
Expand Down
29 changes: 29 additions & 0 deletions resources/proto/example.proto
@@ -0,0 +1,29 @@
syntax = "proto3";

package com.gojek.test.proto;

option java_package = "com.gojek.test.proto";
option java_outer_classname = "Example";

message Photo {
int32 id = 1;
string path = 2;
optional bytes image = 6;

message Label {
string item = 1;
bool exists = 2;
}

message Attr {
string key = 1;
optional string val = 2;
}

message Tag {
int32 person_id = 1;
optional int32 y_coord = 3;
optional int32 width = 4;
optional int32 height = 5;
}
}
12 changes: 12 additions & 0 deletions resources/proto/message-payload.proto
@@ -0,0 +1,12 @@
syntax = "proto3";

package com.ziggurat.proto;

option java_package = "com.ziggurat.proto";
option java_outer_classname = "MessagePayloadProto";

message MessagePayload {
bytes message = 1;
string topic_entity = 2;
int32 retry_count = 3;
}
13 changes: 13 additions & 0 deletions resources/proto/person.proto
@@ -0,0 +1,13 @@
syntax = "proto3";

package com.gojek.test.proto;

option java_outer_classname = "PersonTestProto";
option java_package = "com.gojek.test.proto";

message Person {
int32 id = 1;
string name = 2;
string email = 3;
string likes = 4;
}

0 comments on commit 0178445

Please sign in to comment.