Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/go-kratos/http/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: go-kratos
repository: kratos
2 changes: 2 additions & 0 deletions plugins/go-kratos/http/v2.9.2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
15 changes: 15 additions & 0 deletions plugins/go-kratos/http/v2.9.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1.17
FROM --platform=$BUILDPLATFORM golang:1.25.0-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 go install github.com/go-kratos/kratos/cmd/protoc-gen-go-http/v2@b9fab9a \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-go-http /go/bin/protoc-gen-go-http || true

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-go-http .
USER nobody
ENTRYPOINT [ "/protoc-gen-go-http" ]
8 changes: 8 additions & 0 deletions plugins/go-kratos/http/v2.9.2/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: v1
name: buf.build/community/kratos-http
plugin_version: v0.7.1
source_url: https://github.com/go-kratos/kratos/tree/main/cmd/protoc-gen-go-http
integration_guide_url: https://github.com/go-kratos/kratos#getting-started
description: A protoc plugin that generates Kratos HTTP server/client stubs and routing code from protobuf services annotated with HTTP options.
spdx_license_id: MIT
license_url: https://github.com/go-kratos/kratos/blob/main/LICENSE