Skip to content

Commit

Permalink
Use 2-space indents in all proto files (#5006)
Browse files Browse the repository at this point in the history
Our proto files had a variety of indentation styles: 2 spaces,
4 spaces, 8 spaces, and tabs; sometimes mixed within the same
file. The proto3 style guide[1] says to use 2-space indents,
so this change standardizes on that.

[1] https://developers.google.com/protocol-buffers/docs/style
  • Loading branch information
aarongable committed Aug 5, 2020
1 parent 7853b12 commit 634d57c
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 250 deletions.
4 changes: 2 additions & 2 deletions akamai/proto/akamai.proto
Expand Up @@ -6,9 +6,9 @@ option go_package = "github.com/letsencrypt/boulder/akamai/proto";
import "core/proto/core.proto";

service AkamaiPurger {
rpc Purge(PurgeRequest) returns (core.Empty) {}
rpc Purge(PurgeRequest) returns (core.Empty) {}
}

message PurgeRequest {
repeated string urls = 1;
repeated string urls = 1;
}
116 changes: 58 additions & 58 deletions core/proto/core.proto
Expand Up @@ -4,34 +4,34 @@ package core;
option go_package = "github.com/letsencrypt/boulder/core/proto";

message Challenge {
optional int64 id = 1;
optional string type = 2;
optional string status = 6;
optional string uri = 9;
optional string token = 3;
optional string keyAuthorization = 5;
repeated ValidationRecord validationrecords = 10;
optional ProblemDetails error = 7;
optional int64 id = 1;
optional string type = 2;
optional string status = 6;
optional string uri = 9;
optional string token = 3;
optional string keyAuthorization = 5;
repeated ValidationRecord validationrecords = 10;
optional ProblemDetails error = 7;
}

message ValidationRecord {
optional string hostname = 1;
optional string port = 2;
repeated bytes addressesResolved = 3; // net.IP.MarshalText()
optional bytes addressUsed = 4; // net.IP.MarshalText()
optional string hostname = 1;
optional string port = 2;
repeated bytes addressesResolved = 3; // net.IP.MarshalText()
optional bytes addressUsed = 4; // net.IP.MarshalText()

repeated string authorities = 5;
optional string url = 6;
// A list of addresses tried before the address used (see
// core/objects.go and the comment on the ValidationRecord structure
// definition for more information.
repeated bytes addressesTried = 7; // net.IP.MarshalText()
repeated string authorities = 5;
optional string url = 6;
// A list of addresses tried before the address used (see
// core/objects.go and the comment on the ValidationRecord structure
// definition for more information.
repeated bytes addressesTried = 7; // net.IP.MarshalText()
}

message ProblemDetails {
optional string problemType = 1;
optional string detail = 2;
optional int32 httpStatus = 3;
optional string problemType = 1;
optional string detail = 2;
optional int32 httpStatus = 3;
}

message Certificate {
Expand All @@ -44,52 +44,52 @@ message Certificate {
}

message CertificateStatus {
optional string serial = 1;
reserved 2; // previously subscriberApproved
optional string status = 3;
optional int64 ocspLastUpdated = 4;
optional int64 revokedDate = 5;
optional int64 revokedReason = 6;
optional int64 lastExpirationNagSent = 7;
optional bytes ocspResponse = 8;
optional int64 notAfter = 9;
optional bool isExpired = 10;
optional string serial = 1;
reserved 2; // previously subscriberApproved
optional string status = 3;
optional int64 ocspLastUpdated = 4;
optional int64 revokedDate = 5;
optional int64 revokedReason = 6;
optional int64 lastExpirationNagSent = 7;
optional bytes ocspResponse = 8;
optional int64 notAfter = 9;
optional bool isExpired = 10;
}

message Registration {
optional int64 id = 1;
optional bytes key = 2;
repeated string contact = 3;
optional bool contactsPresent = 4;
optional string agreement = 5;
optional bytes initialIP = 6;
optional int64 createdAt = 7; // Unix timestamp (nanoseconds)
optional string status = 8;
optional int64 id = 1;
optional bytes key = 2;
repeated string contact = 3;
optional bool contactsPresent = 4;
optional string agreement = 5;
optional bytes initialIP = 6;
optional int64 createdAt = 7; // Unix timestamp (nanoseconds)
optional string status = 8;
}

message Authorization {
optional string id = 1;
optional string identifier = 2;
optional int64 registrationID = 3;
optional string status = 4;
optional int64 expires = 5; // Unix timestamp (nanoseconds)
repeated core.Challenge challenges = 6;
reserved 7; // previously combinations
reserved 8; // previously v2
optional string id = 1;
optional string identifier = 2;
optional int64 registrationID = 3;
optional string status = 4;
optional int64 expires = 5; // Unix timestamp (nanoseconds)
repeated core.Challenge challenges = 6;
reserved 7; // previously combinations
reserved 8; // previously v2
}

message Order {
optional int64 id = 1;
optional int64 registrationID = 2;
optional int64 expires = 3;
optional ProblemDetails error = 4;
optional string certificateSerial = 5;
reserved 6; // previously authorizations, deprecated in favor of v2Authorizations
optional string status = 7;
repeated string names = 8;
optional bool beganProcessing = 9;
optional int64 created = 10;
repeated int64 v2Authorizations = 11;
optional int64 id = 1;
optional int64 registrationID = 2;
optional int64 expires = 3;
optional ProblemDetails error = 4;
optional string certificateSerial = 5;
reserved 6; // previously authorizations, deprecated in favor of v2Authorizations
optional string status = 7;
repeated string names = 8;
optional bool beganProcessing = 9;
optional int64 created = 10;
repeated int64 v2Authorizations = 11;
}

message Empty {}
8 changes: 4 additions & 4 deletions nonce/proto/nonce.proto
Expand Up @@ -6,14 +6,14 @@ option go_package = "github.com/letsencrypt/boulder/nonce/proto";
import "core/proto/core.proto";

service NonceService {
rpc Nonce(core.Empty) returns (NonceMessage) {}
rpc Redeem(NonceMessage) returns (ValidMessage) {}
rpc Nonce(core.Empty) returns (NonceMessage) {}
rpc Redeem(NonceMessage) returns (ValidMessage) {}
}

message NonceMessage {
string nonce = 1;
string nonce = 1;
}

message ValidMessage {
bool valid = 1;
bool valid = 1;
}
14 changes: 7 additions & 7 deletions publisher/proto/publisher.proto
Expand Up @@ -2,17 +2,17 @@ syntax = "proto3";
option go_package = ".;publisher";

service Publisher {
rpc SubmitToSingleCTWithResult(Request) returns (Result) {}
rpc SubmitToSingleCTWithResult(Request) returns (Result) {}
}

message Request {
bytes der = 1;
string LogURL = 2;
string LogPublicKey = 3;
bool precert = 4;
bool storeSCT = 5;
bytes der = 1;
string LogURL = 2;
string LogPublicKey = 3;
bool precert = 4;
bool storeSCT = 5;
}

message Result {
bytes sct = 1;
bytes sct = 1;
}
64 changes: 32 additions & 32 deletions ra/proto/ra.proto
Expand Up @@ -6,63 +6,63 @@ option go_package = "github.com/letsencrypt/boulder/ra/proto";
import "core/proto/core.proto";

service RegistrationAuthority {
rpc NewRegistration(core.Registration) returns (core.Registration) {}
rpc NewAuthorization(NewAuthorizationRequest) returns (core.Authorization) {}
rpc NewCertificate(NewCertificateRequest) returns (core.Certificate) {}
rpc UpdateRegistration(UpdateRegistrationRequest) returns (core.Registration) {}
rpc PerformValidation(PerformValidationRequest) returns (core.Authorization) {}
rpc RevokeCertificateWithReg(RevokeCertificateWithRegRequest) returns (core.Empty) {}
rpc DeactivateRegistration(core.Registration) returns (core.Empty) {}
rpc DeactivateAuthorization(core.Authorization) returns (core.Empty) {}
rpc AdministrativelyRevokeCertificate(AdministrativelyRevokeCertificateRequest) returns (core.Empty) {}
rpc NewOrder(NewOrderRequest) returns (core.Order) {}
rpc FinalizeOrder(FinalizeOrderRequest) returns (core.Order) {}
rpc NewRegistration(core.Registration) returns (core.Registration) {}
rpc NewAuthorization(NewAuthorizationRequest) returns (core.Authorization) {}
rpc NewCertificate(NewCertificateRequest) returns (core.Certificate) {}
rpc UpdateRegistration(UpdateRegistrationRequest) returns (core.Registration) {}
rpc PerformValidation(PerformValidationRequest) returns (core.Authorization) {}
rpc RevokeCertificateWithReg(RevokeCertificateWithRegRequest) returns (core.Empty) {}
rpc DeactivateRegistration(core.Registration) returns (core.Empty) {}
rpc DeactivateAuthorization(core.Authorization) returns (core.Empty) {}
rpc AdministrativelyRevokeCertificate(AdministrativelyRevokeCertificateRequest) returns (core.Empty) {}
rpc NewOrder(NewOrderRequest) returns (core.Order) {}
rpc FinalizeOrder(FinalizeOrderRequest) returns (core.Order) {}
}

message NewAuthorizationRequest {
optional core.Authorization authz = 1;
optional int64 regID = 2;
optional core.Authorization authz = 1;
optional int64 regID = 2;
}

message NewCertificateRequest {
optional bytes csr = 1;
optional int64 regID = 2;
optional bytes csr = 1;
optional int64 regID = 2;
}

message UpdateRegistrationRequest {
optional core.Registration base = 1;
optional core.Registration update = 2;
optional core.Registration base = 1;
optional core.Registration update = 2;
}

message UpdateAuthorizationRequest {
optional core.Authorization authz = 1;
optional int64 challengeIndex = 2;
optional core.Challenge response = 3;
optional core.Authorization authz = 1;
optional int64 challengeIndex = 2;
optional core.Challenge response = 3;
}

message PerformValidationRequest {
optional core.Authorization authz = 1;
optional int64 challengeIndex = 2;
optional core.Authorization authz = 1;
optional int64 challengeIndex = 2;
}

message RevokeCertificateWithRegRequest {
optional bytes cert = 1;
optional int64 code = 2;
optional int64 regID = 3;
optional bytes cert = 1;
optional int64 code = 2;
optional int64 regID = 3;
}

message AdministrativelyRevokeCertificateRequest {
optional bytes cert = 1;
optional int64 code = 2;
optional string adminName = 3;
optional bytes cert = 1;
optional int64 code = 2;
optional string adminName = 3;
}

message NewOrderRequest {
optional int64 registrationID = 1;
repeated string names = 2;
optional int64 registrationID = 1;
repeated string names = 2;
}

message FinalizeOrderRequest {
optional core.Order order = 1;
optional bytes csr = 2;
optional core.Order order = 1;
optional bytes csr = 2;
}

0 comments on commit 634d57c

Please sign in to comment.