1
proto/packages/v1/service.proto

83 lines
1.7 KiB
Protocol Buffer
Raw Normal View History

2023-12-28 23:45:50 +00:00
// Copyright (C) 2023 The Licensing Authors
// SPDX-License-Identifier: MIT
2023-12-28 22:50:20 +00:00
//
// This file attempts to follow common styles and design patterns described by
// Google Cloud based on their extensive use of protocol buffers.
//
// - See here for more: https://cloud.google.com/apis/design/design_patterns
//
2023-12-28 23:45:50 +00:00
2023-12-28 22:50:20 +00:00
syntax = "proto3";
2023-12-28 23:45:50 +00:00
package packages.v1;
2023-12-28 22:50:20 +00:00
2023-12-29 20:01:47 +00:00
import "google/api/annotations.proto";
2023-12-29 22:15:52 +00:00
message ListRequest {
string product_id = 1;
}
2023-12-29 20:01:47 +00:00
message ListResponse {}
2023-12-29 22:15:52 +00:00
message CreateRequest {
string product_id = 1;
}
2023-12-29 20:01:47 +00:00
message CreateResponse {}
2023-12-29 22:15:52 +00:00
message ReadRequest {
string product_id = 1;
string package_name = 2;
}
2023-12-29 20:01:47 +00:00
message ReadResponse {}
2023-12-29 22:15:52 +00:00
message UpdateRequest {
string product_id = 1;
string package_name = 2;
}
2023-12-29 20:01:47 +00:00
message UpdateResponse {}
2023-12-29 22:15:52 +00:00
message DeleteRequest {
string product_id = 1;
string package_name = 2;
}
2023-12-29 20:01:47 +00:00
message DeleteResponse {}
2023-12-28 22:50:20 +00:00
service PackageService {
2023-12-29 20:01:47 +00:00
rpc List(ListRequest) returns (ListResponse) {
option (google.api.http) = {
get: "/v1/products/{product_id}/packages"
};
};
rpc Create(CreateRequest) returns (CreateResponse) {
option (google.api.http) = {
post: "/v1/products/{product_id}/packages"
body: "*"
};
};
rpc Read(ReadRequest) returns (ReadResponse) {
option (google.api.http) = {
get: "/v1/products/{product_id}/packages/{package_name}"
};
};
rpc Update(UpdateRequest) returns (UpdateResponse) {
option (google.api.http) = {
post: "/v1/products/{product_id}/packages/{package_name}"
body: "*"
};
};
2023-12-28 22:50:20 +00:00
2023-12-29 20:01:47 +00:00
rpc Delete(DeleteRequest) returns (DeleteResponse) {
option (google.api.http) = {
delete: "/v1/products/{product_id}/packages/{package_name}"
};
};
2023-12-28 22:50:20 +00:00
}