Skip to content
Permalink
Browse files

prototool linting and formatting (#1105)

* prototool linter configuration

* prototool format -w

* spelling

* yaml spacing

* go generate ./core/api
  • Loading branch information...
gdbelvin committed Nov 8, 2018
1 parent 690d42f commit 3a91ee0f34509f45329be72a7af3f35ee785e103
@@ -14,14 +14,14 @@

syntax = "proto3";

option go_package = "github.com/google/keytransparency/core/api/monitor/v1/monitor_go_proto";

// Monitor Service
//
// The Key Transparency monitor server service consists of APIs to fetch
// monitor results queried using the mutations API.
package google.keytransparency.monitor.v1;

option go_package = "github.com/google/keytransparency/core/api/monitor/v1/monitor_go_proto";

import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
@@ -33,10 +33,8 @@ message GetStateRequest {
// kt_url is the URL of the keytransparency server for which the monitoring
// result will be returned.
string kt_url = 2;

// directory_id identifies the merkle tree being monitored.
string directory_id = 3;

// revision specifies the revision for which the monitoring results will
// be returned (revisions start at 0).
int64 revision = 1;
@@ -49,11 +47,9 @@ message State {
// monitor's key on success. If the checks were not successful the
// smr will be empty. The revisions are encoded into the smr map_revision.
trillian.SignedMapRoot smr = 1;

// seen_time contains the time when this particular signed map root was
// retrieved and processed.
google.protobuf.Timestamp seen_time = 2;

// errors contains a list of errors representing the verification checks
// that failed while monitoring the key-transparency server.
repeated google.rpc.Status errors = 3;
@@ -81,7 +77,6 @@ service Monitor {
get: "/monitor/v1/servers/{kt_url}/directories/{directory_id}/states:latest"
};
}

// GetSignedMapRootByRevision returns the monitor's result for a specific map
// revision.
//
@@ -14,13 +14,13 @@

syntax = "proto3";

package google.keytransparency.type;

option go_package = "github.com/google/keytransparency/core/api/type/type_go_proto";

import "google/rpc/status.proto";
import "tink.proto";

package google.keytransparency.type;

// User represents plain account information that gets committed to and
// obfuscated in Entry.
message User {
@@ -38,4 +38,5 @@ message User {
// status is set when account is part of a batch operation.
google.rpc.Status status = 6;
// TODO(gbelvin): Include UserProof and UserCommitment

}
@@ -14,22 +14,22 @@

syntax = "proto3";

option go_package = "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto";

// Key Transparency Administration
//
// The Key Transparency API consists of a map of user names to public
// keys. Each user name also has a history of public keys that have been
// associated with it.
package google.keytransparency.v1;

option go_package = "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto";

import "crypto/keyspb/keyspb.proto";
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "trillian.proto";
import "crypto/keyspb/keyspb.proto";

// Directory contains information on a single directory
message Directory {
@@ -113,20 +113,17 @@ message GarbageCollectResponse {
service KeyTransparencyAdmin {
// ListDirectories returns a list of all directories this Key Transparency
// server operates on.
rpc ListDirectories(ListDirectoriesRequest)
returns (ListDirectoriesResponse) {
rpc ListDirectories(ListDirectoriesRequest) returns (ListDirectoriesResponse) {
option (google.api.http) = {
get: "/v1/directories"
};
}

// GetDirectory returns the confiuration information for a given directory.
rpc GetDirectory(GetDirectoryRequest) returns (Directory) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}"
};
}

// CreateDirectory creates a new Trillian log/map pair. A unique directoryId
// must be provided. To create a new directory with the same name as a
// previously deleted directory, a user must wait X days until the directory
@@ -137,25 +134,21 @@ service KeyTransparencyAdmin {
body: "*"
};
}

// DeleteDirectory marks a directory as deleted. Directories will be garbage
// collected after X days.
rpc DeleteDirectory(DeleteDirectoryRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/directories/{directory_id}"
};
}

// UndeleteDirectory marks a previously deleted directory as active if it has
// not already been garbage collected.
rpc UndeleteDirectory(UndeleteDirectoryRequest)
returns (google.protobuf.Empty) {
rpc UndeleteDirectory(UndeleteDirectoryRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/directories/{directory_id}:undelete"
};
}

// Fully delete soft-deleted directories that have been soft-deleted before
// the specified timestamp.
rpc GarbageCollect(GarbageCollectRequest) returns (GarbageCollectResponse) {}
rpc GarbageCollect(GarbageCollectRequest) returns (GarbageCollectResponse);
}
@@ -14,15 +14,15 @@

syntax = "proto3";

option go_package = "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto";

// Key Transparency Frontend
//
// The Key Transparency API consists of a map of user names to public
// keys. Each user name also has a history of public keys that have been
// associated with it.
package google.keytransparency.v1;

option go_package = "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto";

import "google/api/annotations.proto";
import "google/protobuf/empty.proto";

@@ -14,20 +14,20 @@

syntax = "proto3";

option go_package = "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto";

// Key Transparency
//
// The Key Transparency API consists of a map of user names to public
// keys. Each user name also has a history of public keys that have been
// associated with it.
package google.keytransparency.v1;

option go_package = "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto";

import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "tink.proto";
import "trillian.proto";
import "trillian_map_api.proto";
import "tink.proto";
import "v1/admin.proto";

// Committed represents the data committed to in a cryptographic commitment.
@@ -150,7 +150,7 @@ message BatchGetUserRequest {
int64 last_verified_tree_size = 3;
}

// BatchGetUserReponse contains the leaf entries for a set of users at the most
// BatchGetUserResponse contains the leaf entries for a set of users at the most
// recently published revision.
message BatchGetUserResponse {
// revision is the most recently published revision.
@@ -224,7 +224,6 @@ message GetLatestRevisionRequest {
int64 last_verified_tree_size = 2;
}


// MapRoot contains the map root and its inclusion proof in the log.
message MapRoot {
// map_root contains the signed map root for the sparse Merkle Tree.
@@ -271,6 +270,7 @@ message ListMutationsRequest {
// The server may choose a smaller page_size than the one requested.
int32 page_size = 4;
// TODO(gbelvin): Add field mask.

}

// ListMutationsResponse contains the mutations that produced an revision.
@@ -318,70 +318,60 @@ service KeyTransparency {
get: "/v1/directories/{directory_id}"
};
}

// GetRevision returns a SignedMapRoot by the by the requested revision number
// along with its inclusion proof in the log and the log's consistency proofs.
rpc GetRevision(GetRevisionRequest) returns (Revision) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/revisions/{revision}"
};
}

// GetLatestRevision returns the latest SignedMapRoot along with its inclusion
// proof in the log and the log's consistency proofs.
rpc GetLatestRevision(GetLatestRevisionRequest) returns (Revision) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/revisions:latest"
};
}

// GetRevisionStream streams new revisions from a requested starting point
// and continues as new revisions are created.
rpc GetRevisionStream(GetRevisionRequest) returns (stream Revision) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/revisions:stream"
};
}

// ListMutations returns a list of mutations in a specific revision.
rpc ListMutations(ListMutationsRequest) returns (ListMutationsResponse) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/revisions/{revision}/mutations"
};
}

// ListMutationsStream is a streaming list of mutations in a specific revision.
rpc ListMutationsStream(ListMutationsRequest) returns (stream MutationProof) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/revisions/{revision}/mutations:stream"
};
}

// GetUser returns a user's leaf entry in the Merkle Tree.
rpc GetUser(GetUserRequest) returns (GetUserResponse) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/users/{user_id}"
};
}

// BatchGetUser returns a batch of user leaf entries in the Merkle tree at the same revision.
rpc BatchGetUser(BatchGetUserRequest) returns (BatchGetUserResponse) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/users:batchGet"
};
}

// ListEntryHistory returns a list of historic GetUser values.
//
// Clients verify their account history by observing correct values for their
// account over time.
rpc ListEntryHistory(ListEntryHistoryRequest)
returns (ListEntryHistoryResponse) {
rpc ListEntryHistory(ListEntryHistoryRequest) returns (ListEntryHistoryResponse) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}/users/{user_id}/history"
};
}

// QueueUserUpdate enqueues an update to a user's profile.
//
// Clients should poll GetUser until the update appears, and retry if no

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 3a91ee0

Please sign in to comment.
You can’t perform that action at this time.