generated from go-kratos/kratos-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
managing protobuf with buf
- Loading branch information
Showing
32 changed files
with
1,252 additions
and
5,102 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,18 @@ | ||
version: v1 | ||
|
||
deps: | ||
- 'buf.build/googleapis/googleapis' | ||
- 'buf.build/envoyproxy/protoc-gen-validate' | ||
- 'buf.build/kratos/apis' | ||
- 'buf.build/gnostic/gnostic' | ||
- 'buf.build/gogo/protobuf' | ||
- 'buf.build/tx7do/pagination' | ||
|
||
breaking: | ||
use: | ||
- FILE | ||
|
||
lint: | ||
use: | ||
- DEFAULT | ||
allow_comment_ignores: true |
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,45 @@ | ||
# 配置protoc生成规则 | ||
version: v1 | ||
|
||
managed: | ||
enabled: true | ||
optimize_for: SPEED | ||
|
||
plugins: | ||
# 使用go插件生成go代码 | ||
#- plugin: buf.build/protocolbuffers/go | ||
- name: go | ||
out: gen/api/go | ||
opt: paths=source_relative # 使用相对路径 | ||
|
||
# 使用go-grpc插件生成gRPC服务代码 | ||
#- plugin: buf.build/grpc/go | ||
- name: go-grpc | ||
out: gen/api/go | ||
opt: | ||
- paths=source_relative # 使用相对路径 | ||
|
||
# generate rest service code | ||
- name: go-http | ||
out: gen/api/go | ||
opt: | ||
- paths=source_relative # 使用相对路径 | ||
|
||
# generate kratos errors code | ||
- name: go-errors | ||
out: gen/api/go | ||
opt: | ||
- paths=source_relative # 使用相对路径 | ||
|
||
# generate message validator code | ||
#- plugin: buf.build/bufbuild/validate-go | ||
- name: validate | ||
out: gen/api/go | ||
opt: | ||
- paths=source_relative # 使用相对路径 | ||
- lang=go | ||
|
||
- name: openapi | ||
out: api | ||
opt: | ||
- paths=source_relative |
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 @@ | ||
version: v1 | ||
|
||
directories: | ||
- api |
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,21 @@ | ||
# 配置protoc生成规则 | ||
version: v1 | ||
|
||
managed: | ||
enabled: true | ||
optimize_for: SPEED | ||
|
||
plugins: | ||
# 使用go插件生成go代码 | ||
#- plugin: buf.build/protocolbuffers/go | ||
- name: go | ||
out: ./ | ||
opt: paths=source_relative # 使用相对路径 | ||
|
||
# generate message validator code | ||
#- plugin: buf.build/bufbuild/validate-go | ||
- name: validate | ||
out: ./ | ||
opt: | ||
- paths=source_relative # 使用相对路径 | ||
- lang=go |
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,7 @@ | ||
version: v1 | ||
breaking: | ||
use: | ||
- FILE | ||
lint: | ||
use: | ||
- DEFAULT |
Oops, something went wrong.