| |
| |
| syntax = "proto3"; |
| |
| package bufman.dubbo.apache.org.registry.v1alpha1; |
| |
| import "image/v1/image.proto"; |
| |
| // ImageService serves compiled images. |
| service ImageService { |
| // GetImage serves a compiled image for the local module. It automatically |
| // downloads dependencies if necessary. |
| rpc GetImage(GetImageRequest) returns (GetImageResponse) { |
| option idempotency_level = NO_SIDE_EFFECTS; |
| } |
| } |
| |
| // ImageMask is used in GetImageRequest to specify which parts of an image |
| // should be masked in responses. |
| enum ImageMask { |
| IMAGE_MASK_UNSPECIFIED = 0; |
| |
| // IMAGE_MASK_MESSAGES refers to ImageFile's `google.protobuf.DescriptorProto |
| // message_type` field. |
| IMAGE_MASK_MESSAGES = 1; |
| |
| // IMAGE_MASK_ENUMS refers to ImageFile's `google.protobuf.EnumDescriptorProto |
| // enum_type` field. |
| IMAGE_MASK_ENUMS = 2; |
| |
| // IMAGE_MASK_SERVICES refers to ImageFile's |
| // `google.protobuf.ServiceDescriptorProto service` field. |
| IMAGE_MASK_SERVICES = 3; |
| } |
| |
| message GetImageRequest { |
| string owner = 1; |
| string repository = 2; |
| string reference = 3; |
| |
| // Exclude files from imported buf modules in this image. |
| bool exclude_imports = 4; |
| |
| // Exclude source_code_info fields from each ImageFile. |
| bool exclude_source_info = 5; |
| |
| // When specified the returned image will only contain the necessary files and |
| // descriptors in those files to describe these types. Accepts messages, enums |
| // and services. All types must be defined in the buf module, types in |
| // dependencies are not accepted. |
| // |
| // At this time specifying `types` requires `exclude_source_info` to be set to |
| // true. |
| repeated string types = 6; |
| |
| // When not empty, the returned image's files will only include |
| // *DescriptorProto fields for the elements specified here. The masks are |
| // applied without regard for dependencies between types. For example, if |
| // `IMAGE_MASK_MESSAGES` is specified without `IMAGE_MASK_ENUMS` the resulting |
| // image will NOT contain enum definitions even if they are referenced from |
| // message fields. |
| repeated ImageMask include_mask = 7; |
| } |
| |
| message GetImageResponse { |
| bufman.dubbo.apache.org.image.v1.Image image = 1; |
| } |