Skip to content

Commit

Permalink
feat: add demo
Browse files Browse the repository at this point in the history
  • Loading branch information
FGYFFFF committed Dec 11, 2023
1 parent a0202b9 commit 8c0e0b8
Show file tree
Hide file tree
Showing 26 changed files with 204 additions and 1,489 deletions.
37 changes: 37 additions & 0 deletions hz/struct_reuse/demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
*.o
*.a
*.so
_obj
_test
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.exe~
*.test
*.prof
*.rar
*.zip
*.gz
*.psd
*.bmd
*.cfg
*.pptx
*.log
*nohup.out
*settings.pyc
*.sublime-project
*.sublime-workspace
!.gitkeep
.DS_Store
/.idea
/.vscode
/output
*.local.yml
dumped_hertz_remote_config.json

6 changes: 6 additions & 0 deletions hz/struct_reuse/demo/.hz
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Code generated by hz. DO NOT EDIT.

hz version: v0.7.1
handlerDir: ""
modelDir: ""
routerDir: ""
5 changes: 5 additions & 0 deletions hz/struct_reuse/demo/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
new:
hz new --mod=github.com/cloudwego/hertz-examples/struct_recurse/demo --idl=../thrift/hello.thrift --use=a/b/c/kitex_gen

update:
hz update --idl=../thrift/hello.thrift
27 changes: 27 additions & 0 deletions hz/struct_reuse/demo/biz/handler/hello/example/hello_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions hz/struct_reuse/demo/biz/handler/ping.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions hz/struct_reuse/demo/biz/router/hello/example/hello.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions hz/struct_reuse/demo/biz/router/hello/example/middleware.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions hz/struct_reuse/demo/biz/router/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions hz/struct_reuse/demo/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
RUN_NAME=hertz_service
mkdir -p output/bin
cp script/* output 2>/dev/null
chmod +x output/bootstrap.sh
go build -o output/bin/${RUN_NAME}
3 changes: 3 additions & 0 deletions hz/struct_reuse/demo/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/cloudwego/hertz-examples/struct_recurse/demo
replace github.com/apache/thrift => github.com/apache/thrift v0.13.0
14 changes: 14 additions & 0 deletions hz/struct_reuse/demo/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions hz/struct_reuse/demo/router.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions hz/struct_reuse/demo/router_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions hz/struct_reuse/demo/script/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
CURDIR=$(cd $(dirname $0); pwd)
BinaryName=hertz_service
echo "$CURDIR/bin/${BinaryName}"
exec $CURDIR/bin/${BinaryName}
77 changes: 0 additions & 77 deletions hz/struct_reuse/protobuf/api.proto

This file was deleted.

22 changes: 0 additions & 22 deletions hz/struct_reuse/protobuf/hello/hello.proto

This file was deleted.

20 changes: 0 additions & 20 deletions hz/struct_reuse/protobuf_reuse/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions hz/struct_reuse/protobuf_reuse/go.mod

This file was deleted.

15 changes: 0 additions & 15 deletions hz/struct_reuse/protobuf_reuse/kitex_gen/api/api.pb.fast.go

This file was deleted.

Loading

0 comments on commit 8c0e0b8

Please sign in to comment.