Skip to content

Commit d963100

Browse files
committed
Update templates
1 parent b661f60 commit d963100

File tree

4 files changed

+35
-18
lines changed

4 files changed

+35
-18
lines changed

CHANGE_LOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 2025-03-24(1.2.0)
22
- 升级插件到 2.0 版本
3-
- 修复 `java.lang.Throwable: 'virtualFile' is requested on EDT...`问题
3+
- 修复 `java.lang.Throwable: 'virtualFile' is requested on EDT...` 问题
44

55
2022-04-29(1.1.0)
66
* rpc 代码生成支持 `goctl rpc protoc`
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
11
syntax = "v1"
22

3-
info(
4-
title: "type title here"
5-
desc: "type desc here"
6-
author: "type author here"
7-
email: "type email here"
3+
info (
4+
title: "type title here"
5+
desc: "type desc here"
6+
author: "type author here"
7+
email: "type email here"
88
version: "type version here"
99
)
1010

11+
type (
12+
PingReq {}
13+
HelloReq {
14+
Name string `path:"name"`
15+
}
16+
)
1117

12-
type request {
13-
// TODO: add members here and delete this comment
14-
}
18+
type (
19+
PingResp {}
20+
HelloResp {
21+
Message string `json:"message"`
22+
}
23+
)
1524

16-
type response {
17-
// TODO: add members here and delete this comment
25+
@server (
26+
group: ping
27+
)
28+
service Demo {
29+
@handler ping
30+
get /ping
1831
}
1932

20-
@server(
21-
jwt: Auth
22-
group: template
33+
@server (
34+
group: hello
2335
)
24-
service template {
25-
@handler handlerName // TODO: replace handler name and delete this comment
26-
get /users/id/:userId(request) returns(response)
36+
service Demo {
37+
@handler hell
38+
get /hello/:name (HelloReq) returns (HelloResp)
2739
}
40+
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
syntax = "proto3";
22

3-
package template;
3+
package template;
4+
5+
option go_package="./template";

src/main/resources/fileTemplates/internal/Proto Template.proto.ft

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ syntax = "proto3";
33

44
package stream;
55

6+
option go_package="./stream";
7+
68
message StreamReq {
79
string name = 1;
810
}

0 commit comments

Comments
 (0)