api: protos now pass lint checks

Generation is likely broken, but the Makefile linter now passes. Another
pass will have a fully working toolchain.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2016-12-01 12:22:05 -08:00
parent 2507ee35bb
commit 4d1a30ff41
No known key found for this signature in database
GPG Key ID: FB5F6B2905D7ECF3
3 changed files with 87 additions and 87 deletions

View File

@ -66,7 +66,7 @@ fmt: ## run go fmt
(echo "👹 please format Go code with 'gofmt -s -w'" && false)
@test -z "$$(find . -path ./vendor -prune -o ! -name timestamp.proto ! -name duration.proto -name '*.proto' -type f -exec grep -Hn -e "^ " {} \; | tee /dev/stderr)" || \
(echo "👹 please indent proto files with tabs only" && false)
@test -z "$$(find . -path ./vendor -prune -o -name '*.proto' -type f -exec grep -Hn "id = " {} \; | grep -v gogoproto.customname | tee /dev/stderr)" || \
@test -z "$$(find . -path ./vendor -prune -o -name '*.proto' -type f -exec grep -EHn "[_ ]id = " {} \; | grep -v gogoproto.customname | tee /dev/stderr)" || \
(echo "👹 id fields in proto files must have a gogoproto.customname set" && false)
@test -z "$$(find . -path ./vendor -prune -o -name '*.proto' -type f -exec grep -Hn "Meta meta = " {} \; | grep -v '(gogoproto.nullable) = false' | tee /dev/stderr)" || \
(echo "👹 meta fields in proto files must have option (gogoproto.nullable) = false" && false)

View File

@ -24,7 +24,7 @@ service Containers {
}
message Container {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
repeated Mount mounts = 2;
string owner = 3;
Process process = 4;
@ -64,7 +64,7 @@ message User {
}
message CreateRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
ProcessSpec process = 2;
repeated Mount mounts = 3;
string owner = 4;
@ -76,7 +76,7 @@ message CreateResponse {
}
message StartRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
}
message State {
@ -87,7 +87,7 @@ message StartResponse {
}
message DeleteRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
}
message DeleteResponse {
@ -102,7 +102,7 @@ message ContainerListResponse {
}
message StateRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
}
message StateResponse {
@ -110,28 +110,28 @@ message StateResponse {
}
message UpdateRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
}
message UpdateResponse {
}
message PauseRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
}
message PauseResponse {
}
message ResumeRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
}
message ResumeResponse {
}
message CreateProcessRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
ProcessSpec spec = 2;
}
@ -174,7 +174,7 @@ message DeleteProcessResponse {
}
message ProcessListRequest {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
}
message ProcessListResponse {

View File

@ -22,12 +22,12 @@ message PullRequest {
}
message PullResponse {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
repeated Layer layers = 2;
}
message Layer {
string id = 1;
string id = 1 [(gogoproto.customname) = "ID"];
uint64 size = 2;
}