Protobuf annotations for Nexus services and operations.
Add a dependency to your buf.yaml file:
deps:
- buf.build/bergundy/nexus
Copy the nexus directory from this repository and include it as one of the sources to protoc.
string
Defines the Nexus Service name. Defaults to the proto Service full name.
Example:
syntax = "proto3";
package example.v1;
import "nexus/v1/options.proto";
service ExampleService {
option (nexus.v1.service).name = "example.v1.Example";
}repeated string
Tags a Nexus Service. Used by code generators for Service inclusion and exclusion.
Example:
syntax = "proto3";
package example.v1;
import "nexus/v1/options.proto";
service ExampleService {
option (nexus.v1.service).tags = "tag1";
option (nexus.v1.service).tags = "tag2";
}string
Defines the Nexus Operation name. Defaults to the proto Method name.
Example:
syntax = "proto3";
package example.v1;
import "nexus/v1/options.proto";
service ExampleService {
rpc Foo(FooInput) returns (FooResponse) {
option (nexus.v1.operation).name = "foo";
}
}repeated string
Tags a Nexus Service. Used by code generators for Operation inclusion and exclusion.
Example:
syntax = "proto3";
package example.v1;
import "nexus/v1/options.proto";
service ExampleService {
rpc Foo(FooInput) returns (FooResponse) {
option (nexus.v1.operation).tags = "tag1";
option (nexus.v1.operation).tags = "tag2";
}
}Any change in the proto definitions must be reflected in the associated Go package and commited. Run the following command on change:
buf generate
buf push