Skip to content

Commit 661ba91

Browse files
authored
Add connectrpc/gosimple (#2023)
This PR adds a new connectrpc-go plugin with the `simple` option.
1 parent 811eff3 commit 661ba91

File tree

6 files changed

+44
-0
lines changed

6 files changed

+44
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source:
2+
github:
3+
owner: connectrpc
4+
repository: connect-go
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# syntax=docker/dockerfile:1.18
2+
FROM --platform=$BUILDPLATFORM golang:1.25.1-bookworm AS build
3+
4+
ARG TARGETOS TARGETARCH
5+
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
6+
7+
RUN --mount=type=cache,target=/go/pkg/mod \
8+
go install -ldflags="-s -w" -trimpath connectrpc.com/connect/cmd/[email protected] \
9+
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-connect-go /go/bin/protoc-gen-connect-go || true
10+
11+
FROM scratch
12+
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
13+
COPY --from=build --link /go/bin/protoc-gen-connect-go /
14+
USER nobody
15+
ENTRYPOINT [ "/protoc-gen-connect-go" ]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: v1
2+
name: buf.build/connectrpc/gosimple
3+
plugin_version: v1.19.0
4+
source_url: https://github.com/connectrpc/connect-go
5+
integration_guide_url: https://connectrpc.com/docs/go/getting-started
6+
description: Generates client and server stubs with simple function signatures for connectrpc.com/connect. Compatible with the gRPC, gRPC-Web, and Connect RPC protocols.
7+
deps:
8+
- plugin: buf.build/protocolbuffers/go:v1.36.9
9+
output_languages:
10+
- go
11+
registry:
12+
go:
13+
min_version: "1.24"
14+
deps:
15+
- module: connectrpc.com/connect
16+
version: v1.19.0
17+
opts:
18+
- paths=source_relative
19+
- simple
20+
spdx_license_id: Apache-2.0
21+
license_url: https://github.com/connectrpc/connect-go/blob/v1.19.0/LICENSE
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:YRv9BxkN+euOH9Z4cbDJsBcE7PV5bMc/CRdumQ7YG7g=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:2OQOwNtie1hgyVA/bEr78VRW00AAnq+bUNLs4XkVLTw=

0 commit comments

Comments
 (0)