54 lines
1.4 KiB
Protocol Buffer
54 lines
1.4 KiB
Protocol Buffer
// Source of truth: guildhouse monorepo
|
|
// services/qm-proto/proto/quartermaster/v1/notary.proto
|
|
// This file is a copy for Go code generation. Do not edit here.
|
|
|
|
syntax = "proto3";
|
|
package quartermaster.v1;
|
|
|
|
option go_package = "github.com/guildhouse-cooperative/guildhouse-spire-plugins/gen/quartermaster/v1;quartermasterv1";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
service QuartermasterNotary {
|
|
rpc CreateAnchor (CreateAnchorRequest) returns (CreateAnchorResponse);
|
|
rpc GetLatestAnchor (GetLatestAnchorRequest) returns (GetLatestAnchorResponse);
|
|
rpc VerifyInclusion (VerifyInclusionRequest) returns (VerifyInclusionResponse);
|
|
}
|
|
|
|
message CreateAnchorRequest {
|
|
string cluster_id = 1;
|
|
repeated bytes leaves = 2;
|
|
int64 etcd_revision = 3; // 0 means not set
|
|
}
|
|
|
|
message CreateAnchorResponse {
|
|
string anchor_id = 1;
|
|
bytes merkle_root = 2;
|
|
bytes previous_root = 3;
|
|
int32 leaf_count = 4;
|
|
google.protobuf.Timestamp time = 5;
|
|
}
|
|
|
|
message GetLatestAnchorRequest {
|
|
string cluster_id = 1;
|
|
}
|
|
|
|
message GetLatestAnchorResponse {
|
|
string anchor_id = 1;
|
|
string cluster_id = 2;
|
|
bytes merkle_root = 3;
|
|
bytes previous_root = 4;
|
|
int64 etcd_revision = 5;
|
|
int32 leaf_count = 6;
|
|
google.protobuf.Timestamp time = 7;
|
|
}
|
|
|
|
message VerifyInclusionRequest {
|
|
string anchor_id = 1;
|
|
bytes leaf = 2;
|
|
repeated bytes proof = 3;
|
|
}
|
|
|
|
message VerifyInclusionResponse {
|
|
bool valid = 1;
|
|
}
|