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:
parent
2507ee35bb
commit
4d1a30ff41
3 changed files with 87 additions and 87 deletions
2
Makefile
2
Makefile
|
@ -66,7 +66,7 @@ fmt: ## run go fmt
|
||||||
(echo "👹 please format Go code with 'gofmt -s -w'" && false)
|
(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)" || \
|
@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)
|
(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)
|
(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)" || \
|
@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)
|
(echo "👹 meta fields in proto files must have option (gogoproto.nullable) = false" && false)
|
||||||
|
|
|
@ -24,7 +24,7 @@ service Containers {
|
||||||
}
|
}
|
||||||
|
|
||||||
message Container {
|
message Container {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
repeated Mount mounts = 2;
|
repeated Mount mounts = 2;
|
||||||
string owner = 3;
|
string owner = 3;
|
||||||
Process process = 4;
|
Process process = 4;
|
||||||
|
@ -64,7 +64,7 @@ message User {
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateRequest {
|
message CreateRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
ProcessSpec process = 2;
|
ProcessSpec process = 2;
|
||||||
repeated Mount mounts = 3;
|
repeated Mount mounts = 3;
|
||||||
string owner = 4;
|
string owner = 4;
|
||||||
|
@ -76,7 +76,7 @@ message CreateResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message StartRequest {
|
message StartRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message State {
|
message State {
|
||||||
|
@ -87,7 +87,7 @@ message StartResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeleteRequest {
|
message DeleteRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeleteResponse {
|
message DeleteResponse {
|
||||||
|
@ -102,7 +102,7 @@ message ContainerListResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message StateRequest {
|
message StateRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message StateResponse {
|
message StateResponse {
|
||||||
|
@ -110,28 +110,28 @@ message StateResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message UpdateRequest {
|
message UpdateRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message UpdateResponse {
|
message UpdateResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message PauseRequest {
|
message PauseRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message PauseResponse {
|
message PauseResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResumeRequest {
|
message ResumeRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResumeResponse {
|
message ResumeResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateProcessRequest {
|
message CreateProcessRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
ProcessSpec spec = 2;
|
ProcessSpec spec = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ message DeleteProcessResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message ProcessListRequest {
|
message ProcessListRequest {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ProcessListResponse {
|
message ProcessListResponse {
|
||||||
|
|
|
@ -22,12 +22,12 @@ message PullRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message PullResponse {
|
message PullResponse {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
repeated Layer layers = 2;
|
repeated Layer layers = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Layer {
|
message Layer {
|
||||||
string id = 1;
|
string id = 1 [(gogoproto.customname) = "ID"];
|
||||||
uint64 size = 2;
|
uint64 size = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue