-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
3,896 additions
and
1,732 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,5 @@ Cargo.lock | |
|
||
.pre-commit-config.yaml | ||
config.toml | ||
|
||
**/*.swagger.yaml |
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
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 = "proto3"; | ||
package conversions; | ||
|
||
import "convert_options.proto"; | ||
|
||
option go_package = "github.com/blockscout/actix-prost/tests"; | ||
|
||
service ConversionsRPC { rpc ConvertRPC(ConversionsRequest) returns (ConversionsResponse); } | ||
|
||
message Nested { | ||
string address = 3 [ (convert_options.convert) = { type : "ethers::types::Address" } ]; | ||
} | ||
|
||
message MapValue { | ||
string address = 1 [ (convert_options.convert) = { type : "ethers::types::Address" } ]; | ||
} | ||
|
||
message ConversionsRequest { | ||
option (convert_options.extra_fields) = { name: "field1", type: "String" }; | ||
option (convert_options.extra_fields) = { name: "field2", type: "i32" }; | ||
map<string, MapValue> map_field = 1; | ||
|
||
enum NestedEnum { | ||
NESTED_OK = 0; | ||
NESTED_ERROR = 1; | ||
} | ||
|
||
string query = 2 [ (convert_options.convert) = { override : "Default::default()" } ]; | ||
repeated string addresses = 3 [ (convert_options.convert) = { type : "std::collections::HashSet<ethers::types::Address>" } ]; | ||
NestedEnum nested_enum = 4; | ||
Nested nested = 5 [ (convert_options.convert) = { required : true } ]; | ||
} | ||
|
||
message ConversionsResponse { | ||
string address = 1 [ (convert_options.convert) = { type : "ethers::types::Address" } ]; | ||
Nested nested = 2; | ||
map<string, MapValue> map_field = 3; | ||
} |
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,20 @@ | ||
syntax = "proto3"; | ||
|
||
package convert_options; | ||
option go_package = "github.com/blockscout/actix-prost/convert_options"; | ||
|
||
import "google/protobuf/descriptor.proto"; | ||
|
||
message ConvertOptions { | ||
string type = 1; | ||
string override = 2; | ||
bool required = 3; | ||
} | ||
|
||
message ExtraFieldOptions { | ||
string name = 1; | ||
string type = 2; | ||
} | ||
|
||
extend google.protobuf.MessageOptions { repeated ExtraFieldOptions extra_fields = 50000; } | ||
extend google.protobuf.FieldOptions { optional ConvertOptions convert = 50001; } |
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
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
Oops, something went wrong.