Skip to content

Commit f4bade8

Browse files
committed
Make Yetus Happy
Signed-off-by: Shahriyar Jalayeri <[email protected]>
1 parent f676bea commit f4bade8

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# syntax=docker/dockerfile:1.6.0
22
FROM alpine:3.18
3+
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
34

45
ARG TARGETOS=linux
56
ARG TARGETARCH
@@ -45,22 +46,22 @@ RUN arch="$(uname -m)" && \
4546

4647
# Download googleapis proto
4748
RUN mkdir -p "${PROTO_DEPS_DIR}" && \
48-
curl -L https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_VERSION}.tar.gz | \
49-
tar -xz -C "${PROTO_DEPS_DIR}" && \
50-
mv "${PROTO_DEPS_DIR}/googleapis-${GOOGLEAPIS_VERSION}" "${PROTO_DEPS_DIR}/googleapis"
49+
curl -L https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_VERSION}.tar.gz | \
50+
tar -xz -C "${PROTO_DEPS_DIR}" && \
51+
mv "${PROTO_DEPS_DIR}/googleapis-${GOOGLEAPIS_VERSION}" "${PROTO_DEPS_DIR}/googleapis"
5152

5253

5354
# Download protoc-gen-validate proto
5455
RUN mkdir -p "${PROTO_DEPS_DIR}" && \
55-
curl -L https://github.com/bufbuild/protoc-gen-validate/archive/${PROTO_GEN_VALIDATE_VERSION}.tar.gz | \
56-
tar -xz -C "${PROTO_DEPS_DIR}" && \
57-
mv "${PROTO_DEPS_DIR}/protoc-gen-validate-${PROTO_GEN_VALIDATE_VERSION}" "${PROTO_DEPS_DIR}/protoc-gen-validate"
56+
curl -L https://github.com/bufbuild/protoc-gen-validate/archive/${PROTO_GEN_VALIDATE_VERSION}.tar.gz | \
57+
tar -xz -C "${PROTO_DEPS_DIR}" && \
58+
mv "${PROTO_DEPS_DIR}/protoc-gen-validate-${PROTO_GEN_VALIDATE_VERSION}" "${PROTO_DEPS_DIR}/protoc-gen-validate"
5859

5960
# Download grpc-gateway
6061
RUN mkdir -p "${PROTO_DEPS_DIR}" && \
61-
curl -L https://github.com/grpc-ecosystem/grpc-gateway/archive/${GRPC_GATEWAY_VERSION}.tar.gz | \
62-
tar -xz -C "${PROTO_DEPS_DIR}" && \
63-
mv "${PROTO_DEPS_DIR}/grpc-gateway-${GRPC_GATEWAY_VERSION}" "${PROTO_DEPS_DIR}/grpc-gateway"
62+
curl -L https://github.com/grpc-ecosystem/grpc-gateway/archive/${GRPC_GATEWAY_VERSION}.tar.gz | \
63+
tar -xz -C "${PROTO_DEPS_DIR}" && \
64+
mv "${PROTO_DEPS_DIR}/grpc-gateway-${GRPC_GATEWAY_VERSION}" "${PROTO_DEPS_DIR}/grpc-gateway"
6465

6566
RUN git clone https://github.com/seamia/protodot.git /protodot
6667
RUN go build -C /protodot -o /usr/local/bin/protodot .

APIv2.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,10 @@ The request MUST NOT contain any body content
248248
Response:
249249

250250
The response mime type MUST be "application/x-proto-binary".
251-
The response MUST contain a message with a list of certificates Controller is using. The body MUST be a protobuf message of type AuthContainer where the AuthBody is a protobuf message of type [certs.ZControllerCert](./proto/certs/certs.proto).
251+
The response MUST contain a message with a list of certificates Controller is
252+
using. The body MUST be a protobuf message of type AuthContainer where the
253+
AuthBody is a protobuf message of
254+
type [certs.ZControllerCert](./proto/certs/certs.proto).
252255

253256
### Attestation
254257

validation-example/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Protobuf Validation Example
22

3-
This example demonstrates how to use the existing protobuf validation that's generated by `protoc-gen-validate`, validation can be used both on the client and server side.
3+
This example demonstrates how to use the existing protobuf validation that's
4+
generated by `protoc-gen-validate`, validation can be used both on the client
5+
and server side.
46

5-
### How to validate messages
7+
## How to validate messages
68

79
The validation is already implemented in the generated protobuf code:
810

validation-example/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"github.com/lf-edge/eve-api/go/register"
88
)
99

10+
// TestCase represents a test case for validating register messages.
1011
type TestCase struct {
1112
Name string
1213
Message *register.ZRegisterMsg

0 commit comments

Comments
 (0)