-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* only declare used messages and enums * update pascalCase * refactor * prevent redefining internal messages * minor * update sample * move the Location * fix enum generation * update sample * refactor * upgrade dependencies * bump version * remove protoc version * update samples * update actions * upgrade actions/checkout * bug fix
- Loading branch information
Showing
11 changed files
with
194 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Code generated by protoc-gen-pubsub-schema. DO NOT EDIT. | ||
// versions: | ||
// protoc-gen-pubsub-schema v1.6.0 | ||
// source: example/article_commented.proto | ||
|
||
syntax = "proto2"; | ||
|
||
package example; | ||
|
||
message ArticleCommented { | ||
required string article_id = 1; | ||
required User user = 2; | ||
required string comment = 3; | ||
repeated ExampleCommonLabel labels = 4; | ||
required GoogleProtobufTimestamp timestamp = 101; | ||
|
||
message User { | ||
required string first_name = 1; | ||
optional string last_name = 2; | ||
required InternalRole internal_role = 3; | ||
required ExampleCommonRole external_role_major = 4; | ||
required ExampleCommonRole external_role_minor = 5; | ||
optional bytes avatar = 6; | ||
optional Location location = 7; | ||
optional GoogleProtobufTimestamp created_at = 8; | ||
optional GoogleProtobufTimestamp updated_at = 9; | ||
|
||
message GoogleProtobufTimestamp { | ||
optional int64 seconds = 1; | ||
optional int32 nanos = 2; | ||
} | ||
|
||
enum ExampleCommonRole { | ||
OWNER = 0; | ||
EDITOR = 1; | ||
VIEWER = 2; | ||
} | ||
} | ||
|
||
message Location { | ||
required double longitude = 1; | ||
required double latitude = 2; | ||
} | ||
|
||
message ExampleCommonLabel { | ||
optional string key = 1; | ||
optional string value = 2; | ||
} | ||
|
||
message GoogleProtobufTimestamp { | ||
optional int64 seconds = 1; | ||
optional int32 nanos = 2; | ||
} | ||
|
||
enum InternalRole { | ||
OWNER = 0; | ||
EDITOR = 1; | ||
VIEWER = 2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
syntax = "proto2"; | ||
|
||
package example; | ||
|
||
import "example/common/label.proto"; | ||
import "example/common/role.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
message ArticleCommented { | ||
required string article_id = 1; | ||
required User user = 2; | ||
required string comment = 3; | ||
repeated example.common.Label labels = 4; | ||
required google.protobuf.Timestamp timestamp = 101; | ||
|
||
message User { | ||
required string first_name = 1; | ||
optional string last_name = 2; | ||
required InternalRole internal_role = 3; | ||
required example.common.Role external_role_major = 4; | ||
required example.common.Role external_role_minor = 5; | ||
optional bytes avatar = 6; | ||
optional Location location = 7; | ||
optional google.protobuf.Timestamp created_at = 8; | ||
optional google.protobuf.Timestamp updated_at = 9; | ||
} | ||
|
||
message Location { | ||
required double longitude = 1; | ||
required double latitude = 2; | ||
} | ||
|
||
enum InternalRole { | ||
OWNER = 0; | ||
EDITOR = 1; | ||
VIEWER = 2; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
module github.com/alpancs/protoc-gen-pubsub-schema | ||
|
||
go 1.16 | ||
go 1.18 | ||
|
||
require google.golang.org/protobuf v1.27.1 | ||
require ( | ||
golang.org/x/exp v0.0.0-20221109205753-fc8884afc316 | ||
google.golang.org/protobuf v1.28.1 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= | ||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= | ||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= | ||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= | ||
golang.org/x/exp v0.0.0-20221109205753-fc8884afc316 h1:FedCSp0+vayF11p3wAQndIgu+JTcW2nLp5M+HSefjlM= | ||
golang.org/x/exp v0.0.0-20221109205753-fc8884afc316/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= | ||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= | ||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= | ||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= | ||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= |
Oops, something went wrong.