-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bufbuild/protoschema-plugins (bigquery, pubsub, jsonschema) v0.1.0 (
- Loading branch information
Showing
18 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source: | ||
github: | ||
owner: bufbuild | ||
repository: protoschema-plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source: | ||
github: | ||
owner: bufbuild | ||
repository: protoschema-plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
9 changes: 9 additions & 0 deletions
9
plugins/bufbuild/protoschema-jsonschema/v0.1.0/buf.plugin.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source: | ||
github: | ||
owner: bufbuild | ||
repository: protoschema-plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/bufbuild/protoschema-bigquery/v0.1.0/eliza/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:t7JFZIF3YIe61bG+XdEShzRZBeAgzB3EZH/M1zTNgr4= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/bufbuild/protoschema-bigquery/v0.1.0/petapis/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:gsob0/+VzH2ItGxqwJzgz/rBMOU55KVfWABrKMNbLJ8= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/bufbuild/protoschema-jsonschema/v0.1.0/eliza/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:YmY236iTtcSzglNYUV9bo5BaPVGvQkDaGtYodCw9PXE= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/bufbuild/protoschema-jsonschema/v0.1.0/petapis/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:crrRlsC5HO9JEMtPx8+pjaqyeGNHL4NwsX8ByGm8yzo= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/bufbuild/protoschema-pubsub/v0.1.0/eliza/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:L9RwJyIIdZ320achAuRucuQ51mW2AbpwT1ZWdddyURM= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/bufbuild/protoschema-pubsub/v0.1.0/petapis/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:J59Nbi1l4fBtI4C5YgnyOH4NLcxRZqbvJBKw/EQq0u4= |