mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
refactor(proto): move protobuf generated API to the top-level api/pb package
This commit is contained in:
1 parent
7a88865f64
commit
8aedc2bf19
73 files changed
+1487
-1505
No files matched your search
@@ -0,0 +1,75 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
|
||||
option go_package = "github.com/psviderski/uncloud/api/pb";
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "api/pb/common.proto";
|
||||
|
||||
// CaddyStorage exposes the CertMagic storage operations backed by the distributed cluster store.
|
||||
// See Storage interface in https://github.com/caddyserver/certmagic/blob/master/storage.go.
|
||||
service CaddyStorage {
|
||||
rpc Store(StoreCaddyStorageRequest) returns (google.protobuf.Empty);
|
||||
rpc Load(LoadCaddyStorageRequest) returns (LoadCaddyStorageResponse);
|
||||
rpc Delete(DeleteCaddyStorageRequest) returns (EmptyResponse);
|
||||
rpc List(ListCaddyStorageRequest) returns (ListCaddyStorageResponse);
|
||||
rpc Stat(StatCaddyStorageRequest) returns (StatCaddyStorageResponse);
|
||||
}
|
||||
|
||||
message StoreCaddyStorageRequest {
|
||||
string key = 1;
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
message LoadCaddyStorageRequest {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message LoadCaddyStorageResponse {
|
||||
// Must contain only one repeated messages field to allow broadcasting Load requests to multiple machines.
|
||||
repeated MachineCaddyStorageValue messages = 1;
|
||||
}
|
||||
|
||||
message MachineCaddyStorageValue {
|
||||
Metadata metadata = 1;
|
||||
bytes value = 2;
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
}
|
||||
|
||||
message DeleteCaddyStorageRequest {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message ListCaddyStorageRequest {
|
||||
string prefix = 1;
|
||||
bool recursive = 2;
|
||||
}
|
||||
|
||||
message ListCaddyStorageResponse {
|
||||
// Must contain only one repeated messages field to allow broadcasting List requests to multiple machines.
|
||||
repeated MachineCaddyStorageKeys messages = 1;
|
||||
}
|
||||
|
||||
message MachineCaddyStorageKeys {
|
||||
Metadata metadata = 1;
|
||||
repeated string keys = 2;
|
||||
}
|
||||
|
||||
message StatCaddyStorageRequest {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message StatCaddyStorageResponse {
|
||||
// Must contain only one repeated messages field to allow broadcasting Stat requests to multiple machines.
|
||||
repeated MachineCaddyStorageKeyInfo messages = 1;
|
||||
}
|
||||
|
||||
message MachineCaddyStorageKeyInfo {
|
||||
Metadata metadata = 1;
|
||||
string key = 2;
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
int64 size = 4;
|
||||
bool is_terminal = 5;
|
||||
}
|
||||
Reference in new issue
Block a user