-
Hi, I'm trying to replicate the behavior of:
Which stores our Versions:
syntax = "proto3";
package health.v1;
// option go_package = "github.com/OurCompany/go-protobuf/pkg/health";
// tested without being commented
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
}
ServingStatus status = 1;
}
service Health {
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
} version: v2
managed:
enabled: true
disable:
- file_option: go_package
module: buf.build/googleapis/googleapis
- file_option: go_package_prefix
module: buf.build/grpc-ecosystem/grpc-gateway
override:
- file_option: go_package
value: github.com/OurCompany/go-protobuf/pkg
plugins:
- remote: buf.build/protocolbuffers/go
out: pkg
opt:
- module=github.com/OurCompany/go-protobuf/pkg
- remote: buf.build/grpc/go
out: pkg
opt:
- module=github.com/OurCompany/go-protobuf/pkg
- remote: buf.build/grpc-ecosystem/gateway
out: pkg
opt:
- module=github.com/OurCompany/go-protobuf/pkg
^ tried with Any pointer is greatly appreciated |
Beta Was this translation helpful? Give feedback.
Answered by
bufdev
Jun 13, 2024
Replies: 1 comment 2 replies
-
After messing with the linter and further reading documentation I saw that the folder structure is inherited from the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for your question here. There isn't a way to override this -
buf
encourages standardized.proto
file layouts, and having a 1-1 mapping between your directory structure and package definitions is really almost a requirement nowadays in Protobuf world, even outside ofbuf
. If you can provide us a reproducible setup in i.e. a temporary github repository, we're happy to help advise you on how to proceed!