Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add requestid middleware examples #47

Merged
merged 3 commits into from
Nov 5, 2022
Merged

feat: add requestid middleware examples #47

merged 3 commits into from
Nov 5, 2022

Conversation

justlorain
Copy link
Member

What type of PR is this?

feat: A new feature

What this PR does / why we need it (English/Chinese):

en: Add requestid middlerware examples
zh: 添加requestid中间件的使用示例

Which issue(s) this PR fixes:

Fixes (hertz-contrib/requestid#6)

go.mod Show resolved Hide resolved
go.mod Show resolved Hide resolved
@li-jin-gou li-jin-gou merged commit c014e60 into cloudwego:main Nov 5, 2022
leeeezp added a commit to leeeezp/hertz-examples that referenced this pull request Mar 12, 2023
* init

* add idl file && hz new

* go mod tidy

* change snake_case to CamelCase

* fix name format

* add listen port (cloudwego#5)

* add gorm && user table test

* impl /douyin/user/register (cloudwego#7)

* init jwt (cloudwego#8)

* separate handler and service

* init jwt

* impl func db/verifyuser (cloudwego#9)

* impl /douyin/user/register

* impl func db/verifyuser

* Revert "impl func db/verifyuser (cloudwego#9)" (cloudwego#10)

This reverts commit 8f7a12b.

* impl func db/verifyuser (cloudwego#11)

* impl /douyin/user/register

* impl func db/verifyuser

* add minio (cloudwego#12)

* update login jwt (cloudwego#13)

* impl func /usr/login

* update login jwt

---------

Co-authored-by: kpole <751711132@qq.com>

* update all jwt (cloudwego#14)

* fix jwt bug (cloudwego#16)

* update all jwt

* fix jwt bug

* rm data/ git

* Revert "fix jwt bug (cloudwego#16)" (cloudwego#17)

This reverts commit a50e830.

* fix jwt bug (cloudwego#18)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* impl /douyin/user (cloudwego#19)

* fix jwt bug && init publish service (cloudwego#20)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service (cloudwego#21)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service

* add url convert && fix ffmpeg && add  minioReverseProxy (cloudwego#22)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service

* add minioReverseProxy

* add url convert

* rm data (cloudwego#23)

* impl /douyin/feed (cloudwego#24)

* fix URLconvert bug (cloudwego#25)

* rm data

* fix reverseProxy

* fix URLconvert

* impl followerList (cloudwego#26)

* impl followerList

* impl friendList

* impl publish list service (cloudwego#27)

* rm data

* fix reverseProxy

* fix URLconvert

* impl publish list service

* finish follow

* add redis as cache

* impl message service (cloudwego#28)

* favoritAction impl

* impl friendList with message (cloudwego#31)

* impl followerList

* impl friendList

* impl friendList with message

* update friendList_test.md

* add TestGetLatestMessage

* add new field in user && check dir (cloudwego#30)

* rm data

* fix reverseProxy

* fix URLconvert

* impl publish list service

* rm ffmpeg docker

* fix docker compose yml

* add workCount field

* add new field

* add new test data

* fix bug (cloudwego#33)

* impl favorite list (cloudwego#34)

* impl /douyin/favorite/action

* fix docker compose yml

* fix rebase

* fix rebase

* impl friendList with message (cloudwego#31)

* impl followerList

* impl friendList

* impl friendList with message

* update friendList_test.md

* add TestGetLatestMessage

* fix bug

* fix bug

* impl favorite list

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: zztaki <50295684+zztaki@users.noreply.github.com>

* impl comment list (cloudwego#35)

* impl douyin/comment/action

* impl comment list

---------

Co-authored-by: kpole <751711132@qq.com>

* fix QueryTotalFavoritedByAuthorID bug (cloudwego#36)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

---------

Co-authored-by: kpole <751711132@qq.com>

* add dockerfile && go build sh(cloudwego#37)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

---------

Co-authored-by: kpole <751711132@qq.com>

* bugfix db index (cloudwego#38)

* fix bug

* bugfix (cloudwego#40)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

* bugFix

* bugFix

* bugFix comment

* bugFix docker file

* fix merge

* bugfix

---------

Co-authored-by: kpole <751711132@qq.com>

* debug friendList && modify signature (cloudwego#43)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

* bugFix

* bugFix

* bugFix comment

* bugFix docker file

* fix merge

* bugfix

* debug friendList && modify signature

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: zztaki <1208191544@qq.com>

* update dockerfile (cloudwego#44)

* fix message create_time (cloudwego#45)

* bugfix ffmpeg (cloudwego#46)

* update dockerfile

* test bug

* fix state code

* bugtest

* bugtest ffmpeg

* bugtest ffmpeg

* bugfix ffmpeg

* rm 401 (cloudwego#47)

* update dockerfile

* test bug

* fix state code

* bugtest

* bugtest ffmpeg

* bugtest ffmpeg

* bugfix ffmpeg

* rm 401

* fix model

* tidy code (cloudwego#48)

* update dockerfile

* tidy code && add makefile

* change password crypto && tidy code

* tidy code

* add an example of simple tiktok server

* fix data race

* tidy code

* add License Header

* fix misspell

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: hyd <37112631+Kpole@users.noreply.github.com>
Co-authored-by: zztaki <50295684+zztaki@users.noreply.github.com>
Co-authored-by: BourneHUST <763951321@qq.com>
Co-authored-by: meyoung512 <2109981673@qq.com>
Co-authored-by: meyoung512 <75015420+meyoung512@users.noreply.github.com>
Co-authored-by: Bourne <59087471+BourneHUST@users.noreply.github.com>
Co-authored-by: bournehuang <bournehuang@tencent.com>
Co-authored-by: zztaki <1208191544@qq.com>
leeeezp added a commit to leeeezp/hertz-examples that referenced this pull request Mar 17, 2023
* init

* add idl file && hz new

* go mod tidy

* change snake_case to CamelCase

* fix name format

* add listen port (cloudwego#5)

* add gorm && user table test

* impl /douyin/user/register (cloudwego#7)

* init jwt (cloudwego#8)

* separate handler and service

* init jwt

* impl func db/verifyuser (cloudwego#9)

* impl /douyin/user/register

* impl func db/verifyuser

* Revert "impl func db/verifyuser (cloudwego#9)" (cloudwego#10)

This reverts commit 8f7a12b.

* impl func db/verifyuser (cloudwego#11)

* impl /douyin/user/register

* impl func db/verifyuser

* add minio (cloudwego#12)

* update login jwt (cloudwego#13)

* impl func /usr/login

* update login jwt

---------

Co-authored-by: kpole <751711132@qq.com>

* update all jwt (cloudwego#14)

* fix jwt bug (cloudwego#16)

* update all jwt

* fix jwt bug

* rm data/ git

* Revert "fix jwt bug (cloudwego#16)" (cloudwego#17)

This reverts commit a50e830.

* fix jwt bug (cloudwego#18)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* impl /douyin/user (cloudwego#19)

* fix jwt bug && init publish service (cloudwego#20)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service (cloudwego#21)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service

* add url convert && fix ffmpeg && add  minioReverseProxy (cloudwego#22)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service

* add minioReverseProxy

* add url convert

* rm data (cloudwego#23)

* impl /douyin/feed (cloudwego#24)

* fix URLconvert bug (cloudwego#25)

* rm data

* fix reverseProxy

* fix URLconvert

* impl followerList (cloudwego#26)

* impl followerList

* impl friendList

* impl publish list service (cloudwego#27)

* rm data

* fix reverseProxy

* fix URLconvert

* impl publish list service

* finish follow

* add redis as cache

* impl message service (cloudwego#28)

* favoritAction impl

* impl friendList with message (cloudwego#31)

* impl followerList

* impl friendList

* impl friendList with message

* update friendList_test.md

* add TestGetLatestMessage

* add new field in user && check dir (cloudwego#30)

* rm data

* fix reverseProxy

* fix URLconvert

* impl publish list service

* rm ffmpeg docker

* fix docker compose yml

* add workCount field

* add new field

* add new test data

* fix bug (cloudwego#33)

* impl favorite list (cloudwego#34)

* impl /douyin/favorite/action

* fix docker compose yml

* fix rebase

* fix rebase

* impl friendList with message (cloudwego#31)

* impl followerList

* impl friendList

* impl friendList with message

* update friendList_test.md

* add TestGetLatestMessage

* fix bug

* fix bug

* impl favorite list

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: zztaki <50295684+zztaki@users.noreply.github.com>

* impl comment list (cloudwego#35)

* impl douyin/comment/action

* impl comment list

---------

Co-authored-by: kpole <751711132@qq.com>

* fix QueryTotalFavoritedByAuthorID bug (cloudwego#36)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

---------

Co-authored-by: kpole <751711132@qq.com>

* add dockerfile && go build sh(cloudwego#37)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

---------

Co-authored-by: kpole <751711132@qq.com>

* bugfix db index (cloudwego#38)

* fix bug

* bugfix (cloudwego#40)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

* bugFix

* bugFix

* bugFix comment

* bugFix docker file

* fix merge

* bugfix

---------

Co-authored-by: kpole <751711132@qq.com>

* debug friendList && modify signature (cloudwego#43)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

* bugFix

* bugFix

* bugFix comment

* bugFix docker file

* fix merge

* bugfix

* debug friendList && modify signature

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: zztaki <1208191544@qq.com>

* update dockerfile (cloudwego#44)

* fix message create_time (cloudwego#45)

* bugfix ffmpeg (cloudwego#46)

* update dockerfile

* test bug

* fix state code

* bugtest

* bugtest ffmpeg

* bugtest ffmpeg

* bugfix ffmpeg

* rm 401 (cloudwego#47)

* update dockerfile

* test bug

* fix state code

* bugtest

* bugtest ffmpeg

* bugtest ffmpeg

* bugfix ffmpeg

* rm 401

* fix model

* tidy code (cloudwego#48)

* update dockerfile

* tidy code && add makefile

* change password crypto && tidy code

* tidy code

* add an example of simple tiktok server

* fix data race

* tidy code

* add License Header

* fix misspell

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: hyd <37112631+Kpole@users.noreply.github.com>
Co-authored-by: zztaki <50295684+zztaki@users.noreply.github.com>
Co-authored-by: BourneHUST <763951321@qq.com>
Co-authored-by: meyoung512 <2109981673@qq.com>
Co-authored-by: meyoung512 <75015420+meyoung512@users.noreply.github.com>
Co-authored-by: Bourne <59087471+BourneHUST@users.noreply.github.com>
Co-authored-by: bournehuang <bournehuang@tencent.com>
Co-authored-by: zztaki <1208191544@qq.com>
welkeyever pushed a commit that referenced this pull request Mar 22, 2023
* feat:add an example about tiktok server demo (#1)

* init

* add idl file && hz new

* go mod tidy

* change snake_case to CamelCase

* fix name format

* add listen port (#5)

* add gorm && user table test

* impl /douyin/user/register (#7)

* init jwt (#8)

* separate handler and service

* init jwt

* impl func db/verifyuser (#9)

* impl /douyin/user/register

* impl func db/verifyuser

* Revert "impl func db/verifyuser (#9)" (#10)

This reverts commit 8f7a12b.

* impl func db/verifyuser (#11)

* impl /douyin/user/register

* impl func db/verifyuser

* add minio (#12)

* update login jwt (#13)

* impl func /usr/login

* update login jwt

---------

Co-authored-by: kpole <751711132@qq.com>

* update all jwt (#14)

* fix jwt bug (#16)

* update all jwt

* fix jwt bug

* rm data/ git

* Revert "fix jwt bug (#16)" (#17)

This reverts commit a50e830.

* fix jwt bug (#18)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* impl /douyin/user (#19)

* fix jwt bug && init publish service (#20)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service (#21)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service

* add url convert && fix ffmpeg && add  minioReverseProxy (#22)

* update all jwt

* fix jwt bug

* rm data/ git

* add mini sys ignore

* fix jwt bug

* fix jwt bug

* update publish model

* init publish service

* impl publish action service

* add minioReverseProxy

* add url convert

* rm data (#23)

* impl /douyin/feed (#24)

* fix URLconvert bug (#25)

* rm data

* fix reverseProxy

* fix URLconvert

* impl followerList (#26)

* impl followerList

* impl friendList

* impl publish list service (#27)

* rm data

* fix reverseProxy

* fix URLconvert

* impl publish list service

* finish follow

* add redis as cache

* impl message service (#28)

* favoritAction impl

* impl friendList with message (#31)

* impl followerList

* impl friendList

* impl friendList with message

* update friendList_test.md

* add TestGetLatestMessage

* add new field in user && check dir (#30)

* rm data

* fix reverseProxy

* fix URLconvert

* impl publish list service

* rm ffmpeg docker

* fix docker compose yml

* add workCount field

* add new field

* add new test data

* fix bug (#33)

* impl favorite list (#34)

* impl /douyin/favorite/action

* fix docker compose yml

* fix rebase

* fix rebase

* impl friendList with message (#31)

* impl followerList

* impl friendList

* impl friendList with message

* update friendList_test.md

* add TestGetLatestMessage

* fix bug

* fix bug

* impl favorite list

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: zztaki <50295684+zztaki@users.noreply.github.com>

* impl comment list (#35)

* impl douyin/comment/action

* impl comment list

---------

Co-authored-by: kpole <751711132@qq.com>

* fix QueryTotalFavoritedByAuthorID bug (#36)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

---------

Co-authored-by: kpole <751711132@qq.com>

* add dockerfile && go build sh(#37)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

---------

Co-authored-by: kpole <751711132@qq.com>

* bugfix db index (#38)

* fix bug

* bugfix (#40)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

* bugFix

* bugFix

* bugFix comment

* bugFix docker file

* fix merge

* bugfix

---------

Co-authored-by: kpole <751711132@qq.com>

* debug friendList && modify signature (#43)

* impl douyin/comment/action

* impl comment list

* fix QueryTotalFavoritedByAuthorID bug

* fix redis restart bug

* add docker file

* add docker-compose file

* fix docker-compose file

* add go build sh

* bugFix

* bugFix

* bugFix comment

* bugFix docker file

* fix merge

* bugfix

* debug friendList && modify signature

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: zztaki <1208191544@qq.com>

* update dockerfile (#44)

* fix message create_time (#45)

* bugfix ffmpeg (#46)

* update dockerfile

* test bug

* fix state code

* bugtest

* bugtest ffmpeg

* bugtest ffmpeg

* bugfix ffmpeg

* rm 401 (#47)

* update dockerfile

* test bug

* fix state code

* bugtest

* bugtest ffmpeg

* bugtest ffmpeg

* bugfix ffmpeg

* rm 401

* fix model

* tidy code (#48)

* update dockerfile

* tidy code && add makefile

* change password crypto && tidy code

* tidy code

* add an example of simple tiktok server

* fix data race

* tidy code

* add License Header

* fix misspell

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: hyd <37112631+Kpole@users.noreply.github.com>
Co-authored-by: zztaki <50295684+zztaki@users.noreply.github.com>
Co-authored-by: BourneHUST <763951321@qq.com>
Co-authored-by: meyoung512 <2109981673@qq.com>
Co-authored-by: meyoung512 <75015420+meyoung512@users.noreply.github.com>
Co-authored-by: Bourne <59087471+BourneHUST@users.noreply.github.com>
Co-authored-by: bournehuang <bournehuang@tencent.com>
Co-authored-by: zztaki <1208191544@qq.com>

* change module name && tidy code

* update readme

* update hz version && fix IDL

* add note

* update readme

* add license

* fix conf compliant

---------

Co-authored-by: kpole <751711132@qq.com>
Co-authored-by: hyd <37112631+Kpole@users.noreply.github.com>
Co-authored-by: zztaki <50295684+zztaki@users.noreply.github.com>
Co-authored-by: BourneHUST <763951321@qq.com>
Co-authored-by: meyoung512 <2109981673@qq.com>
Co-authored-by: meyoung512 <75015420+meyoung512@users.noreply.github.com>
Co-authored-by: Bourne <59087471+BourneHUST@users.noreply.github.com>
Co-authored-by: bournehuang <bournehuang@tencent.com>
Co-authored-by: zztaki <1208191544@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants