From 8a93184ef100ae297cee5c0ba53e6669fb08d44b Mon Sep 17 00:00:00 2001 From: jaronnie Date: Wed, 17 Apr 2024 13:43:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(jzero):=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/src/.vuepress/public/favicon.ico | Bin 67646 -> 4286 bytes docs/src/.vuepress/theme.ts | 4 +- docs/src/guide/config/README.md | 9 ++++ docs/src/guide/config/logger.md | 9 ++++ docs/src/guide/config/prometheus.md | 9 ++++ docs/src/guide/config/telemetry.md | 9 ++++ docs/src/guide/develop/README.md | 9 ++++ docs/src/guide/develop/proto.md | 9 ++++ docs/src/guide/develop/template.md | 9 ++++ docs/src/guide/gen.md | 74 -------------------------- docs/src/guide/new.md | 32 +---------- 11 files changed, 67 insertions(+), 106 deletions(-) create mode 100644 docs/src/guide/config/README.md create mode 100644 docs/src/guide/config/logger.md create mode 100644 docs/src/guide/config/prometheus.md create mode 100644 docs/src/guide/config/telemetry.md create mode 100644 docs/src/guide/develop/README.md create mode 100644 docs/src/guide/develop/proto.md create mode 100644 docs/src/guide/develop/template.md diff --git a/docs/src/.vuepress/public/favicon.ico b/docs/src/.vuepress/public/favicon.ico index b411f79ddd958612bceaae08e4fb10ad15340db2..01f904779bcecb537d88f57a88885e2bae7e97a3 100644 GIT binary patch literal 4286 zcmeHL=~G+R6<7a*&UB{z*2zrUES^rMO_!O{W}KyyOmW>bcG{*%>$Ju=#)-jTL?py6 zBN?*_j3f}dStLMcG1#mIEMx=%Y>-$aS*$WkQ@gHXQZUP}=U#Z2FkbqpUz(@6@7;Uu zx%YR@x#ygFMk3MI==a=nBK8*Pzb+DeQzR0-NR3FMSE(^Ne`s#+gI&+c!*yu06_~hI zgVAn1M!Tvp)@{JNZxH^WPFzlW4Nc+SL38XYxR(4&-tU%tAJ${vz}4hmp)coM1iXU? z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 z*OXGW9))eB=X;Ujy^4|#r(94v2JhJ>ct*L{zc~Wnd$@Y~<2WZCj6PrVQ)f#9k@m>FZ#WKNGjWw}-bwu6YFs-s| z-`Yz~Pf*P=sr$f0eE$^iJ=br)7Z37YWW=|t4gH?}pRlD6Uzi_o4!|{w^y~ts&Kkqj zf%8RM!9hX(=8UqjKek5wRj)iD=PXg!2^KZ^f0kFpKpezn`cPRTfpYt{y zyV8zSU&_0}n^WV>rhreIsH(#_3iB-puN!&L+=wfVNF+1Nbgt z$Qr{9ShprpJjgNvT=Vi#6T6&a!L73fI-Z~V>X2KrPoe)L#(T474-TY~ehvNmWBYZ- zgCkJJK-)}zWPU&~upQ9$0p}U|!oYZN2lz2wV_4Zko2mi*HE(G<`zM&c#5EgC$9Zwj ze_-l_(q0(v38fJIIqTemPNfelLm9b#nx3!a9}jZ;gMS+&)JEL{n3uu~Z1va30M{#j z!FS{X=g`~%Zh8W`=6JRo16y7IwEfXJ7B)G56BGAZZB3|MMaesu?=&1fqirY41RM?g z-sDT*pLHNeurZFIH1ot_zqd)h-*rX075Kqf2JKxnAe5v3cxtt zke*5#BFZv?5Vg2wkEAl?( z2aEwe0`zJM_>T-!*61kX@+5yKp^S?1p|XSC1_{ z0Wjtceq$kC=#A?=4A2L(u8THc7uMj}g?_YN*|Is9w&ib z#@yj(jqg}+^)TM+-v-_VI0i&8K4SfU3m6OJx^!Ycu16a<))6y8YdnVM)G_q0W6(c_ zYw4mK`kz!Yp|nWnzMn8O?WC4*? zS^?dxlLdq+X$3?&t$-+sn^pxx(bEdZwDVB~Y*R_Ez=^af;5P5~%(N \ No newline at end of file diff --git a/docs/src/guide/config/logger.md b/docs/src/guide/config/logger.md new file mode 100644 index 00000000..e637f375 --- /dev/null +++ b/docs/src/guide/config/logger.md @@ -0,0 +1,9 @@ +--- +title: 日志配置 +icon: gears +star: true +order: 1 +category: 配置 +tag: + - Guide +--- \ No newline at end of file diff --git a/docs/src/guide/config/prometheus.md b/docs/src/guide/config/prometheus.md new file mode 100644 index 00000000..73497e29 --- /dev/null +++ b/docs/src/guide/config/prometheus.md @@ -0,0 +1,9 @@ +--- +title: prometheus 配置 +icon: gears +star: true +order: 2 +category: 配置 +tag: + - Guide +--- \ No newline at end of file diff --git a/docs/src/guide/config/telemetry.md b/docs/src/guide/config/telemetry.md new file mode 100644 index 00000000..b4f53735 --- /dev/null +++ b/docs/src/guide/config/telemetry.md @@ -0,0 +1,9 @@ +--- +title: 链路追踪配置 +icon: gears +star: true +order: 3 +category: 配置 +tag: + - Guide +--- \ No newline at end of file diff --git a/docs/src/guide/develop/README.md b/docs/src/guide/develop/README.md new file mode 100644 index 00000000..2d386264 --- /dev/null +++ b/docs/src/guide/develop/README.md @@ -0,0 +1,9 @@ +--- +title: 开发模块 +icon: puzzle-piece +index: false +dir: + order: 6 +--- + + \ No newline at end of file diff --git a/docs/src/guide/develop/proto.md b/docs/src/guide/develop/proto.md new file mode 100644 index 00000000..e6869866 --- /dev/null +++ b/docs/src/guide/develop/proto.md @@ -0,0 +1,9 @@ +--- +title: proto 规范 +icon: puzzle-piece +star: true +order: 1 +category: 开发 +tag: + - Guide +--- \ No newline at end of file diff --git a/docs/src/guide/develop/template.md b/docs/src/guide/develop/template.md new file mode 100644 index 00000000..2235a274 --- /dev/null +++ b/docs/src/guide/develop/template.md @@ -0,0 +1,9 @@ +--- +title: 模版定制化 +icon: puzzle-piece +star: true +order: 2 +category: 开发 +tag: + - Guide +--- \ No newline at end of file diff --git a/docs/src/guide/gen.md b/docs/src/guide/gen.md index 6fc1c494..87322c2e 100644 --- a/docs/src/guide/gen.md +++ b/docs/src/guide/gen.md @@ -36,78 +36,4 @@ curl http://localhost:8001/api/v1.0/credential/version grpcurl -plaintext localhost:8000 credentialpb.credential/CredentialVersion # api curl http://localhost:8001/api/v1/hello/me -``` - -执行命令后的代码结构为: - -```shell -$ tree -. -├── cmd -│   ├── daemon.go -│   └── root.go -├── config.toml -├── daemon -│   ├── api -│   │   ├── app1.api -│   │   ├── file.api -│   │   └── hello.api -│   ├── daemon.go -│   ├── internal -│   │   ├── config -│   │   │   └── config.go -│   │   ├── handler -│   │   │   ├── file -│   │   │   │   ├── downloadhandler.go -│   │   │   │   └── uploadhandler.go -│   │   │   ├── hello -│   │   │   │   ├── helloparamhandler.go -│   │   │   │   ├── hellopathhandler.go -│   │   │   │   └── helloposthandler.go -│   │   │   ├── myhandler.go -│   │   │   ├── myroutes.go -│   │   │   └── routes.go -│   │   ├── logic -│   │   │   ├── credential -│   │   │   │   └── credentialversionlogic.go -│   │   │   ├── credentialv2 -│   │   │   │   └── credentialversionlogic.go -│   │   │   ├── file -│   │   │   │   ├── downloadlogic.go -│   │   │   │   └── uploadlogic.go -│   │   │   ├── hello -│   │   │   │   ├── helloparamlogic.go -│   │   │   │   ├── hellopathlogic.go -│   │   │   │   └── hellopostlogic.go -│   │   │   ├── machine -│   │   │   │   └── machineversionlogic.go -│   │   │   └── machinev2 -│   │   │   └── machineversionlogic.go -│   │   ├── server -│   │   │   ├── credential -│   │   │   │   └── credentialserver.go -│   │   │   ├── credentialv2 -│   │   │   │   └── credentialv2server.go -│   │   │   ├── machine -│   │   │   │   └── machineserver.go -│   │   │   └── machinev2 -│   │   │   └── machinev2server.go -│   │   ├── svc -│   │   │   └── servicecontext.go -│   │   └── types -│   │   └── types.go -│   ├── pb -│   │   ├── credentialpb -│   │   │   ├── credential.pb.go -│   │   │   └── credential_grpc.pb.go -│   │   └── machinepb -│   │   ├── machine.pb.go -│   │   └── machine_grpc.pb.go -│   └── proto -│   ├── credential.proto -│   └── machine.proto -├── go.mod -└── main.go - -27 directories, 39 files ``` \ No newline at end of file diff --git a/docs/src/guide/new.md b/docs/src/guide/new.md index 2a14142b..2a8a3c98 100644 --- a/docs/src/guide/new.md +++ b/docs/src/guide/new.md @@ -12,34 +12,4 @@ flag 解释: * module 表示新建项目的 go module * dir 表示创建的项目目录路径 -* app 表示项目名 - -生成的代码结构: - -```shell -$ tree -. -├── cmd -│   ├── daemon.go -│   └── root.go -├── config.toml -├── daemon -│   ├── api -│   │   ├── app1.api -│   │   ├── file.api -│   │   └── hello.api -│   ├── daemon.go -│   ├── internal -│   │   ├── config -│   │   │   └── config.go -│   │   └── handler -│   │   ├── myhandler.go -│   │   └── myroutes.go -│   └── proto -│   ├── credential.proto -│   └── machine.proto -├── go.mod -└── main.go - -8 directories, 14 files -``` \ No newline at end of file +* app 表示项目名 \ No newline at end of file