Skip to content

Commit

Permalink
Add bufbuild/protoschema-plugins (bigquery, pubsub, jsonschema) v0.1.0 (
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman authored Mar 13, 2024
1 parent 1c69417 commit 4224695
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/bufbuild/protoschema-bigquery/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: bufbuild
repository: protoschema-plugins
2 changes: 2 additions & 0 deletions plugins/bufbuild/protoschema-bigquery/v0.1.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
15 changes: 15 additions & 0 deletions plugins/bufbuild/protoschema-bigquery/v0.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1.6
FROM --platform=$BUILDPLATFORM golang:1.22.1-bookworm AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags="-s -w" -trimpath github.com/bufbuild/protoschema-plugins/cmd/[email protected] \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-bigquery /go/bin/protoc-gen-bigquery || true

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link /go/bin/protoc-gen-bigquery /
USER nobody
ENTRYPOINT [ "/protoc-gen-bigquery" ]
9 changes: 9 additions & 0 deletions plugins/bufbuild/protoschema-bigquery/v0.1.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: v1
name: buf.build/bufbuild/protoschema-bigquery
plugin_version: v0.1.0
source_url: https://github.com/bufbuild/protoschema-plugins
description: Generates a Table schema that can be used to initialize a BigQuery table.
registry:
archive: {}
spdx_license_id: Apache-2.0
license_url: https://github.com/bufbuild/protoschema-plugins/blob/v0.1.0/LICENSE
4 changes: 4 additions & 0 deletions plugins/bufbuild/protoschema-jsonschema/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: bufbuild
repository: protoschema-plugins
2 changes: 2 additions & 0 deletions plugins/bufbuild/protoschema-jsonschema/v0.1.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
15 changes: 15 additions & 0 deletions plugins/bufbuild/protoschema-jsonschema/v0.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1.6
FROM --platform=$BUILDPLATFORM golang:1.22.1-bookworm AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags="-s -w" -trimpath github.com/bufbuild/protoschema-plugins/cmd/[email protected] \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-jsonschema /go/bin/protoc-gen-jsonschema || true

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link /go/bin/protoc-gen-jsonschema /
USER nobody
ENTRYPOINT [ "/protoc-gen-jsonschema" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: v1
name: buf.build/bufbuild/protoschema-jsonschema
plugin_version: v0.1.0
source_url: https://github.com/bufbuild/protoschema-plugins
description: Generates JSON Schema files from protobuf files. This implementation uses the latest Draft 2020-12.
registry:
archive: {}
spdx_license_id: Apache-2.0
license_url: https://github.com/bufbuild/protoschema-plugins/blob/v0.1.0/LICENSE
4 changes: 4 additions & 0 deletions plugins/bufbuild/protoschema-pubsub/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: bufbuild
repository: protoschema-plugins
2 changes: 2 additions & 0 deletions plugins/bufbuild/protoschema-pubsub/v0.1.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
15 changes: 15 additions & 0 deletions plugins/bufbuild/protoschema-pubsub/v0.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1.6
FROM --platform=$BUILDPLATFORM golang:1.22.1-bookworm AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags="-s -w" -trimpath github.com/bufbuild/protoschema-plugins/cmd/[email protected] \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-pubsub /go/bin/protoc-gen-pubsub || true

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link /go/bin/protoc-gen-pubsub /
USER nobody
ENTRYPOINT [ "/protoc-gen-pubsub" ]
9 changes: 9 additions & 0 deletions plugins/bufbuild/protoschema-pubsub/v0.1.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: v1
name: buf.build/bufbuild/protoschema-pubsub
plugin_version: v0.1.0
source_url: https://github.com/bufbuild/protoschema-plugins
description: Generates a PubSub schema in the form of a single self-contained messaged normalized to proto2.
registry:
archive: {}
spdx_license_id: Apache-2.0
license_url: https://github.com/bufbuild/protoschema-plugins/blob/v0.1.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:t7JFZIF3YIe61bG+XdEShzRZBeAgzB3EZH/M1zTNgr4=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:gsob0/+VzH2ItGxqwJzgz/rBMOU55KVfWABrKMNbLJ8=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:YmY236iTtcSzglNYUV9bo5BaPVGvQkDaGtYodCw9PXE=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:crrRlsC5HO9JEMtPx8+pjaqyeGNHL4NwsX8ByGm8yzo=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:L9RwJyIIdZ320achAuRucuQ51mW2AbpwT1ZWdddyURM=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:J59Nbi1l4fBtI4C5YgnyOH4NLcxRZqbvJBKw/EQq0u4=

0 comments on commit 4224695

Please sign in to comment.