Skip to content

borderzero/border0-proto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

border0-proto

Generate protobuf/grpc client for all languages

Run make

Example
14:51 $ make
make docker-run lang=go
docker build -f Dockerfile.go -t border0-proto-builder-go .
[+] Building 0.5s (12/12) FINISHED                                                                                                                                                                                                                                                                                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile.go                                                                                                                                                                                                                                                                                                                                                                                0.0s
 => => transferring dockerfile: 1.00kB                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/golang:1.23-alpine3.20                                                                                                                                                                                                                                                                                                                                                              0.5s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                                                                                                                                        0.0s
 => [1/8] FROM docker.io/library/golang:1.23-alpine3.20@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679                                                                                                                                                                                                                                                                                                        0.0s
 => CACHED [2/8] RUN apk --no-cache update                                                                                                                                                                                                                                                                                                                                                                                             0.0s
 => CACHED [3/8] RUN apk --no-cache upgrade                                                                                                                                                                                                                                                                                                                                                                                            0.0s
 => CACHED [4/8] RUN apk --no-cache add protobuf git                                                                                                                                                                                                                                                                                                                                                                                   0.0s
 => CACHED [5/8] WORKDIR /app                                                                                                                                                                                                                                                                                                                                                                                                          0.0s
 => CACHED [6/8] RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2                                                                                                                                                                                                                                                                                                                                                   0.0s
 => CACHED [7/8] RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1                                                                                                                                                                                                                                                                                                                                                   0.0s
 => CACHED [8/8] RUN git clone https://github.com/protocolbuffers/protobuf.git &&     mkdir -p /usr/include &&     cp -r protobuf/src/* /usr/include/ &&     rm -rf protobuf                                                                                                                                                                                                                                                           0.0s
 => exporting to image                                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                                                                                                                                                                                                                                                                                                0.0s
 => => writing image sha256:3bdab66243455ccfc441ecd36e0753bf1464303d5cb1aa1502584dbe8c227ab5                                                                                                                                                                                                                                                                                                                                           0.0s
 => => naming to docker.io/library/border0-proto-builder-go                                                                                                                                                                                                                                                                                                                                                                            0.0s
docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/proto border0-proto-builder-go;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/connector:/app/proto border0-proto-builder-go;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/device:/app/proto border0-proto-builder-go;
make docker-run lang=swift
docker build -f Dockerfile.swift -t border0-proto-builder-swift .
[+] Building 0.4s (12/12) FINISHED                                                                                                                                                                                                                                                                                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile.swift                                                                                                                                                                                                                                                                                                                                                                             0.0s
 => => transferring dockerfile: 1.73kB                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/ubuntu:24.04                                                                                                                                                                                                                                                                                                                                                                        0.4s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                                                                                                                                        0.0s
 => [1/8] FROM docker.io/library/ubuntu:24.04@sha256:b359f1067efa76f37863778f7b6d0e8d911e3ee8efa807ad01fbf5dc1ef9006b                                                                                                                                                                                                                                                                                                                  0.0s
 => CACHED [2/8] RUN apt-get update && apt-get install -y     curl     git     unzip     build-essential     clang     libssl-dev     protobuf-compiler                                                                                                                                                                                                                                                                                0.0s
 => CACHED [3/8] RUN curl https://download.swift.org/swift-6.0.1-release/ubuntu2404-aarch64/swift-6.0.1-RELEASE/swift-6.0.1-RELEASE-ubuntu24.04-aarch64.tar.gz -o swift.tar.gz                                                                                                                                                                                                                                                         0.0s
 => CACHED [4/8] RUN tar xzf swift.tar.gz --directory / --strip-components=1 && rm swift.tar.gz                                                                                                                                                                                                                                                                                                                                        0.0s
 => CACHED [5/8] WORKDIR /app                                                                                                                                                                                                                                                                                                                                                                                                          0.0s
 => CACHED [6/8] RUN git clone https://github.com/apple/swift-protobuf.git &&     cd swift-protobuf &&     swift build -c release &&     cp .build/release/protoc-gen-swift /usr/local/bin/ &&     cd .. &&     rm -rf swift-protobuf                                                                                                                                                                                                  0.0s
 => CACHED [7/8] RUN git clone -b release/1.x https://github.com/grpc/grpc-swift.git &&     cd grpc-swift &&     swift build -c release &&     cp .build/release/protoc-gen-grpc-swift /usr/local/bin/ &&     cd .. &&     rm -rf grpc-swift                                                                                                                                                                                           0.0s
 => CACHED [8/8] RUN git clone https://github.com/protocolbuffers/protobuf.git &&     mkdir -p /usr/include &&     cp -r protobuf/src/* /usr/include/ &&     rm -rf protobuf                                                                                                                                                                                                                                                           0.0s
 => exporting to image                                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                                                                                                                                                                                                                                                                                                0.0s
 => => writing image sha256:a0ce18be893ff4e50cc0cb2bfeaa9705d0c6475f079d9f57806516ac6e760351                                                                                                                                                                                                                                                                                                                                           0.0s
 => => naming to docker.io/library/border0-proto-builder-swift                                                                                                                                                                                                                                                                                                                                                                         0.0s
docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/proto border0-proto-builder-swift;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/connector:/app/proto border0-proto-builder-swift;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/device:/app/proto border0-proto-builder-swift;

Generate protobuf/grpc client for go

Run make go

Example
14:51 $ make go
make docker-run lang=go
docker build -f Dockerfile.go -t border0-proto-builder-go .
[+] Building 0.6s (12/12) FINISHED                                                                                                                                                                                                                                                                                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile.go                                                                                                                                                                                                                                                                                                                                                                                0.0s
 => => transferring dockerfile: 1.00kB                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/golang:1.23-alpine3.20                                                                                                                                                                                                                                                                                                                                                              0.5s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                                                                                                                                        0.0s
 => [1/8] FROM docker.io/library/golang:1.23-alpine3.20@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679                                                                                                                                                                                                                                                                                                        0.0s
 => CACHED [2/8] RUN apk --no-cache update                                                                                                                                                                                                                                                                                                                                                                                             0.0s
 => CACHED [3/8] RUN apk --no-cache upgrade                                                                                                                                                                                                                                                                                                                                                                                            0.0s
 => CACHED [4/8] RUN apk --no-cache add protobuf git                                                                                                                                                                                                                                                                                                                                                                                   0.0s
 => CACHED [5/8] WORKDIR /app                                                                                                                                                                                                                                                                                                                                                                                                          0.0s
 => CACHED [6/8] RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2                                                                                                                                                                                                                                                                                                                                                   0.0s
 => CACHED [7/8] RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1                                                                                                                                                                                                                                                                                                                                                   0.0s
 => CACHED [8/8] RUN git clone https://github.com/protocolbuffers/protobuf.git &&     mkdir -p /usr/include &&     cp -r protobuf/src/* /usr/include/ &&     rm -rf protobuf                                                                                                                                                                                                                                                           0.0s
 => exporting to image                                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                                                                                                                                                                                                                                                                                                0.0s
 => => writing image sha256:3bdab66243455ccfc441ecd36e0753bf1464303d5cb1aa1502584dbe8c227ab5                                                                                                                                                                                                                                                                                                                                           0.0s
 => => naming to docker.io/library/border0-proto-builder-go                                                                                                                                                                                                                                                                                                                                                                            0.0s
docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/proto border0-proto-builder-go;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/connector:/app/proto border0-proto-builder-go;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/device:/app/proto border0-proto-builder-go;

Generate protobuf/grpc client for swift

Run make swift

Example
14:51 $ make swift
make docker-run lang=swift
docker build -f Dockerfile.swift -t border0-proto-builder-swift .
[+] Building 0.6s (12/12) FINISHED                                                                                                                                                                                                                                                                                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile.swift                                                                                                                                                                                                                                                                                                                                                                             0.0s
 => => transferring dockerfile: 1.73kB                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/ubuntu:24.04                                                                                                                                                                                                                                                                                                                                                                        0.5s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                                                                                                                                        0.0s
 => [1/8] FROM docker.io/library/ubuntu:24.04@sha256:b359f1067efa76f37863778f7b6d0e8d911e3ee8efa807ad01fbf5dc1ef9006b                                                                                                                                                                                                                                                                                                                  0.0s
 => CACHED [2/8] RUN apt-get update && apt-get install -y     curl     git     unzip     build-essential     clang     libssl-dev     protobuf-compiler                                                                                                                                                                                                                                                                                0.0s
 => CACHED [3/8] RUN curl https://download.swift.org/swift-6.0.1-release/ubuntu2404-aarch64/swift-6.0.1-RELEASE/swift-6.0.1-RELEASE-ubuntu24.04-aarch64.tar.gz -o swift.tar.gz                                                                                                                                                                                                                                                         0.0s
 => CACHED [4/8] RUN tar xzf swift.tar.gz --directory / --strip-components=1 && rm swift.tar.gz                                                                                                                                                                                                                                                                                                                                        0.0s
 => CACHED [5/8] WORKDIR /app                                                                                                                                                                                                                                                                                                                                                                                                          0.0s
 => CACHED [6/8] RUN git clone https://github.com/apple/swift-protobuf.git &&     cd swift-protobuf &&     swift build -c release &&     cp .build/release/protoc-gen-swift /usr/local/bin/ &&     cd .. &&     rm -rf swift-protobuf                                                                                                                                                                                                  0.0s
 => CACHED [7/8] RUN git clone -b release/1.x https://github.com/grpc/grpc-swift.git &&     cd grpc-swift &&     swift build -c release &&     cp .build/release/protoc-gen-grpc-swift /usr/local/bin/ &&     cd .. &&     rm -rf grpc-swift                                                                                                                                                                                           0.0s
 => CACHED [8/8] RUN git clone https://github.com/protocolbuffers/protobuf.git &&     mkdir -p /usr/include &&     cp -r protobuf/src/* /usr/include/ &&     rm -rf protobuf                                                                                                                                                                                                                                                           0.0s
 => exporting to image                                                                                                                                                                                                                                                                                                                                                                                                                 0.0s
 => => exporting layers                                                                                                                                                                                                                                                                                                                                                                                                                0.0s
 => => writing image sha256:a0ce18be893ff4e50cc0cb2bfeaa9705d0c6475f079d9f57806516ac6e760351                                                                                                                                                                                                                                                                                                                                           0.0s
 => => naming to docker.io/library/border0-proto-builder-swift                                                                                                                                                                                                                                                                                                                                                                         0.0s
docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/proto border0-proto-builder-swift;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/connector:/app/proto border0-proto-builder-swift;  docker run -v /Users/adriano/go/src/github.com/borderzero/border0-proto/common:/app/shared/common -v /Users/adriano/go/src/github.com/borderzero/border0-proto/device:/app/proto border0-proto-builder-swift;