Full Code of cloudwego/biz-demo for AI

main 0e3c794d6e40 cached
4319 files
17.0 MB
4.7M tokens
22244 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (18,851K chars total). Download the full file to get everything.
Repository: cloudwego/biz-demo
Branch: main
Commit: 0e3c794d6e40
Files: 4319
Total size: 17.0 MB

Directory structure:
gitextract_78o5kfb2/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── pr-check.yml
│       └── tests.yml
├── .gitignore
├── .golangci.yml
├── .licenserc.yaml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── _typos.toml
├── book-shop/
│   ├── Makefile
│   ├── README.md
│   ├── app/
│   │   ├── facade/
│   │   │   ├── handlers/
│   │   │   │   ├── handler_item/
│   │   │   │   │   ├── add.go
│   │   │   │   │   ├── del.go
│   │   │   │   │   ├── edit.go
│   │   │   │   │   ├── get.go
│   │   │   │   │   ├── list.go
│   │   │   │   │   ├── mget2c.go
│   │   │   │   │   ├── offline.go
│   │   │   │   │   ├── online.go
│   │   │   │   │   └── search.go
│   │   │   │   ├── handler_order/
│   │   │   │   │   ├── cancel.go
│   │   │   │   │   ├── create.go
│   │   │   │   │   ├── get.go
│   │   │   │   │   └── list.go
│   │   │   │   └── handler_user/
│   │   │   │       ├── shop_login.go
│   │   │   │       ├── user_login.go
│   │   │   │       └── user_register.go
│   │   │   ├── infras/
│   │   │   │   └── client/
│   │   │   │       ├── init.go
│   │   │   │       ├── item.go
│   │   │   │       ├── order.go
│   │   │   │       └── user.go
│   │   │   ├── main.go
│   │   │   ├── model/
│   │   │   │   └── model.go
│   │   │   └── run.sh
│   │   ├── item/
│   │   │   ├── build.sh
│   │   │   ├── common/
│   │   │   │   ├── constant/
│   │   │   │   │   └── constant.go
│   │   │   │   ├── converter/
│   │   │   │   │   ├── dto_2_entity.go
│   │   │   │   │   └── entity_2_dto.go
│   │   │   │   ├── entity/
│   │   │   │   │   └── product_entity.go
│   │   │   │   └── po/
│   │   │   │       └── product_po.go
│   │   │   ├── domain/
│   │   │   │   ├── repository/
│   │   │   │   │   ├── product_2c_repository.go
│   │   │   │   │   ├── product_repository.go
│   │   │   │   │   ├── repository_registry.go
│   │   │   │   │   └── stock_repository.go
│   │   │   │   └── service/
│   │   │   │       ├── product_query_service.go
│   │   │   │       ├── product_state_service.go
│   │   │   │       ├── product_stock_service.go
│   │   │   │       └── product_update_service.go
│   │   │   ├── handler/
│   │   │   │   ├── add_handler.go
│   │   │   │   ├── decrease_stock_handler.go
│   │   │   │   ├── decrease_stock_revert_handler.go
│   │   │   │   ├── delete_handler.go
│   │   │   │   ├── edit_handler.go
│   │   │   │   ├── get_handler.go
│   │   │   │   ├── list_handler.go
│   │   │   │   ├── mget2c_handler.go
│   │   │   │   ├── offline_handler.go
│   │   │   │   ├── online_handler.go
│   │   │   │   └── search_handler.go
│   │   │   ├── handler.go
│   │   │   ├── infras/
│   │   │   │   ├── es/
│   │   │   │   │   └── client.go
│   │   │   │   ├── init.go
│   │   │   │   └── repository/
│   │   │   │       ├── converter/
│   │   │   │       │   ├── product_do_2_po.go
│   │   │   │       │   └── product_po_2_do.go
│   │   │   │       ├── differ/
│   │   │   │       │   └── po_diff.go
│   │   │   │       ├── init.go
│   │   │   │       ├── product_2c_repo_impl.go
│   │   │   │       ├── product_repo_impl.go
│   │   │   │       └── stock_repo_impl.go
│   │   │   ├── main.go
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   ├── order/
│   │   │   ├── build.sh
│   │   │   ├── common/
│   │   │   │   └── converter.go
│   │   │   ├── dal/
│   │   │   │   ├── client/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── item.go
│   │   │   │   │   └── user.go
│   │   │   │   └── db/
│   │   │   │       ├── init.go
│   │   │   │       └── order.go
│   │   │   ├── handler.go
│   │   │   ├── main.go
│   │   │   ├── module/
│   │   │   │   ├── order_query_module.go
│   │   │   │   └── order_update_module.go
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   └── user/
│   │       ├── build.sh
│   │       ├── handler.go
│   │       ├── infras/
│   │       │   ├── db/
│   │       │   │   ├── init.go
│   │       │   │   └── user.go
│   │       │   └── redis/
│   │       │       └── client.go
│   │       ├── main.go
│   │       ├── script/
│   │       │   └── bootstrap.sh
│   │       └── service/
│   │           └── user_service.go
│   ├── deploy/
│   │   ├── mysql/
│   │   │   └── init.sql
│   │   └── redis/
│   │       └── redis.conf
│   ├── docker-compose.yml
│   ├── docs/
│   │   ├── docs.go
│   │   ├── swagger.json
│   │   └── swagger.yaml
│   ├── go.mod
│   ├── go.sum
│   ├── idl/
│   │   ├── base.thrift
│   │   ├── item.thrift
│   │   ├── order.thrift
│   │   └── user.thrift
│   ├── kitex_gen/
│   │   ├── base/
│   │   │   ├── base.go
│   │   │   ├── k-base.go
│   │   │   └── k-consts.go
│   │   └── cwg/
│   │       └── bookshop/
│   │           ├── item/
│   │           │   ├── item.go
│   │           │   ├── itemservice/
│   │           │   │   ├── client.go
│   │           │   │   ├── invoker.go
│   │           │   │   ├── itemservice.go
│   │           │   │   └── server.go
│   │           │   ├── k-consts.go
│   │           │   └── k-item.go
│   │           ├── order/
│   │           │   ├── k-consts.go
│   │           │   ├── k-order.go
│   │           │   ├── order.go
│   │           │   └── orderservice/
│   │           │       ├── client.go
│   │           │       ├── invoker.go
│   │           │       ├── orderservice.go
│   │           │       └── server.go
│   │           └── user/
│   │               ├── k-consts.go
│   │               ├── k-user.go
│   │               ├── user.go
│   │               └── userservice/
│   │                   ├── client.go
│   │                   ├── invoker.go
│   │                   ├── server.go
│   │                   └── userservice.go
│   ├── licenses/
│   │   ├── LICENSE-copier.txt
│   │   ├── LICENSE-diff.txt
│   │   ├── LICENSE-elastic.txt
│   │   ├── LICENSE-gorm-mysql.txt
│   │   ├── LICENSE-gorm.txt
│   │   ├── LICENSE-redigo.txt
│   │   ├── LICENSE-snowflake.txt
│   │   └── LICENSE-thrift.txt
│   └── pkg/
│       ├── conf/
│       │   └── conf.go
│       ├── errno/
│       │   ├── errno.go
│       │   └── resp.go
│       └── utils/
│           ├── idgen.go
│           └── logutil.go
├── bookinfo/
│   ├── Makefile
│   ├── README.md
│   ├── README_CN.md
│   ├── build/
│   │   └── Dockerfile
│   ├── cmd/
│   │   ├── details/
│   │   │   └── cmd.go
│   │   ├── main.go
│   │   ├── productpage/
│   │   │   └── cmd.go
│   │   ├── ratings/
│   │   │   └── cmd.go
│   │   └── reviews/
│   │       └── cmd.go
│   ├── conf/
│   │   ├── details.yaml
│   │   ├── productpage.yaml
│   │   ├── ratings.yaml
│   │   └── reviews.yaml
│   ├── go.mod
│   ├── go.sum
│   ├── idl/
│   │   ├── base.thrift
│   │   ├── details.thrift
│   │   ├── productpage.thrift
│   │   ├── ratings.thrift
│   │   └── reviews.thrift
│   ├── internal/
│   │   ├── handler/
│   │   │   └── productpage/
│   │   │       └── product.go
│   │   ├── server/
│   │   │   ├── details/
│   │   │   │   ├── options.go
│   │   │   │   ├── server.go
│   │   │   │   ├── wire.go
│   │   │   │   └── wire_gen.go
│   │   │   ├── productpage/
│   │   │   │   ├── options.go
│   │   │   │   ├── server.go
│   │   │   │   ├── wire.go
│   │   │   │   └── wire_gen.go
│   │   │   ├── ratings/
│   │   │   │   ├── options.go
│   │   │   │   ├── server.go
│   │   │   │   ├── wire.go
│   │   │   │   └── wire_gen.go
│   │   │   └── reviews/
│   │   │       ├── options.go
│   │   │       ├── server.go
│   │   │       ├── wire.go
│   │   │       └── wire_gen.go
│   │   └── service/
│   │       ├── details/
│   │       │   └── service.go
│   │       ├── ratings/
│   │       │   └── service.go
│   │       └── reviews/
│   │           └── service.go
│   ├── kitex_gen/
│   │   ├── base/
│   │   │   ├── base.go
│   │   │   ├── k-base.go
│   │   │   └── k-consts.go
│   │   └── cwg/
│   │       └── bookinfo/
│   │           ├── details/
│   │           │   ├── details.go
│   │           │   ├── detailsservice/
│   │           │   │   ├── client.go
│   │           │   │   ├── detailsservice.go
│   │           │   │   ├── invoker.go
│   │           │   │   └── server.go
│   │           │   ├── k-consts.go
│   │           │   └── k-details.go
│   │           ├── product/
│   │           │   ├── k-consts.go
│   │           │   ├── k-productpage.go
│   │           │   ├── productpage.go
│   │           │   └── productpageservice/
│   │           │       ├── client.go
│   │           │       ├── invoker.go
│   │           │       ├── productpageservice.go
│   │           │       └── server.go
│   │           ├── ratings/
│   │           │   ├── k-consts.go
│   │           │   ├── k-ratings.go
│   │           │   ├── ratings.go
│   │           │   └── ratingservice/
│   │           │       ├── client.go
│   │           │       ├── invoker.go
│   │           │       ├── ratingservice.go
│   │           │       └── server.go
│   │           └── reviews/
│   │               ├── k-consts.go
│   │               ├── k-reviews.go
│   │               ├── reviews.go
│   │               └── reviewsservice/
│   │                   ├── client.go
│   │                   ├── invoker.go
│   │                   ├── reviewsservice.go
│   │                   └── server.go
│   ├── licenses/
│   │   ├── LICENSE-cobra.txt
│   │   ├── LICENSE-logrus.txt
│   │   ├── LICENSE-opentelemetry-go.txt
│   │   ├── LICENSE-pflag.txt
│   │   ├── LICENSE-testify.txt
│   │   ├── LICENSE-thrift.txt
│   │   ├── LICENSE-viper.txt
│   │   └── LICENSE-wire.txt
│   ├── manifest/
│   │   └── bookinfo/
│   │       ├── traffic/
│   │       │   ├── bookinfo-gateway.yaml
│   │       │   ├── canary.yaml
│   │       │   ├── destination-rule-all.yaml
│   │       │   ├── virtual-service-ratings-canary.yaml
│   │       │   ├── virtual-service-reviews-50-50.yaml
│   │       │   ├── virtual-service-reviews-80-20.yaml
│   │       │   ├── virtual-service-reviews-canary.yaml
│   │       │   ├── virtual-service-reviews-v1.yaml
│   │       │   └── virtual-service-reviews-v2.yaml
│   │       └── workloads/
│   │           ├── Chart.yaml
│   │           ├── charts/
│   │           │   ├── details/
│   │           │   │   ├── .helmignore
│   │           │   │   ├── Chart.yaml
│   │           │   │   ├── templates/
│   │           │   │   │   ├── NOTES.txt
│   │           │   │   │   ├── details.cm.yaml
│   │           │   │   │   ├── details.svc.yaml
│   │           │   │   │   └── details.yaml
│   │           │   │   └── values.yaml
│   │           │   ├── productpage/
│   │           │   │   ├── .helmignore
│   │           │   │   ├── Chart.yaml
│   │           │   │   ├── templates/
│   │           │   │   │   ├── NOTES.txt
│   │           │   │   │   ├── productpage.cm.yaml
│   │           │   │   │   ├── productpage.svc.yaml
│   │           │   │   │   └── productpage.yaml
│   │           │   │   └── values.yaml
│   │           │   ├── ratings/
│   │           │   │   ├── .helmignore
│   │           │   │   ├── Chart.yaml
│   │           │   │   ├── templates/
│   │           │   │   │   ├── NOTES.txt
│   │           │   │   │   ├── ratings-v1.yaml
│   │           │   │   │   ├── ratings-v2.yaml
│   │           │   │   │   ├── ratings.cm.yaml
│   │           │   │   │   └── ratings.svc.yaml
│   │           │   │   └── values.yaml
│   │           │   └── reviews/
│   │           │       ├── .helmignore
│   │           │       ├── Chart.yaml
│   │           │       ├── templates/
│   │           │       │   ├── NOTES.txt
│   │           │       │   ├── reviews-v1.yaml
│   │           │       │   ├── reviews-v2.yaml
│   │           │       │   ├── reviews-v3.yaml
│   │           │       │   ├── reviews.cm.yaml
│   │           │       │   └── reviews.svc.yaml
│   │           │       └── values.yaml
│   │           └── values.yaml
│   └── pkg/
│       ├── configparser/
│       │   ├── config.go
│       │   ├── parser.go
│       │   ├── provider_file.go
│       │   └── provider_flags.go
│       ├── constants/
│       │   ├── env.go
│       │   └── service.go
│       ├── injectors/
│       │   ├── provide_details.go
│       │   ├── provide_ratings.go
│       │   └── provide_reviews.go
│       ├── metadata/
│       │   └── propagator.go
│       ├── utils/
│       │   └── logutils/
│       │       └── level.go
│       └── version/
│           ├── var.go
│           └── version.go
├── check_branch_name.sh
├── easy_note/
│   ├── Makefile
│   ├── README.md
│   ├── api.md
│   ├── api_request/
│   │   ├── api_service/
│   │   │   ├── api_service.go
│   │   │   └── hertz_client.go
│   │   └── main.go
│   ├── cmd/
│   │   ├── api/
│   │   │   ├── .gitignore
│   │   │   ├── .hz
│   │   │   ├── Makefile
│   │   │   ├── build.sh
│   │   │   ├── hertz_handler/
│   │   │   │   ├── demoapi/
│   │   │   │   │   ├── api_service.go
│   │   │   │   │   └── handler.go
│   │   │   │   └── ping.go
│   │   │   ├── hertz_router/
│   │   │   │   ├── demoapi/
│   │   │   │   │   ├── api.go
│   │   │   │   │   └── middleware.go
│   │   │   │   └── register.go
│   │   │   ├── main.go
│   │   │   ├── mw/
│   │   │   │   └── jwt.go
│   │   │   ├── router.go
│   │   │   ├── router_gen.go
│   │   │   ├── rpc/
│   │   │   │   ├── init.go
│   │   │   │   ├── note.go
│   │   │   │   └── user.go
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   ├── note/
│   │   │   ├── Makefile
│   │   │   ├── build.sh
│   │   │   ├── dal/
│   │   │   │   ├── db/
│   │   │   │   │   ├── init.go
│   │   │   │   │   └── note.go
│   │   │   │   └── init.go
│   │   │   ├── handler.go
│   │   │   ├── main.go
│   │   │   ├── pack/
│   │   │   │   ├── note.go
│   │   │   │   └── resp.go
│   │   │   ├── rpc/
│   │   │   │   ├── init.go
│   │   │   │   └── user.go
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── service/
│   │   │       ├── create_note.go
│   │   │       ├── delete_note.go
│   │   │       ├── mget_note.go
│   │   │       ├── query_note.go
│   │   │       └── update_note.go
│   │   └── user/
│   │       ├── Makefile
│   │       ├── build.sh
│   │       ├── dal/
│   │       │   ├── db/
│   │       │   │   ├── init.go
│   │       │   │   └── user.go
│   │       │   └── init.go
│   │       ├── handler.go
│   │       ├── main.go
│   │       ├── pack/
│   │       │   ├── resp.go
│   │       │   └── user.go
│   │       ├── script/
│   │       │   └── bootstrap.sh
│   │       └── service/
│   │           ├── check_user.go
│   │           ├── create_user.go
│   │           └── mget_user.go
│   ├── docker-compose.yaml
│   ├── go.mod
│   ├── go.sum
│   ├── hertz_gen/
│   │   └── demoapi/
│   │       └── api.go
│   ├── idl/
│   │   ├── api.thrift
│   │   ├── note.thrift
│   │   └── user.thrift
│   ├── kitex_gen/
│   │   ├── demonote/
│   │   │   ├── k-consts.go
│   │   │   ├── k-note.go
│   │   │   ├── note.go
│   │   │   ├── note_validator.go
│   │   │   └── noteservice/
│   │   │       ├── client.go
│   │   │       ├── invoker.go
│   │   │       ├── noteservice.go
│   │   │       └── server.go
│   │   └── demouser/
│   │       ├── k-consts.go
│   │       ├── k-user.go
│   │       ├── user.go
│   │       ├── user_validator.go
│   │       └── userservice/
│   │           ├── client.go
│   │           ├── invoker.go
│   │           ├── server.go
│   │           └── userservice.go
│   ├── licenses/
│   │   ├── LICENSE-gorm-mysql.txt
│   │   ├── LICENSE-gorm.txt
│   │   ├── LICENSE-opentelemetry-go.txt
│   │   └── LICENSE-thrift.txt
│   └── pkg/
│       ├── configs/
│       │   ├── otel/
│       │   │   └── otel-collector-config.yaml
│       │   └── sql/
│       │       └── init.sql
│       ├── consts/
│       │   └── consts.go
│       ├── errno/
│       │   └── errno.go
│       └── mw/
│           ├── client.go
│           ├── common.go
│           └── server.go
├── gomall/
│   ├── .gitignore
│   ├── Makefile
│   ├── README.md
│   ├── README_cn.md
│   ├── app/
│   │   ├── cart/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   ├── cart.go
│   │   │   │   │   └── cart_test.go
│   │   │   │   └── service/
│   │   │   │       ├── add_item.go
│   │   │   │       ├── add_item_test.go
│   │   │   │       ├── empty_cart.go
│   │   │   │       ├── empty_cart_test.go
│   │   │   │       ├── get_cart.go
│   │   │   │       └── get_cart_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── infra/
│   │   │   │   └── rpc/
│   │   │   │       └── client.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   ├── bootstrap.sh
│   │   │   │   └── cart.sql
│   │   │   └── utils/
│   │   │       ├── constant.go
│   │   │       └── errors.go
│   │   ├── checkout/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   └── service/
│   │   │   │       ├── checkout.go
│   │   │   │       └── checkout_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── infra/
│   │   │   │   ├── mq/
│   │   │   │   │   └── nats.go
│   │   │   │   └── rpc/
│   │   │   │       └── client.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── utils/
│   │   │       └── errors.go
│   │   ├── email/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── consumer/
│   │   │   │   │   ├── consumer.go
│   │   │   │   │   └── email/
│   │   │   │   │       ├── email.go
│   │   │   │   │       └── email_test.go
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   └── service/
│   │   │   │       ├── send.go
│   │   │   │       └── send_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── infra/
│   │   │   │   ├── mq/
│   │   │   │   │   └── nats.go
│   │   │   │   └── notify/
│   │   │   │       └── email.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   ├── frontend/
│   │   │   ├── .air.toml
│   │   │   ├── .gitignore
│   │   │   ├── .hz
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── handler/
│   │   │   │   │   ├── about/
│   │   │   │   │   │   ├── about_service.go
│   │   │   │   │   │   └── about_service_test.go
│   │   │   │   │   ├── auth/
│   │   │   │   │   │   ├── auth_service.go
│   │   │   │   │   │   └── auth_service_test.go
│   │   │   │   │   ├── cart/
│   │   │   │   │   │   ├── cart_service.go
│   │   │   │   │   │   └── cart_service_test.go
│   │   │   │   │   ├── category/
│   │   │   │   │   │   ├── category_service.go
│   │   │   │   │   │   └── category_service_test.go
│   │   │   │   │   ├── checkout/
│   │   │   │   │   │   ├── checkout_service.go
│   │   │   │   │   │   └── checkout_service_test.go
│   │   │   │   │   ├── home/
│   │   │   │   │   │   ├── home_service.go
│   │   │   │   │   │   └── home_service_test.go
│   │   │   │   │   ├── order/
│   │   │   │   │   │   ├── order_service.go
│   │   │   │   │   │   └── order_service_test.go
│   │   │   │   │   └── product/
│   │   │   │   │       ├── product_service.go
│   │   │   │   │       └── product_service_test.go
│   │   │   │   ├── router/
│   │   │   │   │   ├── about/
│   │   │   │   │   │   ├── about.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── auth/
│   │   │   │   │   │   ├── auth_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── cart/
│   │   │   │   │   │   ├── cart_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── category/
│   │   │   │   │   │   ├── category_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── checkout/
│   │   │   │   │   │   ├── checkout_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── home/
│   │   │   │   │   │   ├── home.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── order/
│   │   │   │   │   │   ├── middleware.go
│   │   │   │   │   │   └── order_page.go
│   │   │   │   │   ├── product/
│   │   │   │   │   │   ├── middleware.go
│   │   │   │   │   │   └── product_page.go
│   │   │   │   │   └── register.go
│   │   │   │   ├── service/
│   │   │   │   │   ├── about.go
│   │   │   │   │   ├── add_cart_item.go
│   │   │   │   │   ├── category.go
│   │   │   │   │   ├── checkout.go
│   │   │   │   │   ├── checkout_result.go
│   │   │   │   │   ├── checkout_waiting.go
│   │   │   │   │   ├── get_cart.go
│   │   │   │   │   ├── get_product.go
│   │   │   │   │   ├── home.go
│   │   │   │   │   ├── login.go
│   │   │   │   │   ├── logout.go
│   │   │   │   │   ├── order_list.go
│   │   │   │   │   ├── register.go
│   │   │   │   │   └── search_producs.go
│   │   │   │   └── utils/
│   │   │   │       └── resp.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── hertz_gen/
│   │   │   │   ├── api/
│   │   │   │   │   └── api.pb.go
│   │   │   │   └── frontend/
│   │   │   │       ├── about/
│   │   │   │       │   └── about.pb.go
│   │   │   │       ├── auth/
│   │   │   │       │   └── auth_page.pb.go
│   │   │   │       ├── cart/
│   │   │   │       │   └── cart_page.pb.go
│   │   │   │       ├── category/
│   │   │   │       │   └── category_page.pb.go
│   │   │   │       ├── checkout/
│   │   │   │       │   └── checkout_page.pb.go
│   │   │   │       ├── common/
│   │   │   │       │   └── common.pb.go
│   │   │   │       ├── home/
│   │   │   │       │   └── home.pb.go
│   │   │   │       ├── order/
│   │   │   │       │   └── order_page.pb.go
│   │   │   │       └── product/
│   │   │   │           └── product_page.pb.go
│   │   │   ├── infra/
│   │   │   │   ├── mtl/
│   │   │   │   │   ├── log.go
│   │   │   │   │   ├── metric.go
│   │   │   │   │   ├── mtl.go
│   │   │   │   │   └── tracing.go
│   │   │   │   └── rpc/
│   │   │   │       └── client.go
│   │   │   ├── main.go
│   │   │   ├── middleware/
│   │   │   │   ├── auth.go
│   │   │   │   └── middleware.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   ├── template/
│   │   │   │   ├── about.tmpl
│   │   │   │   ├── cart-num.tmpl
│   │   │   │   ├── cart.tmpl
│   │   │   │   ├── category.tmpl
│   │   │   │   ├── checkout.tmpl
│   │   │   │   ├── error.tmpl
│   │   │   │   ├── footer.tmpl
│   │   │   │   ├── header.tmpl
│   │   │   │   ├── home.tmpl
│   │   │   │   ├── order.tmpl
│   │   │   │   ├── product.tmpl
│   │   │   │   ├── result.tmpl
│   │   │   │   ├── search.tmpl
│   │   │   │   ├── sign-in.tmpl
│   │   │   │   ├── sign-up.tmpl
│   │   │   │   ├── utils.tmpl
│   │   │   │   └── waiting.tmpl
│   │   │   ├── types/
│   │   │   │   └── order.go
│   │   │   └── utils/
│   │   │       ├── constant.go
│   │   │       ├── errors.go
│   │   │       ├── function.go
│   │   │       ├── response.go
│   │   │       ├── safe.go
│   │   │       └── strings.go
│   │   ├── order/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   ├── order.go
│   │   │   │   │   └── order_item.go
│   │   │   │   └── service/
│   │   │   │       ├── list_order.go
│   │   │   │       ├── list_order_test.go
│   │   │   │       ├── mark_order_paid.go
│   │   │   │       ├── mark_order_paid_test.go
│   │   │   │       ├── place_order.go
│   │   │   │       └── place_order_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── test/
│   │   │       └── rpc_test.go
│   │   ├── payment/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   └── payment.go
│   │   │   │   └── service/
│   │   │   │       ├── charge.go
│   │   │   │       └── charge_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── middleware/
│   │   │   │   └── mw.go
│   │   │   ├── payment.sql
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── utils/
│   │   │       └── errors.go
│   │   ├── product/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   ├── category.go
│   │   │   │   │   └── product.go
│   │   │   │   └── service/
│   │   │   │       ├── get_product.go
│   │   │   │       ├── get_product_test.go
│   │   │   │       ├── list_products.go
│   │   │   │       ├── list_products_test.go
│   │   │   │       ├── search_products.go
│   │   │   │       └── search_products_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   ├── bootstrap.sh
│   │   │   │   └── product.sql
│   │   │   └── utils/
│   │   │       └── constant.go
│   │   └── user/
│   │       ├── .gitignore
│   │       ├── biz/
│   │       │   ├── dal/
│   │       │   │   ├── init.go
│   │       │   │   ├── mysql/
│   │       │   │   │   └── init.go
│   │       │   │   └── redis/
│   │       │   │       └── init.go
│   │       │   ├── model/
│   │       │   │   ├── base.go
│   │       │   │   └── user.go
│   │       │   └── service/
│   │       │       ├── login.go
│   │       │       ├── login_test.go
│   │       │       ├── register.go
│   │       │       └── register_test.go
│   │       ├── build.sh
│   │       ├── conf/
│   │       │   ├── conf.go
│   │       │   ├── dev/
│   │       │   │   └── conf.yaml
│   │       │   ├── online/
│   │       │   │   └── conf.yaml
│   │       │   └── test/
│   │       │       └── conf.yaml
│   │       ├── docker-compose.yaml
│   │       ├── go.mod
│   │       ├── go.sum
│   │       ├── handler.go
│   │       ├── kitex_info.yaml
│   │       ├── main.go
│   │       ├── readme.md
│   │       └── script/
│   │           └── bootstrap.sh
│   ├── common/
│   │   ├── clientsuite/
│   │   │   └── client.go
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── mtl/
│   │   │   ├── log.go
│   │   │   ├── metrics.go
│   │   │   └── tracing.go
│   │   ├── serversuite/
│   │   │   └── server.go
│   │   └── utils/
│   │       ├── ip.go
│   │       └── kitex.go
│   ├── db/
│   │   └── sql/
│   │       └── ini/
│   │           ├── README.md
│   │           └── databases.sql
│   ├── deploy/
│   │   ├── config/
│   │   │   ├── loki.yml
│   │   │   ├── prometheus.yml
│   │   │   └── promtail.yml
│   │   └── grafana.json
│   ├── docker-compose.yaml
│   ├── go.work
│   ├── gomall.code-workspace
│   ├── idl/
│   │   ├── api.proto
│   │   ├── cart.proto
│   │   ├── checkout.proto
│   │   ├── email.proto
│   │   ├── frontend/
│   │   │   ├── about.proto
│   │   │   ├── auth_page.proto
│   │   │   ├── cart_page.proto
│   │   │   ├── category_page.proto
│   │   │   ├── checkout_page.proto
│   │   │   ├── common.proto
│   │   │   ├── home.proto
│   │   │   ├── order_page.proto
│   │   │   └── product_page.proto
│   │   ├── order.proto
│   │   ├── payment.proto
│   │   ├── product.proto
│   │   └── user.proto
│   ├── rpc_gen/
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── kitex_gen/
│   │   │   ├── cart/
│   │   │   │   ├── cart.pb.fast.go
│   │   │   │   ├── cart.pb.go
│   │   │   │   └── cartservice/
│   │   │   │       ├── cartservice.go
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       └── server.go
│   │   │   ├── checkout/
│   │   │   │   ├── checkout.pb.fast.go
│   │   │   │   ├── checkout.pb.go
│   │   │   │   └── checkoutservice/
│   │   │   │       ├── checkoutservice.go
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       └── server.go
│   │   │   ├── email/
│   │   │   │   ├── email.pb.fast.go
│   │   │   │   ├── email.pb.go
│   │   │   │   └── emailservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── emailservice.go
│   │   │   │       ├── invoker.go
│   │   │   │       └── server.go
│   │   │   ├── order/
│   │   │   │   ├── order.pb.fast.go
│   │   │   │   ├── order.pb.go
│   │   │   │   └── orderservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       ├── orderservice.go
│   │   │   │       └── server.go
│   │   │   ├── payment/
│   │   │   │   ├── payment.pb.fast.go
│   │   │   │   ├── payment.pb.go
│   │   │   │   └── paymentservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       ├── paymentservice.go
│   │   │   │       └── server.go
│   │   │   ├── product/
│   │   │   │   ├── product.pb.fast.go
│   │   │   │   ├── product.pb.go
│   │   │   │   └── productcatalogservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       ├── productcatalogservice.go
│   │   │   │       └── server.go
│   │   │   └── user/
│   │   │       ├── user.pb.fast.go
│   │   │       ├── user.pb.go
│   │   │       └── userservice/
│   │   │           ├── client.go
│   │   │           ├── invoker.go
│   │   │           ├── server.go
│   │   │           └── userservice.go
│   │   └── rpc/
│   │       ├── cart/
│   │       │   ├── cart_client.go
│   │       │   ├── cart_default.go
│   │       │   └── cart_init.go
│   │       ├── checkout/
│   │       │   ├── checkout_client.go
│   │       │   ├── checkout_default.go
│   │       │   └── checkout_init.go
│   │       ├── email/
│   │       │   ├── email_client.go
│   │       │   ├── email_default.go
│   │       │   └── email_init.go
│   │       ├── order/
│   │       │   ├── order_client.go
│   │       │   ├── order_default.go
│   │       │   └── order_init.go
│   │       ├── payment/
│   │       │   ├── payment_client.go
│   │       │   ├── payment_default.go
│   │       │   └── payment_init.go
│   │       ├── product/
│   │       │   ├── product_client.go
│   │       │   ├── product_default.go
│   │       │   └── product_init.go
│   │       └── user/
│   │           ├── user_client.go
│   │           ├── user_default.go
│   │           └── user_init.go
│   ├── scripts/
│   │   ├── copy_env.sh
│   │   ├── fix.sh
│   │   ├── gen.sh
│   │   ├── list_app.sh
│   │   ├── run.sh
│   │   ├── run_all.sh
│   │   ├── tidy.sh
│   │   └── vet.sh
│   └── tutorial/
│       ├── README.md
│       ├── ch01/
│       │   ├── go.work
│       │   └── hello_world/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       └── main.go
│       ├── ch02/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch03/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   └── client/
│       │   │   │   │       └── client.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch04/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   └── client/
│       │   │   │   │       └── client.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch05/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch06/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch07/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch08/
│       │   ├── Makefile
│       │   ├── app/
│       │   │   └── frontend/
│       │   │       ├── .gitignore
│       │   │       ├── .hz
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── handler/
│       │   │       │   │   └── home/
│       │   │       │   │       ├── home_service.go
│       │   │       │   │       └── home_service_test.go
│       │   │       │   ├── router/
│       │   │       │   │   ├── home/
│       │   │       │   │   │   ├── home.go
│       │   │       │   │   │   └── middleware.go
│       │   │       │   │   └── register.go
│       │   │       │   ├── service/
│       │   │       │   │   └── home.go
│       │   │       │   └── utils/
│       │   │       │       └── resp.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── hertz_gen/
│       │   │       │   ├── api/
│       │   │       │   │   └── api.pb.go
│       │   │       │   └── frontend/
│       │   │       │       └── home/
│       │   │       │           └── home.pb.go
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       ├── script/
│       │   │       │   └── bootstrap.sh
│       │   │       └── template/
│       │   │           ├── footer.tmpl
│       │   │           ├── header.tmpl
│       │   │           └── home.tmpl
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── api.proto
│       │       ├── echo.proto
│       │       ├── echo.thrift
│       │       └── frontend/
│       │           └── home.proto
│       ├── ch09/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   └── home/
│       │   │   │   │   │       ├── home_service.go
│       │   │   │   │   │       └── home_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       └── home/
│       │   │   │   │           └── home.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   └── sign-up.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   └── home.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch10/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   └── sign-up.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch11/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── cart.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   └── sign-up.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch12/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── cart.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch13/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── cart.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── rpc/
│       │   │   │   │   └── client.go
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   ├── order_page.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── order.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── order/
│       │       │   │   ├── order.pb.fast.go
│       │       │   │   ├── order.pb.go
│       │       │   │   └── orderservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── orderservice.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── order/
│       │           │   ├── order_client.go
│       │           │   ├── order_default.go
│       │           │   └── order_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch14/
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── cart.go
│       │   │   │   │   │   └── cart_test.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── cart.sql
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── email/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── consumer/
│       │   │   │   │   │   ├── consumer.go
│       │   │   │   │   │   └── email/
│       │   │   │   │   │       ├── email.go
│       │   │   │   │   │       └── email_test.go
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── send.go
│       │   │   │   │       └── send_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── notify/
│       │   │   │   │       └── email.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   ├── utils.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       ├── function.go
│       │   │   │       ├── response.go
│       │   │   │       ├── safe.go
│       │   │   │       └── strings.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   └── mw.go
│       │   │   │   ├── payment.sql
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   ├── base.go
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── email.proto
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   ├── order_page.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── order.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── email/
│       │       │   │   ├── email.pb.fast.go
│       │       │   │   ├── email.pb.go
│       │       │   │   └── emailservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── emailservice.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── order/
│       │       │   │   ├── order.pb.fast.go
│       │       │   │   ├── order.pb.go
│       │       │   │   └── orderservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── orderservice.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── email/
│       │           │   ├── email_client.go
│       │           │   ├── email_default.go
│       │           │   └── email_init.go
│       │           ├── order/
│       │           │   ├── order_client.go
│       │           │   ├── order_default.go
│       │           │   └── order_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch15/
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── cart.go
│       │   │   │   │   │   └── cart_test.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── cart.sql
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── email/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── consumer/
│       │   │   │   │   │   ├── consumer.go
│       │   │   │   │   │   └── email/
│       │   │   │   │   │       ├── email.go
│       │   │   │   │   │       └── email_test.go
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── send.go
│       │   │   │   │       └── send_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── notify/
│       │   │   │   │       └── email.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mtl/
│       │   │   │   │   │   ├── log.go
│       │   │   │   │   │   ├── metric.go
│       │   │   │   │   │   ├── mtl.go
│       │   │   │   │   │   └── tracing.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   ├── utils.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       ├── function.go
│       │   │   │       ├── response.go
│       │   │   │       ├── safe.go
│       │   │   │       └── strings.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   └── mw.go
│       │   │   │   ├── payment.sql
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   ├── base.go
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── common/
│       │   │   ├── clientsuite/
│       │   │   │   └── client.go
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   ├── mtl/
│       │   │   │   ├── log.go
│       │   │   │   ├── metrics.go
│       │   │   │   └── tracing.go
│       │   │   ├── serversuite/
│       │   │   │   └── server.go
│       │   │   └── utils/
│       │   │       └── kitex.go
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── deploy/
│       │   │   └── config/
│       │   │       └── prometheus.yml
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── email.proto
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   ├── order_page.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── order.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── email/
│       │       │   │   ├── email.pb.fast.go
│       │       │   │   ├── email.pb.go
│       │       │   │   └── emailservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── emailservice.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── order/
│       │       │   │   ├── order.pb.fast.go
│       │       │   │   ├── order.pb.go
│       │       │   │   └── orderservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── orderservice.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── email/
│       │           │   ├── email_client.go
│       │           │   ├── email_default.go
│       │           │   └── email_init.go
│       │           ├── order/
│       │           │   ├── order_client.go
│       │           │   ├── order_default.go
│       │           │   └── order_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch16/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── cart.go
│       │   │   │   │   │   └── cart_test.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── cart.sql
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── email/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── consumer/
│       │   │   │   │   │   ├── consumer.go
│       │   │   │   │   │   └── email/
│       │   │   │   │   │       ├── email.go
│       │   │   │   │   │       └── email_test.go
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── send.go
│       │   │   │   │       └── send_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── notify/
│       │   │   │   │       └── email.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mtl/
│       │   │   │   │   │   ├── log.go
│       │   │   │   │   │   ├── metric.go
│       │   │   │   │   │   ├── mtl.go
│       │   │   │   │   │   └── tracing.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   ├── utils.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       ├── function.go
│       │   │   │       ├── response.go
│       │   │   │       ├── safe.go
│       │   │   │       └── strings.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Kitex version:**

Please provide the version of Kitex you are using.

**Environment:**

The output of `go env`.

**Additional context**

Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
#### What type of PR is this?
<!--
Add one of the following kinds:

build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
docs: Documentation only changes
feat: A new feature
optimize: A new optimization
fix: A bug fix
perf: A code change that improves performance
refactor: A code change that neither fixes a bug nor adds a feature
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
test: Adding missing tests or correcting existing tests
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
-->

#### What this PR does / why we need it (en: English/zh: Chinese):
<!--
The description will be attached in Release Notes, 
so please describe it from user-oriented.
-->
en: 
zh:

#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Eg: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->


================================================
FILE: .github/workflows/pr-check.yml
================================================
name: Pull Request Check

on: [pull_request]

permissions:
  contents: read
  pull-requests: read

env:
  GO_VERSION: 1.23
  GOLANGCI_LINT_VERSION: latest

jobs:
  compliant:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Check License Header
        uses: apache/skywalking-eyes/header@v0.4.0

      - name: typos-action
        uses: crate-ci/typos@master

  resolve-modules:
    name: resolve module
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v4

      - id: set-matrix
        run: ./hack/resolve-modules.sh

  lint:
    name: lint module
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    needs: resolve-modules
    strategy:
      matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version: ${{ env.GO_VERSION }}
      - name: Lint
        uses: golangci/golangci-lint-action@v8
        with:
          version: ${{ env.GOLANGCI_LINT_VERSION }}
          working-directory: ${{ matrix.workdir }}
          args: --config=${{ github.workspace }}/.golangci.yml
          only-new-issues: true


================================================
FILE: .github/workflows/tests.yml
================================================
name: Tests

on: [push, pull_request]

jobs:
  ut:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: 1.23

      - uses: actions/cache@v3
        with:
          path: ~/go/pkg/mod
          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go-

      - name: Unit Test
        run: make test


================================================
FILE: .gitignore
================================================
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# IDE config
.vscode
.idea

*/vendor
*/bin
*/log

================================================
FILE: .golangci.yml
================================================
version: "2"
run:
  timeout: "30m"
linters:
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    paths:
      - open-payment-platform/internal/payment/infrastructure/ent
      - third_party$
      - builtin$
      - examples$
formatters:
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
  settings:
    gofumpt:
      extra-rules: true


================================================
FILE: .licenserc.yaml
================================================
header:
  license:
    spdx-id: Apache-2.0
    copyright-owner: CloudWeGo Authors

  paths:
    - "**/*.go"
    - "**/*.s"

  paths-ignore:
    - bookinfo/kitex_gen/**
    - bookinfo/internal/server/**/wire_gen.go
    - open-payment-platform/kitex_gen/**
    - open-payment-platform/cmd/**/wire_gen.go
    - open-payment-platform/internal/**/infrastructure/ent/**
    - easy_note/kitex_gen/**
    - easy_note/cmd/api/biz/model/**
    - easy_note/cmd/api/biz/router/**
    - easy_note/cmd/api/router_gen.go
    - book-shop/kitex_gen/**
    - book-shop/docs/**
    - gomall/app/frontend/hertz_gen/**
    - gomall/rpc_gen/**
    - gomall/tutorial/**

  comment: on-failure



================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
  advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
  address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
conduct@cloudwego.io.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior,  harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.


================================================
FILE: CONTRIBUTING.md
================================================
# How to Contribute

## Your First Pull Request
We use github for our codebase. You can start by reading [How To Pull Request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).

## Branch Organization
We use [git-flow](https://nvie.com/posts/a-successful-git-branching-model/) as our branch organization, as known as [FDD](https://en.wikipedia.org/wiki/Feature-driven_development)

## Bugs
### 1. How to Find Known Issues
We are using [Github Issues](https://github.com/cloudwego/kitex/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn’t already exist.

### 2. Reporting New Issues
Providing a reduced test code is a recommended way for reporting issues. Then can placed in:
- Just in issues
- [Golang Playground](https://play.golang.org/)

### 3. Security Bugs
Please do not report the safe disclosure of bugs to public issues. Contact us by [Support Email](mailto:conduct@cloudwego.io)

## How to Get in Touch
- [Email](mailto:conduct@cloudwego.io)

## Submit a Pull Request
Before you submit your Pull Request (PR) consider the following guidelines:
1. Search [GitHub](https://github.com/cloudwego/kitex/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate existing efforts.
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design upfront helps to ensure that we're ready to accept your work.
3. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the cloudwego/kitex repo.
4. In your forked repository, make your changes in a new git branch:
    ```
    git checkout -b my-fix-branch develop
    ```
5. Create your patch, including appropriate test cases.
6. Follow our [Style Guides](#code-style-guides).
7. Commit your changes using a descriptive commit message that follows [AngularJS Git Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit).
   Adherence to these conventions is necessary because release notes are automatically generated from these messages.
8. Push your branch to GitHub:
    ```
    git push origin my-fix-branch
    ```
9. In GitHub, send a pull request to `kitex:develop`

## Contribution Prerequisites
- Our development environment keeps up with [Go Official](https://golang.org/project/).
- You need fully checking with lint tools before submit your pull request. [gofmt](https://golang.org/pkg/cmd/gofmt/) and [golangci-lint](https://github.com/golangci/golangci-lint)
- You are familiar with [Github](https://github.com)
- Maybe you need familiar with [Actions](https://github.com/features/actions)(our default workflow tool).

## Code Style Guides
Also see [Pingcap General advice](https://pingcap.github.io/style-guide/general.html).

Good resources:
- [Effective Go](https://golang.org/doc/effective_go)
- [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md)


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: Makefile
================================================
TOOLS_SHELL="./hack/tools.sh"

.PHONY: test
test:
	@${TOOLS_SHELL} test
	@echo "go test finished"



.PHONY: vet
vet:
	@${TOOLS_SHELL} vet
	@echo "vet check finished"

================================================
FILE: README.md
================================================
# CloudWeGo Demo for Business

This repo contains CloudWeGo demos with business logic, providing valuable references for enterprise user using in production.

Each demo should/may contain multiple CloudWeGo subprojects, e.g. Kitex & Hertz, and demonstrate an individual business scenario.

## Demo List

### 1. Bookinfo

#### Description
##### What is it about and what problem does it solve?
- How to use kitex proxyless in istio?
- How to implement full-process traffic lane using CloudWeGo?

##### What is the business scenario?
Rewrite **[Bookinfo](https://istio.io/latest/docs/examples/bookinfo/)** project using `hertz`, `kitex`, same as the **[Bookinfo](https://istio.io/latest/docs/examples/bookinfo/)**

> The application displays information about a book, similar to a single catalog entry of an online book store. Displayed on the page is a description of the book, book details (ISBN, number of pages, and so on), and a few book reviews.

The Bookinfo application is broken into four separate microservices:

- **productpage**. The productpage microservice calls the details and reviews **microservices** to populate the page.
- **details**. The details microservice contains book information.
- **reviews**. The reviews microservice contains book reviews. It also calls the ratings microservice.
- **ratings**. The ratings microservice contains book ranking information that accompanies a book review.

##### What are the core technologies/projects used?

- [x] Use `istiod` as xDS server for CRD configuration and distribution
- [x] Use `wire` for dependency injection
- [x] Use `opentelemetry` for tracing
- [x] Implement proxyless `flow lane` with [`Kitex-xds`](https://github.com/kitex-contrib/xds) and `opentelemetry baggage`
- [x] Implement a bookinfo ui using `arco-design` react

##### Which CloudWeGo subprojects are used? List all technologies used.
- [Kitex](https://github.com/cloudwego/kitex)
- [Hertz](https://github.com/cloudwego/hertz)
- [kitex-xds](https://github.com/kitex-contrib/xds)
- [kitex-opentelemetry](https://github.com/kitex-contrib/obs-opentelemetry)
- [hertz-opentelemetry](https://github.com/hertz-contrib/obs-opentelemetry)

##### Detailed documentation
[bookinfo](./bookinfo/README.md)

#### Contributors & Maintainers
[@CoderPoet](https://github.com/CoderPoet)


### 2. Open Payment Platform

#### Description
##### What is it about and what problem does it solve?
- How to use kitex generic call as the http gateway?
- How to implement Clean Structure of `Go` using kitex?

##### What is the business scenario?
> The application demonstrates the usage of kitex generic call.

- We build the `generic call` client for each backend server by traversing IDL in Hertz.
- Hertz will accept the requests with the query path of prefix `/gateway` .
- `Gateway` handler will process these requests and route them to backend server by `generic call` client.
- `payment` server is just a sample server using kitex.This service design pkg with `Clean Structure`.

##### What are the core technologies/projects used?

- [x] Use `Hertz` as Gateway.
- [x] Use `Kitex` generic call client route requests.
- [x] Use `Kitex` as RPC framework to build micro-services.
- [x] Use `Clean Architecture` for design pkg and code layout.
- [x] Use `ent` entity framework for implementing repository.
- [x] Use `wire` for dependency injection
- [x] Use `Nacos` as service registry.
- [x] Use `MySQL` as RDBMS.

##### Which CloudWeGo subprojects are used? List all technologies used.
- [Kitex](https://github.com/cloudwego/kitex)
- [Hertz](https://github.com/cloudwego/hertz)
- kitex-layout(coming soon)

##### Detailed documentation
[Open Payment Platform](./open-payment-platform/README.md)

#### Contributors & Maintainers
[@baiyutang](https://github.com/baiyutang)


### 3. Easy Note

#### Description
##### What is it about and what problem does it solve?
- How to get started with Hertz and Kitex collaboration?
- How to structure projects when using Hertz and Kitex?

##### What is the business scenario?
Migrate **[easy_note](https://github.com/cloudwego/kitex-examples/tree/main/bizdemo/easy_note)** and optimize the project.

> The application shows a note service that allows users to create, delete, update, and query notes.

The easy_note application is divided into three microservices:

- **demoapi** is an HTTP service that handles HTTP requests and calls other services via RPC.
- **demouser** is an RPC service that handles user related operations.
- **demonote** is an RPC service that handles note related operations and calls demouser service via RPC.

##### What are the core technologies/projects used?

- [x] Use `hz` and `kitex` to generate code
- [x] Use Hertz `requestid`, `jwt`, `pprof`, `gzip` middlewares
- [x] Use `go-tagexpr` and `thrift-gen-validator` for validating HTTP and RPC request
- [x] Use `obs-opentelemetry` for tracing
- [x] Use `etcd` as service registry.
- [x] Use `GORM` for implementing repository.
- [x] Use `MySQL` as RDBMS.

##### Which CloudWeGo subprojects are used? List all technologies used.
- [Hertz](https://github.com/cloudwego/hertz)
  - [obs-opentelemetry](https://github.com/hertz-contrib/obs-opentelemetry)
  - [requestid](https://github.com/hertz-contrib/requestid)
  - [jwt](https://github.com/hertz-contrib/jwt)
  - [pprof](https://github.com/hertz-contrib/pprof)
  - [gzip](https://github.com/hertz-contrib/gzip)
- [Kitex](https://github.com/cloudwego/kitex)
  - [obs-opentelemetry](https://github.com/kitex-contrib/obs-opentelemetry)
  - [registry-etcd](https://github.com/kitex-contrib/registry-etcd)
- [thrift-gen-validator](https://github.com/cloudwego/thrift-gen-validator)

##### Detailed documentation
[easy_note](./easy_note/README.md)

#### Contributors & Maintainers
- [@justlorain](https://github.com/justlorain)
- [@li-jin-gou](https://github.com/li-jin-gou)

### 4. Book Shop

#### Description
##### What is it about and what problem does it solve?
- How to integrate middlewares(such as `ElasticSearch`, `Redis`...) in Kitex project?
- How to layer code in projects of different complexity using Hertz and Kitex?

##### What is the business scenario?
> The application shows an e-commerce system that includes merchants managing items, consumers managing personal accounts and placing orders to buy items.

The book-shop application is divided into four microservices:

- **facade** is an HTTP service that handles HTTP requests and calls other services via RPC.
- **user** is an RPC service that handles user managements.
- **item** is an RPC service that handles item managements.
- **order** is an RPC service that handles order managements.

##### What are the core technologies/projects used?

- [x] Use `Hertz` as Gateway.
- [x] Use `Kitex` as RPC framework to build microservices.
- [x] Use Hertz `swagger`, `jwt`, `pprof`, `gzip` middlewares.
- [x] Use `ETCD` as service registry.
- [x] Use `MySQL` as RDBMS.
- [x] Use `Redis` as cache.
- [x] Use `ElasticSearch` as search-engine.

##### Which CloudWeGo subprojects are used? List all technologies used.

- [Hertz](https://github.com/cloudwego/hertz)
  - [swagger](http://github.com/hertz-contrib/swagger)
  - [jwt](http://github.com/hertz-contrib/jwt)
  - [pprof](https://github.com/hertz-contrib/pprof)
  - [gzip](https://github.com/hertz-contrib/gzip)
- [Kitex](https://github.com/cloudwego/kitex)
  - [registry-etcd](https://github.com/kitex-contrib/registry-etcd)
- [sonic](https://github.com/bytedance/sonic)

##### Detailed documentation
[Book Shop](./book-shop/README.md)

#### Contributors & Maintainers
[@bodhisatan](https://github.com/bodhisatan)

### 5. [FreeCar](https://github.com/CyanAsterisk/FreeCar)

#### Description
##### What is it about and what problem does it solve?
- How to use the idea of domain-driven development to develop in Kitex?
- How to develop Hertz and Kitex through RPC + AGW mode?

##### What is the business scenario?
>Time-sharing car rental system kit in the cloud-native era.

The FreeCar application is divided into six microservices:

- **api** is an HTTP service that handles HTTP requests and calls other services via RPC.
- **user** is an RPC service that handles user related operations.
- **profile** is an RPC service that handles profile related operations.
- **blob** is an RPC service that handles blob related operations.
- **car** is an RPC service that handles car related operations.
- **trip** is an RPC service that handles trip related operations.

##### What are the core technologies/projects used?

- [x] Use `hz` and `kitex` to generate code
- [x] Use Hertz `paseto`, `cors`, `gzip`, `http2`, `limiter`, `opensergo`, `pprof`, `websocket` middlewares
- [x] Use `obs-opentelemetry` for tracing
- [x] Use `consul` as service registry and config center.
- [x] Use `GORM` for implementing repository.
- [x] Use `MySQL` as RDBMS.
- [x] Use `MongoDB` as DOCDB.
- [x] Use `Redis` as cache.
- [x] Use `MinIO` as object storage center.
- [x] Use `RabbitMQ` as MQ.
- [x] Implement a [FreeCar-Admin](https://github.com/CyanAsterisk/FreeCar-Admin) using `arco-design` react.
- [x] Implement a [FreeCar-MP](https://github.com/CyanAsterisk/FreeCar-MP) using WeChat applet.

##### Which CloudWeGo subprojects are used? List all technologies used.
- [Hertz](https://github.com/cloudwego/hertz)
  - [obs-opentelemetry](https://github.com/hertz-contrib/obs-opentelemetry)
  - [registry](https://github.com/hertz-contrib/registry)
  - [paseto](https://github.com/hertz-contrib/paseto)
  - [cors](https://github.com/hertz-contrib/cors)
  - [pprof](https://github.com/hertz-contrib/pprof)
  - [gzip](https://github.com/hertz-contrib/gzip)
  - [http2](https://github.com/hertz-contrib/http2)
  - [limiter](https://github.com/hertz-contrib/limiter)
  - [opensergo](https://github.com/hertz-contrib/opensergo)
  - [websocket](https://github.com/hertz-contrib/websocket)
- [Kitex](https://github.com/cloudwego/kitex)
  - [obs-opentelemetry](https://github.com/kitex-contrib/obs-opentelemetry)
  - [registry-consul](https://github.com/kitex-contrib/registry-consul)

##### Detailed documentation
[FreeCar](https://github.com/CyanAsterisk/FreeCar/blob/dev/README.md)

#### Contributors & Maintainers
- [@L2ncE](https://github.com/L2ncE)
- [@Claude-Zq](https://github.com/Claude-Zq)

================================================
FILE: _typos.toml
================================================
# Typo check: https://github.com/crate-ci/typos

[files]
extend-exclude = [
    "go.mod",
    "go.sum",
    "go.work.sum",
    "check_branch_name.sh",
    "*/licenses/*",
    "bootstrap.*.js",
    "hack/*",
    "open-payment-platform/internal/payment/infrastructure/ent/*",
]

[default.extend-identifiers]


================================================
FILE: book-shop/Makefile
================================================
# Copyright 2022 CloudWeGo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

MODULE = github.com/cloudwego/biz-demo/book-shop

# start the environment of demo
.PHONY: start
start:
	docker-compose up -d

# stop the environment of demo
.PHONY: stop
stop:
	docker-compose down

# run the facade service
.PHONY: facade
facade:
	sh app/facade/run.sh

# run the user service
.PHONY: user
user:
	go run app/user/*.go

# run the item service
.PHONY: item
item:
	go run app/item/*.go

# run the order service
.PHONY: order
order:
	go run app/order/*.go


================================================
FILE: book-shop/README.md
================================================
# Book Shop

## Introduction
An e-commerce demo built with `Kitex` and `Hertz`.

| Service Name       | Usage          | Framework    | protocol | Path       | IDL              |
|--------------------|----------------|--------------|----------|------------|------------------|
| facade             | HTTP interface | kitex/hertz  | http     | app/facade |                  |
| cwg.bookshop.user  | user service   | kitex/gorm   | thrift   | app/user   | idl/user.thrift  |
| cwg.bookshop.order | order service  | kitex/gorm   | thrift   | app/order  | idl/order.thrift |
| cwg.bookshop.item  | item service   | kitex/gorm   | thrift   | app/item   | idl/item.thrift  |

* components used
  * ElasticSearch
  * Kibana
  * MySQL
  * Redis
  * ETCD
* Hertz middlewares used
  * [swagger](http://github.com/hertz-contrib/swagger)
  * [JWT](http://github.com/hertz-contrib/jwt)
  * [pprof](https://github.com/hertz-contrib/pprof)
  * [gzip](https://github.com/hertz-contrib/gzip)

## Architecture
### Technology Architecture
![](./pics/arch.png)
### Service Calling Relations
![](./pics/relation.png)
## Quick Start

### Setup Environment
```shell
$ make start
```

### Run Services
```shell
$ make user
$ make item
$ make order
$ make facade
```

### Stop Environment
```shell
$ make stop
```

### Get Documents & Run Test
browse to [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html)

## Examples
### pprof
```shell
$ go tool pprof -http=:1234 http://localhost:8080/debug/pprof/heap
```
![](./pics/pprof.png)
### User Service
#### User Register
![](./pics/register.png)
#### User Login
![](./pics/login.png)
#### Shop Login
![](./pics/shop_login.png)
#### JWT Auth
![](./pics/auth.png)
### Item Service
#### Add Item
![](./pics/item_add.png)
#### Edit Item
![](./pics/item_edit.png)
#### Delete Item
![](./pics/item_del.png)
#### Offline Item
![](./pics/item_offline.png)
#### Online Item
![](./pics/item_online.png)
#### Get Item
![](./pics/item_get.png)
#### List Items
![](./pics/item_list.png)
#### Batch Get Items (2C Interface)
![](./pics/item_2c_get.png)
#### Search Items (2C Interface)
![](./pics/item_search.png)
### Order Service
#### Create Order
![](./pics/order_create.png)
#### Cancel Order
![](./pics/order_cancel.png)
#### List Orders
![](./pics/order_list.png)
#### Get Order
![](./pics/order_get.png)


================================================
FILE: book-shop/app/facade/handlers/handler_item/add.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// AddProduct godoc
// @Summary add product
// @Description add product
// @Tags product module
// @Accept json
// @Produce json
// @Param addProductRequest body model.AddProductRequest true "request param of adding product"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2b/add [post]
func AddProduct(ctx context.Context, c *app.RequestContext) {
	var addReq model.AddProductRequest
	if err := c.BindAndValidate(&addReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	req := &item.AddReq{
		Name:        addReq.Name,
		Pic:         addReq.Pic,
		Description: addReq.Description,
		Property: &item.BookProperty{
			Isbn:     addReq.ISBN,
			SpuName:  addReq.SpuName,
			SpuPrice: addReq.SpuPrice,
		},
		Price: addReq.Price,
		Stock: addReq.Stock,
	}
	pid, err := client.AddProduct(ctx, req)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, map[string]interface{}{
		"product_id": strconv.FormatInt(pid, 10),
	})
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/del.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// DelProduct godoc
// @Summary delete product
// @Description delete product
// @Tags product module
// @Accept json
// @Produce json
// @Param delProductRequest body model.OperateProductReq true "request param of operating product"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2b/del [post]
func DelProduct(ctx context.Context, c *app.RequestContext) {
	var delReq model.OperateProductReq
	if err := c.BindAndValidate(&delReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	pid, err := strconv.ParseInt(delReq.ProductId, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	err = client.OperateProduct(ctx, pid, "del")
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, nil)
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/edit.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// EditProduct godoc
// @Summary edit product
// @Description edit product
// @Tags product module
// @Accept json
// @Produce json
// @Param editProductRequest body model.EditProductRequest true "request param of editing product"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2b/edit [post]
func EditProduct(ctx context.Context, c *app.RequestContext) {
	var editReq model.EditProductRequest
	if err := c.BindAndValidate(&editReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	pid, err := strconv.ParseInt(editReq.ProductId, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	req := &item.EditReq{
		ProductId:   pid,
		Name:        editReq.Name,
		Pic:         editReq.Pic,
		Description: editReq.Description,
		Price:       editReq.Price,
		Stock:       editReq.Stock,
	}
	property := &item.BookProperty{}
	if editReq.SpuPrice != nil {
		property.SpuPrice = *editReq.SpuPrice
	}
	if editReq.SpuName != nil {
		property.SpuName = *editReq.SpuName
	}
	if editReq.ISBN != nil {
		property.Isbn = *editReq.ISBN
	}
	if editReq.SpuPrice != nil || editReq.SpuName != nil || editReq.ISBN != nil {
		req.Property = property
	}
	err = client.EditProduct(ctx, req)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, nil)
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/get.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"
	"errors"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// GetProduct godoc
// @Summary get product by product_id
// @Description get product by product_id
// @Tags product module
// @Accept json
// @Produce json
// @Param product_id query int true "product_id"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2b/get [get]
func GetProduct(ctx context.Context, c *app.RequestContext) {
	productIdStr := c.Query("product_id")
	if productIdStr == "" {
		model.SendResponse(c, errno.ConvertErr(errors.New("未传入product_id")), nil)
		return
	}

	productId, err := strconv.ParseInt(productIdStr, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	product, err := client.GetProduct(ctx, productId)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	model.SendResponse(c, errno.Success, product)
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/list.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// ListProduct godoc
// @Summary get product list
// @Description get product list
// @Tags product module
// @Accept json
// @Produce json
// @Param listProductReq body model.ListProductReq true "request param of listing products"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2b/list [post]
func ListProduct(ctx context.Context, c *app.RequestContext) {
	var listReq model.ListProductReq
	if err := c.BindAndValidate(&listReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	req := &item.ListReq{
		Name:    listReq.Name,
		SpuName: listReq.SpuName,
		Status:  (*item.Status)(listReq.Status),
	}

	products, err := client.ListProduct(ctx, req)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	model.SendResponse(c, errno.Success, products)
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/mget2c.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"
	"errors"
	"strconv"
	"strings"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// MGetProduct2C godoc
// @Summary batch get products by product_id (2C interface)
// @Description batch get products by product_id (2C interface)
// @Tags product module(2C)
// @Accept json
// @Produce json
// @Param product_ids query string true "product-ids separated by commas"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2c/mget [get]
func MGetProduct2C(ctx context.Context, c *app.RequestContext) {
	productIdsStr := c.Query("product_ids")
	if productIdsStr == "" {
		model.SendResponse(c, errno.ConvertErr(errors.New("未传入product_id")), nil)
		return
	}
	productIdStrArr := strings.Split(productIdsStr, ",")
	productIds := make([]int64, 0)
	for _, v := range productIdStrArr {
		cur, err := strconv.ParseInt(v, 10, 64)
		if err != nil {
			model.SendResponse(c, errno.ConvertErr(errors.New("非法参数")), nil)
			return
		}
		productIds = append(productIds, cur)
	}

	products, err := client.MGetProducts2C(ctx, productIds)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	model.SendResponse(c, errno.Success, products)
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/offline.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// OfflineProduct godoc
// @Summary offline product
// @Description offline product
// @Tags product module
// @Accept json
// @Produce json
// @Param offlineProductRequest body model.OperateProductReq true "request param of operating product"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2b/offline [post]
func OfflineProduct(ctx context.Context, c *app.RequestContext) {
	var offlineReq model.OperateProductReq
	if err := c.BindAndValidate(&offlineReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	pid, err := strconv.ParseInt(offlineReq.ProductId, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	err = client.OperateProduct(ctx, pid, "offline")
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, nil)
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/online.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// OnlineProduct godoc
// @Summary online product
// @Description online product
// @Tags product module
// @Accept json
// @Produce json
// @Param onlineProductRequest body model.OperateProductReq true "request param of operating product"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2b/online [post]
func OnlineProduct(ctx context.Context, c *app.RequestContext) {
	var onlineReq model.OperateProductReq
	if err := c.BindAndValidate(&onlineReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	pid, err := strconv.ParseInt(onlineReq.ProductId, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	err = client.OperateProduct(ctx, pid, "online")
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, nil)
}


================================================
FILE: book-shop/app/facade/handlers/handler_item/search.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_item

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// SearchProduct godoc
// @Summary search products (2C interface)
// @Description search products (2C interface)
// @Tags product module(2C)
// @Accept json
// @Produce json
// @Param searchProductReq body model.SearchProductReq true "request param of searching products"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /item2c/search [post]
func SearchProduct(ctx context.Context, c *app.RequestContext) {
	var searchReq model.SearchProductReq
	if err := c.BindAndValidate(&searchReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	req := &item.SearchReq{
		Name:        searchReq.Name,
		Description: searchReq.Description,
		SpuName:     searchReq.SpuName,
	}
	products, err := client.SearchProduct(ctx, req)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	model.SendResponse(c, errno.Success, products)
}


================================================
FILE: book-shop/app/facade/handlers/handler_order/cancel.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_order

import (
	"context"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// CancelOrder godoc
// @Summary consumer cancels order
// @Description consumer cancels order
// @Tags order module
// @Accept json
// @Produce json
// @Param cancelOrderReq body model.CancelOrderReq true "request param to cancel one order"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /order/cancel [post]
func CancelOrder(ctx context.Context, c *app.RequestContext) {
	var cancelReq model.CancelOrderReq
	if err := c.BindAndValidate(&cancelReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	orderId, err := strconv.ParseInt(cancelReq.OrderId, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	err = client.CancelOrder(ctx, orderId)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, nil)
}


================================================
FILE: book-shop/app/facade/handlers/handler_order/create.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_order

import (
	"context"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/order"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
	"github.com/hertz-contrib/jwt"
)

// CreateOrder godoc
// @Summary consumer creates order
// @Description consumer creates order
// @Tags order module
// @Accept json
// @Produce json
// @Param createOrderReq body model.CreateOrderReq true "request param to create one order"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /order/create [post]
func CreateOrder(ctx context.Context, c *app.RequestContext) {
	var createReq model.CreateOrderReq
	if err := c.BindAndValidate(&createReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	claims := jwt.ExtractClaims(ctx, c)
	userID := int64(claims[conf.IdentityKey].(float64))

	pid, err := strconv.ParseInt(createReq.ProductId, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	req := &order.CreateOrderReq{
		UserId:    userID,
		Address:   createReq.Address,
		ProductId: pid,
		StockNum:  createReq.StockNum,
	}
	err = client.CreateOrder(ctx, req)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, nil)
}


================================================
FILE: book-shop/app/facade/handlers/handler_order/get.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_order

import (
	"context"
	"errors"
	"strconv"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// GetOrder godoc
// @Summary get order by order_id
// @Description get order by order_id
// @Tags order module
// @Accept json
// @Produce json
// @Param order_id query int true "order id"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /order/get [get]
func GetOrder(ctx context.Context, c *app.RequestContext) {
	orderIdStr := c.Query("order_id")
	if orderIdStr == "" {
		model.SendResponse(c, errno.ConvertErr(errors.New("未传入order_id")), nil)
		return
	}

	orderId, err := strconv.ParseInt(orderIdStr, 10, 64)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	order, err := client.GetOrderById(ctx, orderId)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	model.SendResponse(c, errno.Success, order)
}


================================================
FILE: book-shop/app/facade/handlers/handler_order/list.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_order

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
	"github.com/hertz-contrib/jwt"
)

// ListOrder godoc
// @Summary get order list of a consumer
// @Description get order list of a consumer
// @Tags order module
// @Accept json
// @Produce json
// @Param listOrderReq body model.ListOrderReq true "request param to get order list"
// @Security TokenAuth
// @Success 200 {object} model.Response
// @Router /order/list [post]
func ListOrder(ctx context.Context, c *app.RequestContext) {
	var listReq model.ListOrderReq
	if err := c.BindAndValidate(&listReq); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	claims := jwt.ExtractClaims(ctx, c)
	userID := int64(claims[conf.IdentityKey].(float64))

	orders, err := client.ListOrder(ctx, userID, listReq.Status)
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	model.SendResponse(c, errno.Success, orders)
}


================================================
FILE: book-shop/app/facade/handlers/handler_user/shop_login.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_user

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/hertz/pkg/app"
)

// ShopLogin godoc
// @Summary shop login
// @Description shop login
// @Tags shop module
// @Accept json
// @Produce json
// @Param userParam body model.UserParam true "login param"
// @Success 200 {object} model.LoginResponse
// @Router /shop/login [post]
func ShopLogin(ctx context.Context, c *app.RequestContext) {
	model.ShopAuthMiddleware.LoginHandler(ctx, c)
}


================================================
FILE: book-shop/app/facade/handlers/handler_user/user_login.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_user

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/hertz/pkg/app"
)

// UserLogin godoc
// @Summary user login
// @Description user login
// @Tags user module
// @Accept json
// @Produce json
// @Param userParam body model.UserParam true "login param"
// @Success 200 {object} model.LoginResponse
// @Router /user/login [post]
func UserLogin(ctx context.Context, c *app.RequestContext) {
	model.UserAuthMiddleware.LoginHandler(ctx, c)
}


================================================
FILE: book-shop/app/facade/handlers/handler_user/user_register.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler_user

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"
)

// UserRegister godoc
// @Summary user register
// @Description user register
// @Tags user module
// @Accept json
// @Produce json
// @Param userParam body model.UserParam true "register param"
// @Success 200 {object} model.Response
// @Router /user/register [post]
func UserRegister(ctx context.Context, c *app.RequestContext) {
	var registerParam model.UserParam
	if err := c.BindAndValidate(&registerParam); err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}

	if len(registerParam.UserName) == 0 || len(registerParam.PassWord) == 0 {
		model.SendResponse(c, errno.ParamErr, nil)
		return
	}

	err := client.CreateUser(ctx, &user.CreateUserReq{
		UserName: registerParam.UserName,
		Password: registerParam.PassWord,
	})
	if err != nil {
		model.SendResponse(c, errno.ConvertErr(err), nil)
		return
	}
	model.SendResponse(c, errno.Success, nil)
}


================================================
FILE: book-shop/app/facade/infras/client/init.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package client

// Init init rpc client
func Init() {
	initUserRpc()
	initItemRpc()
	initOrderRpc()
}


================================================
FILE: book-shop/app/facade/infras/client/item.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package client

import (
	"context"
	"time"

	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item/itemservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/kitex/client"
	"github.com/cloudwego/kitex/pkg/retry"
	etcd "github.com/kitex-contrib/registry-etcd"
)

var itemClient itemservice.Client

func initItemRpc() {
	r, err := etcd.NewEtcdResolver([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}

	c, err := itemservice.NewClient(
		conf.ItemRpcServiceName,
		client.WithRPCTimeout(3*time.Second),              // rpc timeout
		client.WithConnectTimeout(50*time.Millisecond),    // conn timeout
		client.WithFailureRetry(retry.NewFailurePolicy()), // retry
		client.WithResolver(r),                            // resolver
	)
	if err != nil {
		panic(err)
	}
	itemClient = c
}

func AddProduct(ctx context.Context, req *item.AddReq) (int64, error) {
	resp, err := itemClient.Add(ctx, req)
	if err != nil {
		return 0, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return 0, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.ProductId, nil
}

func EditProduct(ctx context.Context, req *item.EditReq) error {
	resp, err := itemClient.Edit(ctx, req)
	if err != nil {
		return err
	}
	if resp.BaseResp.StatusCode != 0 {
		return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return nil
}

func OperateProduct(ctx context.Context, productId int64, operate string) error {
	if operate == "del" {
		resp, err := itemClient.Delete(ctx, &item.DeleteReq{ProductId: productId})
		if err != nil {
			return err
		}
		if resp.BaseResp.StatusCode != 0 {
			return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
		}
	} else if operate == "offline" {
		resp, err := itemClient.Offline(ctx, &item.OfflineReq{ProductId: productId})
		if err != nil {
			return err
		}
		if resp.BaseResp.StatusCode != 0 {
			return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
		}
	} else if operate == "online" {
		resp, err := itemClient.Online(ctx, &item.OnlineReq{ProductId: productId})
		if err != nil {
			return err
		}
		if resp.BaseResp.StatusCode != 0 {
			return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
		}
	}

	return nil
}

func GetProduct(ctx context.Context, productId int64) (*item.Product, error) {
	resp, err := itemClient.Get(ctx, &item.GetReq{ProductId: productId})
	if err != nil {
		return nil, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return nil, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.Product, nil
}

func MGetProducts2C(ctx context.Context, productIds []int64) (map[int64]*item.Product, error) {
	resp, err := itemClient.MGet2C(ctx, &item.MGet2CReq{
		ProductIds: productIds,
	})
	if err != nil {
		return nil, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return nil, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.ProductMap, nil
}

func SearchProduct(ctx context.Context, req *item.SearchReq) ([]*item.Product, error) {
	resp, err := itemClient.Search(ctx, req)
	if err != nil {
		return nil, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return nil, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.Products, nil
}

func ListProduct(ctx context.Context, req *item.ListReq) ([]*item.Product, error) {
	resp, err := itemClient.List(ctx, req)
	if err != nil {
		return nil, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return nil, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.Products, nil
}


================================================
FILE: book-shop/app/facade/infras/client/order.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package client

import (
	"context"
	"time"

	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/order"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/order/orderservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/kitex/client"
	"github.com/cloudwego/kitex/pkg/retry"
	etcd "github.com/kitex-contrib/registry-etcd"
)

var orderClient orderservice.Client

func initOrderRpc() {
	r, err := etcd.NewEtcdResolver([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}

	c, err := orderservice.NewClient(
		conf.OrderRpcServiceName,
		client.WithRPCTimeout(3*time.Second),              // rpc timeout
		client.WithConnectTimeout(50*time.Millisecond),    // conn timeout
		client.WithFailureRetry(retry.NewFailurePolicy()), // retry
		client.WithResolver(r),                            // resolver
	)
	if err != nil {
		panic(err)
	}
	orderClient = c
}

func CreateOrder(ctx context.Context, req *order.CreateOrderReq) error {
	resp, err := orderClient.CreateOrder(ctx, req)
	if err != nil {
		return err
	}
	if resp.BaseResp.StatusCode != 0 {
		return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return nil
}

func CancelOrder(ctx context.Context, orderId int64) error {
	resp, err := orderClient.CancelOrder(ctx, &order.CancelOrderReq{OrderId: orderId})
	if err != nil {
		return err
	}
	if resp.BaseResp.StatusCode != 0 {
		return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return nil
}

func GetOrderById(ctx context.Context, orderId int64) (*order.OrderItem, error) {
	resp, err := orderClient.GetOrderById(ctx, &order.GetOrderByIdReq{
		OrderId: orderId,
	})
	if err != nil {
		return nil, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return nil, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.Order, nil
}

func ListOrder(ctx context.Context, userId int64, status *int64) ([]*order.OrderItem, error) {
	resp, err := orderClient.ListOrder(ctx, &order.ListOrderReq{
		UserId: userId,
		Status: (*order.Status)(status),
	})
	if err != nil {
		return nil, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return nil, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.Orders, nil
}


================================================
FILE: book-shop/app/facade/infras/client/user.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package client

import (
	"context"
	"time"

	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user/userservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"

	"github.com/cloudwego/kitex/client"
	"github.com/cloudwego/kitex/pkg/retry"
	etcd "github.com/kitex-contrib/registry-etcd"
)

var userClient userservice.Client

func initUserRpc() {
	r, err := etcd.NewEtcdResolver([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}

	c, err := userservice.NewClient(
		conf.UserRpcServiceName,
		client.WithRPCTimeout(3*time.Second),              // rpc timeout
		client.WithConnectTimeout(50*time.Millisecond),    // conn timeout
		client.WithFailureRetry(retry.NewFailurePolicy()), // retry
		client.WithResolver(r),                            // resolver
	)
	if err != nil {
		panic(err)
	}
	userClient = c
}

func CreateUser(ctx context.Context, req *user.CreateUserReq) error {
	resp, err := userClient.CreateUser(ctx, req)
	if err != nil {
		return err
	}
	if resp.BaseResp.StatusCode != 0 {
		return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return nil
}

func CheckUser(ctx context.Context, req *user.CheckUserReq) (int64, error) {
	resp, err := userClient.CheckUser(ctx, req)
	if err != nil {
		return 0, err
	}
	if resp.BaseResp.StatusCode != 0 {
		return 0, errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return resp.UserId, nil
}


================================================
FILE: book-shop/app/facade/main.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package main

import (
	"context"
	"time"

	"github.com/cloudwego/biz-demo/book-shop/app/facade/handlers/handler_item"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/handlers/handler_order"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/handlers/handler_user"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/infras/client"
	"github.com/cloudwego/biz-demo/book-shop/app/facade/model"
	_ "github.com/cloudwego/biz-demo/book-shop/docs"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/hertz/pkg/app"
	"github.com/cloudwego/hertz/pkg/app/server"
	"github.com/hertz-contrib/gzip"
	"github.com/hertz-contrib/jwt"
	"github.com/hertz-contrib/pprof"
	"github.com/hertz-contrib/swagger"
	swaggerFiles "github.com/swaggo/files"
)

func Init() {
	client.Init()

	model.UserAuthMiddleware, _ = jwt.New(&jwt.HertzJWTMiddleware{
		Key:        []byte(conf.SecretKey),
		Timeout:    time.Hour,
		MaxRefresh: time.Hour,
		PayloadFunc: func(data interface{}) jwt.MapClaims {
			if v, ok := data.(int64); ok {
				return jwt.MapClaims{
					conf.IdentityKey: v,
				}
			}
			return jwt.MapClaims{}
		},
		Authenticator: func(ctx context.Context, c *app.RequestContext) (interface{}, error) {
			var loginVar model.UserParam
			if err := c.Bind(&loginVar); err != nil {
				return "", jwt.ErrMissingLoginValues
			}

			if len(loginVar.UserName) == 0 || len(loginVar.PassWord) == 0 {
				return "", jwt.ErrMissingLoginValues
			}

			return client.CheckUser(context.Background(), &user.CheckUserReq{UserName: loginVar.UserName, Password: loginVar.PassWord})
		},
		TokenLookup:   "header: Authorization, query: token, cookie: jwt",
		TokenHeadName: "Bearer",
		TimeFunc:      time.Now,
	})

	model.ShopAuthMiddleware, _ = jwt.New(&jwt.HertzJWTMiddleware{
		Key:        []byte(conf.SecretKey),
		Timeout:    time.Hour,
		MaxRefresh: time.Hour,
		PayloadFunc: func(data interface{}) jwt.MapClaims {
			if v, ok := data.(int64); ok {
				return jwt.MapClaims{
					conf.IdentityKey: v,
				}
			}
			return jwt.MapClaims{}
		},
		Authenticator: func(ctx context.Context, c *app.RequestContext) (interface{}, error) {
			var loginVar model.UserParam
			if err := c.Bind(&loginVar); err != nil {
				return "", jwt.ErrMissingLoginValues
			}

			if loginVar.UserName != conf.ShopLoginName || loginVar.PassWord != conf.ShopLoginPassword {
				return "", jwt.ErrMissingLoginValues
			}

			return conf.ShopLoginName, nil
		},
		TokenLookup:   "header: Authorization, query: token, cookie: jwt",
		TokenHeadName: "Bearer",
		TimeFunc:      time.Now,
	})
}

// @title Book-Shop
// @version 1.0
// @description This is a book-shop demo using Hertz and KiteX.

// @contact.name CloudWeGo
// @contact.url https://github.com/cloudwego
// @contact.email conduct@cloudwego.io

// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @securityDefinitions.apikey TokenAuth
// @in header
// @name Authorization

// @host localhost:8080
// @BasePath /
// @schemes http
func main() {
	Init()
	h := server.Default(server.WithHostPorts(conf.FacadeServiceAddress))
	h.Use(gzip.Gzip(gzip.DefaultCompression))
	pprof.Register(h)

	// user service
	userGroup := h.Group("/user")
	userGroup.POST("/register", handler_user.UserRegister)
	userGroup.POST("/login", handler_user.UserLogin)

	// shop service
	shopGroup := h.Group("/shop")
	shopGroup.POST("/login", handler_user.ShopLogin)

	// item-2b service
	item2BGroup := h.Group("/item2b")
	item2BGroup.Use(model.ShopAuthMiddleware.MiddlewareFunc())
	item2BGroup.POST("/add", handler_item.AddProduct)
	item2BGroup.POST("/edit", handler_item.EditProduct)
	item2BGroup.POST("/del", handler_item.DelProduct)
	item2BGroup.POST("/offline", handler_item.OfflineProduct)
	item2BGroup.POST("/online", handler_item.OnlineProduct)
	item2BGroup.GET("/get", handler_item.GetProduct)
	item2BGroup.POST("/list", handler_item.ListProduct)

	// item-2c service
	item2CGroup := h.Group("/item2c")
	item2CGroup.Use(model.UserAuthMiddleware.MiddlewareFunc())
	item2CGroup.GET("/mget", handler_item.MGetProduct2C)
	item2CGroup.POST("/search", handler_item.SearchProduct)

	// order service
	orderGroup := h.Group("/order")
	orderGroup.Use(model.UserAuthMiddleware.MiddlewareFunc())
	orderGroup.POST("/create", handler_order.CreateOrder)
	orderGroup.POST("/cancel", handler_order.CancelOrder)
	orderGroup.POST("/list", handler_order.ListOrder)
	orderGroup.GET("/get", handler_order.GetOrder)

	url := swagger.URL("http://localhost:8080/swagger/doc.json") // The url pointing to API definition
	h.GET("/swagger/*any", swagger.WrapHandler(swaggerFiles.Handler, url))

	h.Spin()
}


================================================
FILE: book-shop/app/facade/model/model.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package model

import (
	"net/http"

	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/hertz/pkg/app"

	"github.com/hertz-contrib/jwt"
)

var (
	UserAuthMiddleware *jwt.HertzJWTMiddleware
	ShopAuthMiddleware *jwt.HertzJWTMiddleware
)

type Response struct {
	Code    int64       `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

// SendResponse pack response
func SendResponse(c *app.RequestContext, err error, data interface{}) {
	Err := errno.ConvertErr(err)
	c.JSON(http.StatusOK, Response{
		Code:    Err.ErrCode,
		Message: Err.ErrMsg,
		Data:    data,
	})
}

type UserParam struct {
	UserName string `json:"username"`
	PassWord string `json:"password"`
}

type LoginResponse struct {
	Code   int64  `json:"code"`
	Expire string `json:"expire"`
	Token  string `json:"token"`
}

type AddProductRequest struct {
	Name        string `json:"name"`
	Pic         string `json:"pic"`
	Description string `json:"description"`
	ISBN        string `json:"isbn"`
	SpuName     string `json:"spu_name"`
	SpuPrice    int64  `json:"spu_price"`
	Price       int64  `json:"price"`
	Stock       int64  `json:"stock"`
}

type EditProductRequest struct {
	ProductId   string  `json:"product_id"`
	Name        *string `json:"name"`
	Pic         *string `json:"pic"`
	Description *string `json:"description"`
	ISBN        *string `json:"isbn"`
	SpuName     *string `json:"spu_name"`
	SpuPrice    *int64  `json:"spu_price"`
	Price       *int64  `json:"price"`
	Stock       *int64  `json:"stock"`
}

type OperateProductReq struct {
	ProductId string `json:"product_id"`
}

type SearchProductReq struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
	SpuName     *string `json:"spu_name"`
}

type ListProductReq struct {
	Name    *string `json:"name"`
	SpuName *string `json:"spu_name"`
	Status  *int64  `json:"status"`
}

type CreateOrderReq struct {
	Address   string `json:"address"`
	ProductId string `json:"product_id"`
	StockNum  int64  `json:"stock_num"`
}

type CancelOrderReq struct {
	OrderId string `json:"order_id"`
}

type ListOrderReq struct {
	Status *int64 `json:"status"`
}


================================================
FILE: book-shop/app/facade/run.sh
================================================
#!/usr/bin/env bash
#
# Copyright 2022 CloudWeGo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

go run app/facade/main.go

================================================
FILE: book-shop/app/item/build.sh
================================================
#!/usr/bin/env bash
RUN_NAME="cwg.bookshop.item"

mkdir -p output/bin
cp script/* output/
chmod +x output/bootstrap.sh

if [ "$IS_SYSTEM_TEST_ENV" != "1" ]; then
    go build -o output/bin/${RUN_NAME}
else
    go test -c -covermode=set -o output/bin/${RUN_NAME} -coverpkg=./...
fi


================================================
FILE: book-shop/app/item/common/constant/constant.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package constant

type ProductStatus = int64

const (
	ProductStatusOnline  ProductStatus = 0
	ProductStatusOffline ProductStatus = 1
	ProductStatusDelete  ProductStatus = 2
)

var ProductStatusDescMap = map[ProductStatus]string{
	ProductStatusOnline:  "上架",
	ProductStatusOffline: "下架",
	ProductStatusDelete:  "删除",
}

type StateOperationType = int64

const (
	StateOperationTypeAdd     StateOperationType = 1
	StateOperationTypeSave    StateOperationType = 2
	StateOperationTypeDel     StateOperationType = 3
	StateOperationTypeOffline StateOperationType = 4
	StateOperationTypeOnline  StateOperationType = 5
)


================================================
FILE: book-shop/app/item/common/converter/dto_2_entity.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package converter

import (
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/utils"
)

func ConvertDTO2Entity(dto *item.Product) *entity.ProductEntity {
	ret := &entity.ProductEntity{
		ProductId:   dto.ProductId,
		Name:        dto.Name,
		Pic:         dto.Pic,
		Description: dto.Description,
		Price:       dto.Price,
		Stock:       dto.Stock,
		Status:      dto.Stock,
	}
	if dto.Property != nil {
		ret.Property = &entity.PropertyEntity{
			ISBN:     dto.Property.Isbn,
			SpuName:  dto.Property.SpuName,
			SpuPrice: dto.Property.SpuPrice,
		}
	}

	return ret
}

func ConvertAddReq2Entity(req *item.AddReq) (*entity.ProductEntity, error) {
	pid, err := utils.GenerateID()
	if err != nil {
		return nil, err
	}

	ret := &entity.ProductEntity{
		ProductId:   pid,
		Name:        req.Name,
		Pic:         req.Pic,
		Description: req.Description,
		Price:       req.Price,
		Stock:       req.Stock,
		Status:      int64(item.Status_Online),
	}

	if req.Property != nil {
		ret.Property = &entity.PropertyEntity{
			ISBN:     req.Property.Isbn,
			SpuName:  req.Property.SpuName,
			SpuPrice: req.Property.SpuPrice,
		}
	}

	return ret, err
}

func ConvertEditReq2Entity(originEntity *entity.ProductEntity, req *item.EditReq) (*entity.ProductEntity, error) {
	targetEntity, err := originEntity.Clone()
	if err != nil {
		return nil, err
	}
	if req.Name != nil {
		targetEntity.Name = *req.Name
	}
	if req.Pic != nil {
		targetEntity.Pic = *req.Pic
	}
	if req.Description != nil {
		targetEntity.Description = *req.Description
	}
	if req.Price != nil {
		targetEntity.Price = *req.Price
	}
	if req.Stock != nil {
		targetEntity.Stock = *req.Stock
	}
	if req.Property != nil {
		targetEntity.Property = &entity.PropertyEntity{
			ISBN:     req.Property.Isbn,
			SpuName:  req.Property.SpuName,
			SpuPrice: req.Property.SpuPrice,
		}
	}
	return targetEntity, nil
}


================================================
FILE: book-shop/app/item/common/converter/entity_2_dto.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package converter

import (
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
)

func ConvertEntity2DTO(e *entity.ProductEntity) *item.Product {
	ret := &item.Product{
		ProductId:   e.ProductId,
		Name:        e.Name,
		Pic:         e.Pic,
		Description: e.Description,
		Price:       e.Price,
		Stock:       e.Stock,
		Status:      item.Status(e.Status),
	}
	if e.Property != nil {
		ret.Property = &item.BookProperty{
			Isbn:     e.Property.ISBN,
			SpuName:  e.Property.SpuName,
			SpuPrice: e.Property.SpuPrice,
		}
	}
	return ret
}


================================================
FILE: book-shop/app/item/common/entity/product_entity.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package entity

import "github.com/jinzhu/copier"

type ProductEntity struct {
	ProductId   int64
	Name        string
	Pic         string
	Description string
	Property    *PropertyEntity
	Price       int64
	Stock       int64
	Status      int64
}

func (entity *ProductEntity) Clone() (*ProductEntity, error) {
	ret := &ProductEntity{}
	err := copier.Copy(ret, entity)
	return ret, err
}

type PropertyEntity struct {
	ISBN     string
	SpuName  string
	SpuPrice int64
}


================================================
FILE: book-shop/app/item/common/po/product_po.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package po

import (
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"gorm.io/gorm"
)

type Product struct {
	gorm.Model
	ProductId   int64  `json:"product_id"`
	Name        string `json:"name"`
	Pic         string `json:"pic"`
	Description string `json:"description"`
	ISBN        string `json:"isbn"`
	SpuName     string `json:"spu_name"`
	SpuPrice    int64  `json:"spu_price"`
	Price       int64  `json:"price"`
	Stock       int64  `json:"stock"`
	Status      int64  `json:"status"`
}

func (p *Product) TableName() string {
	return conf.ProductTableName
}


================================================
FILE: book-shop/app/item/domain/repository/product_2c_repository.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
)

type Product2CRepository interface {
	MGetProducts2C(ctx context.Context, productIds []int64) ([]*entity.ProductEntity, error)
	SearchProducts(ctx context.Context, name, description, spuName *string) ([]*entity.ProductEntity, error)
}


================================================
FILE: book-shop/app/item/domain/repository/product_repository.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
)

type ProductRepository interface {
	AddProduct(ctx context.Context, product *entity.ProductEntity) error

	UpdateProduct(ctx context.Context, origin, target *entity.ProductEntity) error

	GetProductById(ctx context.Context, productId int64) (*entity.ProductEntity, error)

	ListProducts(ctx context.Context, filterParam map[string]interface{}) ([]*entity.ProductEntity, error)
}


================================================
FILE: book-shop/app/item/domain/repository/repository_registry.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

type RepositoryRegistry struct {
	productRepository   ProductRepository
	stockRepository     StockRepository
	product2CRepository Product2CRepository
}

var inst = &RepositoryRegistry{}

func GetRegistry() *RepositoryRegistry {
	return inst
}

func (r *RepositoryRegistry) GetProductRepository() ProductRepository {
	return r.productRepository
}

func (r *RepositoryRegistry) SetProductRepository(productRepositoryIns ProductRepository) {
	r.productRepository = productRepositoryIns
}

func (r *RepositoryRegistry) GetProduct2CRepository() Product2CRepository {
	return r.product2CRepository
}

func (r *RepositoryRegistry) SetProduct2CRepository(product2CRepositoryIns Product2CRepository) {
	r.product2CRepository = product2CRepositoryIns
}

func (r *RepositoryRegistry) GetStockRepository() StockRepository {
	return r.stockRepository
}

func (r *RepositoryRegistry) SetStockRepository(stockRepositoryIns StockRepository) {
	r.stockRepository = stockRepositoryIns
}


================================================
FILE: book-shop/app/item/domain/repository/stock_repository.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

import (
	"context"
)

type StockRepository interface {
	IncrStock(ctx context.Context, productId, stockNum int64) error // 增加库存
	DecrStock(ctx context.Context, productId, stockNum int64) error // 减少库存
}


================================================
FILE: book-shop/app/item/domain/service/product_query_service.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package service

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/repository"
)

// ProductQueryService product query service
type ProductQueryService struct{}

var productQueryService ProductQueryService

// GetProductQueryServiceInstance single instance
func GetProductQueryServiceInstance() *ProductQueryService {
	return &productQueryService
}

func (s *ProductQueryService) GetProduct(ctx context.Context, productId int64) (*entity.ProductEntity, error) {
	do, err := repository.GetRegistry().GetProductRepository().GetProductById(ctx, productId)
	if err != nil {
		return nil, err
	}
	return do, nil
}

func (s *ProductQueryService) ListProducts(ctx context.Context, name, spuName *string, status *int64) ([]*entity.ProductEntity, error) {
	filterParam := make(map[string]interface{})
	if name != nil {
		filterParam["name"] = *name
	}
	if spuName != nil {
		filterParam["spu_name"] = *spuName
	}
	if status != nil {
		filterParam["status"] = *status
	}
	entities, err := repository.GetRegistry().GetProductRepository().ListProducts(ctx, filterParam)
	if err != nil {
		return nil, err
	}
	return entities, nil
}

func (s *ProductQueryService) MGet2C(ctx context.Context, productIds []int64) ([]*entity.ProductEntity, error) {
	do, err := repository.GetRegistry().GetProduct2CRepository().MGetProducts2C(ctx, productIds)
	if err != nil {
		return nil, err
	}
	return do, nil
}

func (s *ProductQueryService) Search(ctx context.Context, name, description, spuName *string) ([]*entity.ProductEntity, error) {
	do, err := repository.GetRegistry().GetProduct2CRepository().SearchProducts(ctx, name, description, spuName)
	if err != nil {
		return nil, err
	}
	return do, nil
}


================================================
FILE: book-shop/app/item/domain/service/product_state_service.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package service

import (
	"context"
	"errors"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/constant"
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/repository"
	"github.com/cloudwego/kitex/pkg/klog"
)

// ProductStateService product state machine service
type ProductStateService struct{}

var productStateService ProductStateService

func GetProductStateService() *ProductStateService {
	return &productStateService
}

type ProductStateInfo struct {
	Status constant.ProductStatus
}

type CanTransferFunc func(originalInfo *ProductStateInfo) error

type ConstructTargetInfoFunc func(originalInfo *ProductStateInfo) *ProductStateInfo

var canTransferFuncMap = map[constant.StateOperationType]CanTransferFunc{
	constant.StateOperationTypeAdd: func(originalInfo *ProductStateInfo) error {
		return nil
	},
	constant.StateOperationTypeSave: func(originalInfo *ProductStateInfo) error {
		if originalInfo.Status == constant.ProductStatusDelete {
			return errors.New("商品已删除")
		}
		return nil
	},
	constant.StateOperationTypeDel: func(originalInfo *ProductStateInfo) error {
		return nil
	},
	constant.StateOperationTypeOnline: func(originalInfo *ProductStateInfo) error {
		if originalInfo.Status != constant.ProductStatusOffline {
			return errors.New("商品非下架状态")
		}
		return nil
	},
	constant.StateOperationTypeOffline: func(originalInfo *ProductStateInfo) error {
		if originalInfo.Status != constant.ProductStatusOnline {
			return errors.New("商品非上架状态")
		}
		return nil
	},
}

var constructTargetInfoFuncMap = map[constant.StateOperationType]ConstructTargetInfoFunc{
	constant.StateOperationTypeAdd: func(originalInfo *ProductStateInfo) (ret *ProductStateInfo) {
		ret = &ProductStateInfo{}
		ret.Status = constant.ProductStatusOnline
		return
	},
	constant.StateOperationTypeSave: func(originalInfo *ProductStateInfo) (ret *ProductStateInfo) {
		ret = &ProductStateInfo{}
		ret.Status = constant.ProductStatusOnline
		return
	},
	constant.StateOperationTypeDel: func(originalInfo *ProductStateInfo) (ret *ProductStateInfo) {
		ret = &ProductStateInfo{}
		ret.Status = constant.ProductStatusDelete
		return
	},
	constant.StateOperationTypeOnline: func(originalInfo *ProductStateInfo) (ret *ProductStateInfo) {
		ret = &ProductStateInfo{}
		ret.Status = constant.ProductStatusOnline
		return
	},
	constant.StateOperationTypeOffline: func(originalInfo *ProductStateInfo) (ret *ProductStateInfo) {
		ret = &ProductStateInfo{}
		ret.Status = constant.ProductStatusOffline
		return
	},
}

// GetCanTransferFunc get the validating func
func (s *ProductStateService) GetCanTransferFunc(operationType constant.StateOperationType) (CanTransferFunc, error) {
	if canTransferFunc, ok := canTransferFuncMap[operationType]; ok {
		return canTransferFunc, nil
	}

	return nil, errors.New("GetCanTransferFunc not found")
}

// GetConstructTargetInfoFunc get func to change product status
func (s *ProductStateService) getConstructTargetInfoFunc(operationType constant.StateOperationType) (ConstructTargetInfoFunc, error) {
	if constructTargetInfoFunc, ok := constructTargetInfoFuncMap[operationType]; ok {
		return constructTargetInfoFunc, nil
	}

	return nil, errors.New("GetConstructTargetInfoFunc not found")
}

// ConstructTargetInfo change product status
func (s *ProductStateService) ConstructTargetInfo(originProduct *entity.ProductEntity,
	operation constant.StateOperationType,
) (*entity.ProductEntity, error) {
	targetProduct, err := originProduct.Clone()
	if err != nil {
		return nil, err
	}
	originStateInfo := &ProductStateInfo{
		Status: originProduct.Status,
	}
	constructFunc, err := s.getConstructTargetInfoFunc(operation)
	if err != nil {
		return nil, err
	}
	targetState := constructFunc(originStateInfo)
	targetProduct.Status = targetState.Status
	return targetProduct, nil
}

// OperateProduct update product
func (s *ProductStateService) OperateProduct(ctx context.Context, origin, target *entity.ProductEntity) error {
	repo := repository.GetRegistry().GetProductRepository()
	// update status
	err := repo.UpdateProduct(ctx, origin, target)
	if err != nil {
		klog.CtxErrorf(ctx, "OperateProduct err: %v", err)
		return err
	}
	return nil
}


================================================
FILE: book-shop/app/item/domain/service/product_stock_service.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package service

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/repository"
)

type ProductStockService struct{}

var productStockService ProductStockService

func GetProductStockServiceInstance() *ProductStockService {
	return &productStockService
}

func (s *ProductStockService) IncreaseStockNum(ctx context.Context, productId, incrNum int64) error {
	return repository.GetRegistry().GetStockRepository().IncrStock(ctx, productId, incrNum)
}

func (s *ProductStockService) DecreaseStockNum(ctx context.Context, productId, decrNum int64) error {
	return repository.GetRegistry().GetStockRepository().DecrStock(ctx, productId, decrNum)
}


================================================
FILE: book-shop/app/item/domain/service/product_update_service.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package service

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/repository"
)

// ProductUpdateService product update service
type ProductUpdateService struct{}

var productUpdateService ProductUpdateService

func GetProductUpdateServiceInstance() *ProductUpdateService {
	return &productUpdateService
}

func (s *ProductUpdateService) AddProduct(ctx context.Context, entity *entity.ProductEntity) error {
	err := repository.GetRegistry().GetProductRepository().AddProduct(ctx, entity)
	if err != nil {
		return err
	}
	return nil
}

func (s *ProductUpdateService) EditProduct(ctx context.Context, origin, target *entity.ProductEntity) error {
	err := repository.GetRegistry().GetProductRepository().UpdateProduct(ctx, origin, target)
	if err != nil {
		return err
	}
	return nil
}


================================================
FILE: book-shop/app/item/handler/add_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/converter"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type AddHandler struct {
	ctx   context.Context
	param *item.AddReq
}

func NewAddHandler(ctx context.Context, req *item.AddReq) *AddHandler {
	return &AddHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *AddHandler) Add() (*item.AddResp, error) {
	resp := &item.AddResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	updateService := service.GetProductUpdateServiceInstance()

	entity, err := converter.ConvertAddReq2Entity(h.param)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	err = updateService.AddProduct(h.ctx, entity)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	resp.ProductId = entity.ProductId
	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/decrease_stock_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type DecrStockHandler struct {
	ctx   context.Context
	param *item.DecrStockReq
}

func NewDecrStockHandler(ctx context.Context, req *item.DecrStockReq) *DecrStockHandler {
	return &DecrStockHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *DecrStockHandler) DecrStock() (*item.DecrStockResp, error) {
	resp := &item.DecrStockResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	stockService := service.GetProductStockServiceInstance()
	err := stockService.DecreaseStockNum(h.ctx, h.param.ProductId, h.param.StockNum)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/decrease_stock_revert_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type DecrStockRevertHandler struct {
	ctx   context.Context
	param *item.DecrStockReq
}

func NewDecrStockRevertHandler(ctx context.Context, req *item.DecrStockReq) *DecrStockRevertHandler {
	return &DecrStockRevertHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *DecrStockRevertHandler) DecrStockRevert() (*item.DecrStockResp, error) {
	resp := &item.DecrStockResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	stockService := service.GetProductStockServiceInstance()
	err := stockService.IncreaseStockNum(h.ctx, h.param.ProductId, h.param.StockNum)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/delete_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/constant"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type DeleteHandler struct {
	ctx   context.Context
	param *item.DeleteReq
}

func NewDeleteHandler(ctx context.Context, req *item.DeleteReq) *DeleteHandler {
	return &DeleteHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *DeleteHandler) Delete() (*item.DeleteResp, error) {
	resp := &item.DeleteResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	stateService := service.GetProductStateService()
	queryService := service.GetProductQueryServiceInstance()
	updateService := service.GetProductUpdateServiceInstance()

	// 0. get origin info
	originEntity, err := queryService.GetProduct(h.ctx, h.param.ProductId)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 1. validate
	validateFunc, err := stateService.GetCanTransferFunc(constant.ProductStatusDelete)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	err = validateFunc(&service.ProductStateInfo{Status: originEntity.Status})
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 2. construct do
	targetEntity, err := stateService.ConstructTargetInfo(originEntity, constant.StateOperationTypeDel)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 3. process
	err = updateService.EditProduct(h.ctx, originEntity, targetEntity)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/edit_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/converter"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type EditHandler struct {
	ctx   context.Context
	param *item.EditReq
}

func NewEditHandler(ctx context.Context, req *item.EditReq) *EditHandler {
	return &EditHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *EditHandler) Edit() (*item.EditResp, error) {
	resp := &item.EditResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	updateService := service.GetProductUpdateServiceInstance()
	queryService := service.GetProductQueryServiceInstance()

	originEntity, err := queryService.GetProduct(h.ctx, h.param.ProductId)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	targetEntity, err := converter.ConvertEditReq2Entity(originEntity, h.param)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	err = updateService.EditProduct(h.ctx, originEntity, targetEntity)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/get_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/converter"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type GetHandler struct {
	ctx   context.Context
	param *item.GetReq
}

func NewGetHandler(ctx context.Context, req *item.GetReq) *GetHandler {
	return &GetHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *GetHandler) Get() (*item.GetResp, error) {
	resp := &item.GetResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	queryService := service.GetProductQueryServiceInstance()
	productEntity, err := queryService.GetProduct(h.ctx, h.param.ProductId)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	dto := converter.ConvertEntity2DTO(productEntity)
	resp.Product = dto
	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/list_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/converter"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type ListHandler struct {
	ctx   context.Context
	param *item.ListReq
}

func NewListHandler(ctx context.Context, req *item.ListReq) *ListHandler {
	return &ListHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *ListHandler) List() (*item.ListResp, error) {
	resp := &item.ListResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	if h.param.Name == nil && h.param.SpuName == nil && h.param.Status == nil {
		resp.BaseResp = errno.BuildBaseResp(errno.ParamErr)
		return resp, nil
	}

	queryService := service.GetProductQueryServiceInstance()
	entities, err := queryService.ListProducts(h.ctx, h.param.Name, h.param.SpuName, (*int64)(h.param.Status))
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	dtos := make([]*item.Product, 0)
	for _, e := range entities {
		dtos = append(dtos, converter.ConvertEntity2DTO(e))
	}

	resp.Products = dtos

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/mget2c_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/converter"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type MGet2CHandler struct {
	ctx   context.Context
	param *item.MGet2CReq
}

func NewMGet2CHandler(ctx context.Context, req *item.MGet2CReq) *MGet2CHandler {
	return &MGet2CHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *MGet2CHandler) MGet() (*item.MGet2CResp, error) {
	resp := &item.MGet2CResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	queryService := service.GetProductQueryServiceInstance()
	entities, err := queryService.MGet2C(h.ctx, h.param.ProductIds)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	dtoMap := make(map[int64]*item.Product)
	for _, e := range entities {
		dtoMap[e.ProductId] = converter.ConvertEntity2DTO(e)
	}

	resp.ProductMap = dtoMap

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/offline_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/constant"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type OfflineHandler struct {
	ctx   context.Context
	param *item.OfflineReq
}

func NewOfflineHandler(ctx context.Context, req *item.OfflineReq) *OfflineHandler {
	return &OfflineHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *OfflineHandler) Offline() (*item.OfflineResp, error) {
	resp := &item.OfflineResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	stateService := service.GetProductStateService()
	queryService := service.GetProductQueryServiceInstance()
	updateService := service.GetProductUpdateServiceInstance()

	// 0. get origin info
	originEntity, err := queryService.GetProduct(h.ctx, h.param.ProductId)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 1. validate
	validateFunc, err := stateService.GetCanTransferFunc(constant.ProductStatusOffline)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	err = validateFunc(&service.ProductStateInfo{Status: originEntity.Status})
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 2. construct do
	targetEntity, err := stateService.ConstructTargetInfo(originEntity, constant.StateOperationTypeOffline)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 3. process
	err = updateService.EditProduct(h.ctx, originEntity, targetEntity)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/online_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/constant"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type OnlineHandler struct {
	ctx   context.Context
	param *item.OnlineReq
}

func NewOnlineHandler(ctx context.Context, req *item.OnlineReq) *OnlineHandler {
	return &OnlineHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *OnlineHandler) Online() (*item.OnlineResp, error) {
	resp := &item.OnlineResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	stateService := service.GetProductStateService()
	queryService := service.GetProductQueryServiceInstance()
	updateService := service.GetProductUpdateServiceInstance()

	// 0. get origin info
	originEntity, err := queryService.GetProduct(h.ctx, h.param.ProductId)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 1. validate
	validateFunc, err := stateService.GetCanTransferFunc(constant.StateOperationTypeOnline)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	err = validateFunc(&service.ProductStateInfo{Status: originEntity.Status})
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 2. construct do
	targetEntity, err := stateService.ConstructTargetInfo(originEntity, constant.StateOperationTypeOnline)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	// 3. process
	err = updateService.EditProduct(h.ctx, originEntity, targetEntity)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler/search_handler.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package handler

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/converter"
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/service"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type SearchHandler struct {
	ctx   context.Context
	param *item.SearchReq
}

func NewSearchHandler(ctx context.Context, req *item.SearchReq) *SearchHandler {
	return &SearchHandler{
		ctx:   ctx,
		param: req,
	}
}

func (h *SearchHandler) Search() (*item.SearchResp, error) {
	resp := &item.SearchResp{
		BaseResp: errno.BuildBaseResp(errno.Success),
	}

	queryService := service.GetProductQueryServiceInstance()
	entities, err := queryService.Search(h.ctx, h.param.Name, h.param.Description, h.param.SpuName)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	dtos := make([]*item.Product, 0)
	for _, e := range entities {
		dtos = append(dtos, converter.ConvertEntity2DTO(e))
	}

	resp.Products = dtos

	return resp, nil
}


================================================
FILE: book-shop/app/item/handler.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package main

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/handler"
	item "github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
)

// ItemServiceImpl implements the last service interface defined in the IDL.
type ItemServiceImpl struct{}

// Add implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) Add(ctx context.Context, req *item.AddReq) (resp *item.AddResp, err error) {
	resp, err = handler.NewAddHandler(ctx, req).Add()
	return resp, err
}

// Edit implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) Edit(ctx context.Context, req *item.EditReq) (resp *item.EditResp, err error) {
	resp, err = handler.NewEditHandler(ctx, req).Edit()
	return resp, err
}

// Delete implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) Delete(ctx context.Context, req *item.DeleteReq) (resp *item.DeleteResp, err error) {
	resp, err = handler.NewDeleteHandler(ctx, req).Delete()
	return resp, err
}

// Online implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) Online(ctx context.Context, req *item.OnlineReq) (resp *item.OnlineResp, err error) {
	resp, err = handler.NewOnlineHandler(ctx, req).Online()
	return resp, err
}

// Offline implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) Offline(ctx context.Context, req *item.OfflineReq) (resp *item.OfflineResp, err error) {
	resp, err = handler.NewOfflineHandler(ctx, req).Offline()
	return resp, err
}

// Get implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) Get(ctx context.Context, req *item.GetReq) (resp *item.GetResp, err error) {
	resp, err = handler.NewGetHandler(ctx, req).Get()
	return resp, err
}

// Search implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) Search(ctx context.Context, req *item.SearchReq) (resp *item.SearchResp, err error) {
	resp, err = handler.NewSearchHandler(ctx, req).Search()
	return resp, err
}

// List implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) List(ctx context.Context, req *item.ListReq) (resp *item.ListResp, err error) {
	resp, err = handler.NewListHandler(ctx, req).List()
	return resp, err
}

// MGet2C implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) MGet2C(ctx context.Context, req *item.MGet2CReq) (resp *item.MGet2CResp, err error) {
	resp, err = handler.NewMGet2CHandler(ctx, req).MGet()
	return resp, err
}

// DecrStock implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) DecrStock(ctx context.Context, req *item.DecrStockReq) (resp *item.DecrStockResp, err error) {
	resp, err = handler.NewDecrStockHandler(ctx, req).DecrStock()
	return resp, err
}

// DecrStockRevert implements the ItemServiceImpl interface.
func (s *ItemServiceImpl) DecrStockRevert(ctx context.Context, req *item.DecrStockReq) (resp *item.DecrStockResp, err error) {
	resp, err = handler.NewDecrStockRevertHandler(ctx, req).DecrStockRevert()
	return resp, err
}


================================================
FILE: book-shop/app/item/infras/es/client.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package es

import (
	"context"
	"strconv"
	"sync"

	"github.com/bytedance/sonic"
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/olivere/elastic/v7"
)

// ES client
var (
	esOnce sync.Once
	esCli  *elastic.Client
)

// GetESClient get ES client
func GetESClient() *elastic.Client {
	if esCli != nil {
		return esCli
	}

	esOnce.Do(func() {
		cli, err := elastic.NewSimpleClient(
			elastic.SetURL(conf.ESAddress),
		)
		if err != nil {
			panic("new es client failed, err=" + err.Error())
		}
		esCli = cli
	})
	return esCli
}

func UpsertProductES(ctx context.Context, productId int64, product *entity.ProductEntity) error {
	doc := getDocFromEntity(product)
	_, err := GetESClient().Update().Index(conf.ProductESIndex).Id(strconv.FormatInt(productId, 10)).Doc(doc).Upsert(doc).Refresh("true").Do(ctx)
	return err
}

func BatchGetProductById(ctx context.Context, productIds []int64) ([]*entity.ProductEntity, error) {
	mgetSvc := GetESClient().MultiGet()
	for _, id := range productIds {
		mgetSvc.Add(elastic.NewMultiGetItem().
			Index(conf.ProductESIndex).
			Id(strconv.FormatInt(id, 10)))
	}
	rsp, err := mgetSvc.Do(ctx)
	if err != nil {
		return nil, err
	}
	entities := make([]*entity.ProductEntity, 0)
	for _, doc := range rsp.Docs {
		entities = append(entities, getEntityFromSource(string(doc.Source)))
	}
	return entities, nil
}

func SearchProduct(ctx context.Context, filter map[string]interface{}) ([]*entity.ProductEntity, error) {
	boolQuery := elastic.NewBoolQuery()
	for k, v := range filter {
		boolQuery.Must(elastic.NewMatchQuery(k, v))
	}
	searchResult, err := GetESClient().Search().
		Index(conf.ProductESIndex).
		Query(boolQuery).
		Size(10000).
		From(0).
		Do(ctx)
	if err != nil {
		return nil, err
	}
	if searchResult.Hits.TotalHits.Value <= 0 || len(searchResult.Hits.Hits) <= 0 {
		return []*entity.ProductEntity{}, nil
	}
	ret := make([]*entity.ProductEntity, 0)
	for _, hit := range searchResult.Hits.Hits {
		ret = append(ret, getEntityFromSource(string(hit.Source)))
	}
	return ret, nil
}

func getEntityFromSource(source string) *entity.ProductEntity {
	sourceMap := make(map[string]interface{})
	_ = sonic.UnmarshalString(source, &sourceMap)
	ret := &entity.ProductEntity{
		ProductId:   int64(sourceMap["product_id"].(float64)),
		Name:        sourceMap["name"].(string),
		Pic:         sourceMap["pic"].(string),
		Description: sourceMap["description"].(string),
		Property: &entity.PropertyEntity{
			ISBN:     sourceMap["isbn"].(string),
			SpuName:  sourceMap["spu_name"].(string),
			SpuPrice: int64(sourceMap["spu_price"].(float64)),
		},
		Price:  int64(sourceMap["price"].(float64)),
		Stock:  int64(sourceMap["stock"].(float64)),
		Status: int64(sourceMap["status"].(float64)),
	}
	return ret
}

func getDocFromEntity(e *entity.ProductEntity) map[string]interface{} {
	ret := map[string]interface{}{
		"product_id":  e.ProductId,
		"name":        e.Name,
		"pic":         e.Pic,
		"description": e.Description,
		"price":       e.Price,
		"stock":       e.Stock,
		"status":      e.Status,
	}
	if e.Property != nil {
		ret["isbn"] = e.Property.ISBN
		ret["spu_name"] = e.Property.SpuName
		ret["spu_price"] = e.Property.SpuPrice
	}
	return ret
}


================================================
FILE: book-shop/app/item/infras/init.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package infras

import "github.com/cloudwego/biz-demo/book-shop/app/item/infras/repository"

func Init() {
	repository.Init()
}


================================================
FILE: book-shop/app/item/infras/repository/converter/product_do_2_po.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package converter

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/po"
)

type productDO2POConverter struct{}

var ProductDO2POConverter = &productDO2POConverter{}

func (converter *productDO2POConverter) Convert2po(ctx context.Context, do *entity.ProductEntity) (*po.Product, error) {
	po := &po.Product{
		ProductId:   do.ProductId,
		Name:        do.Name,
		Pic:         do.Pic,
		Description: do.Description,
		ISBN:        "",
		SpuName:     "",
		SpuPrice:    0,
		Price:       do.Price,
		Stock:       do.Stock,
		Status:      do.Status,
	}
	if do.Property != nil {
		po.ISBN = do.Property.ISBN
		po.SpuName = do.Property.SpuName
		po.SpuPrice = do.Property.SpuPrice
	}

	return po, nil
}


================================================
FILE: book-shop/app/item/infras/repository/converter/product_po_2_do.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package converter

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/po"
)

type productPO2DOConverter struct{}

var ProductPO2DOConverter = productPO2DOConverter{}

func (converter *productPO2DOConverter) Convert2do(ctx context.Context, po *po.Product) (*entity.ProductEntity, error) {
	do := &entity.ProductEntity{
		ProductId:   po.ProductId,
		Name:        po.Name,
		Pic:         po.Pic,
		Description: po.Description,
		Property: &entity.PropertyEntity{
			ISBN:     po.ISBN,
			SpuName:  po.SpuName,
			SpuPrice: po.SpuPrice,
		},
		Price:  po.Price,
		Stock:  po.Stock,
		Status: po.Status,
	}

	return do, nil
}


================================================
FILE: book-shop/app/item/infras/repository/differ/po_diff.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package differ

import (
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/po"
	"github.com/r3labs/diff/v2"
)

type productPODiffer struct{}

var ProductPODiffer *productPODiffer

func (differ *productPODiffer) GetChangedMap(origin, target *po.Product) map[string]interface{} {
	d, _ := diff.NewDiffer(diff.TagName("json"))
	changedMap := make(map[string]interface{})
	changeLog, _ := d.Diff(origin, target)
	for _, change := range changeLog {
		if depth := len(change.Path); depth != 1 {
			continue
		}
		if change.Type == diff.UPDATE {
			changedMap[change.Path[0]] = change.To
		}
	}
	return changedMap
}


================================================
FILE: book-shop/app/item/infras/repository/init.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

import (
	"github.com/cloudwego/biz-demo/book-shop/app/item/domain/repository"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

var DB *gorm.DB

func register() {
	productRepository := ProductRepositoryImpl{}
	stockRepository := StockRepositoryImpl{}
	product2CRepository := Product2CRepositoryImpl{}
	repository.GetRegistry().SetProductRepository(productRepository)
	repository.GetRegistry().SetStockRepository(stockRepository)
	repository.GetRegistry().SetProduct2CRepository(product2CRepository)
}

func initDB() {
	var err error
	DB, err = gorm.Open(mysql.Open(conf.MySQLDefaultDSN),
		&gorm.Config{
			PrepareStmt:            true,
			SkipDefaultTransaction: true,
		},
	)
	if err != nil {
		panic(err)
	}
}

func Init() {
	register()
	initDB()
}


================================================
FILE: book-shop/app/item/infras/repository/product_2c_repo_impl.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/app/item/infras/es"
)

type Product2CRepositoryImpl struct{}

func (i Product2CRepositoryImpl) MGetProducts2C(ctx context.Context, productIds []int64) ([]*entity.ProductEntity, error) {
	entities, err := es.BatchGetProductById(ctx, productIds)
	return entities, err
}

func (i Product2CRepositoryImpl) SearchProducts(ctx context.Context, name, description, spuName *string) ([]*entity.ProductEntity, error) {
	filterMap := make(map[string]interface{})
	if name != nil {
		filterMap["name"] = *name
	}
	if description != nil {
		filterMap["description"] = *description
	}
	if spuName != nil {
		filterMap["spu_name"] = *spuName
	}
	entities, err := es.SearchProduct(ctx, filterMap)
	return entities, err
}


================================================
FILE: book-shop/app/item/infras/repository/product_repo_impl.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

import (
	"context"
	"errors"

	"github.com/cloudwego/kitex/pkg/klog"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/entity"
	"github.com/cloudwego/biz-demo/book-shop/app/item/common/po"
	"github.com/cloudwego/biz-demo/book-shop/app/item/infras/es"
	"github.com/cloudwego/biz-demo/book-shop/app/item/infras/repository/converter"
	"github.com/cloudwego/biz-demo/book-shop/app/item/infras/repository/differ"
)

type ProductRepositoryImpl struct{}

func (i ProductRepositoryImpl) AddProduct(ctx context.Context, product *entity.ProductEntity) error {
	if product == nil {
		return errors.New("插入数据不可为空")
	}
	po, err := converter.ProductDO2POConverter.Convert2po(ctx, product)
	if err != nil {
		return err
	}
	// update es async
	go func() {
		err := es.UpsertProductES(ctx, po.ProductId, product)
		if err != nil {
			klog.CtxErrorf(ctx, "UpsertProductES err: %v", err)
		}
	}()
	return DB.WithContext(ctx).Create(po).Error
}

func (i ProductRepositoryImpl) UpdateProduct(ctx context.Context, origin, target *entity.ProductEntity) error {
	productId := target.ProductId
	originPO, err := converter.ProductDO2POConverter.Convert2po(ctx, origin)
	if err != nil {
		return err
	}
	targetPO, err := converter.ProductDO2POConverter.Convert2po(ctx, target)
	if err != nil {
		return err
	}
	// update es async
	go func() {
		err := es.UpsertProductES(ctx, productId, target)
		if err != nil {
			klog.CtxErrorf(ctx, "UpsertProductES err: %v", err)
		}
	}()
	changeMap := differ.ProductPODiffer.GetChangedMap(originPO, targetPO)
	return DB.WithContext(ctx).Model(&po.Product{}).Where("product_id = ?", productId).
		Updates(changeMap).Error
}

func (i ProductRepositoryImpl) GetProductById(ctx context.Context, productId int64) (*entity.ProductEntity, error) {
	products := make([]*po.Product, 0)
	err := DB.WithContext(ctx).Where("product_id = ?", productId).Find(&products).Error
	if err != nil {
		return nil, err
	}
	if len(products) == 0 {
		return nil, errors.New("该商品不存在")
	}
	do, err := converter.ProductPO2DOConverter.Convert2do(ctx, products[0])
	if err != nil {
		return nil, err
	}
	return do, nil
}

func (i ProductRepositoryImpl) ListProducts(ctx context.Context, filterParam map[string]interface{}) ([]*entity.ProductEntity, error) {
	products := make([]*po.Product, 0)
	productEntities := make([]*entity.ProductEntity, 0)
	DB = DB.Debug().WithContext(ctx)
	for k, v := range filterParam {
		DB = DB.Where(k+" = ?", v)
	}
	if err := DB.Find(&products).Error; err != nil {
		return nil, err
	}
	for _, v := range products {
		entity, err := converter.ProductPO2DOConverter.Convert2do(ctx, v)
		if err != nil {
			return nil, err
		}
		productEntities = append(productEntities, entity)
	}
	return productEntities, nil
}


================================================
FILE: book-shop/app/item/infras/repository/stock_repo_impl.go
================================================
// Copyright 2023 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package repository

import (
	"context"
	"errors"

	"github.com/cloudwego/biz-demo/book-shop/app/item/common/po"
	"gorm.io/gorm/clause"
)

type StockRepositoryImpl struct{}

func (i StockRepositoryImpl) IncrStock(ctx context.Context, productId, stockNum int64) error {
	return i.updateStock(ctx, productId, stockNum, "incr")
}

func (i StockRepositoryImpl) DecrStock(ctx context.Context, productId, stockNum int64) error {
	return i.updateStock(ctx, productId, stockNum, "decr")
}

func (i StockRepositoryImpl) updateStock(ctx context.Context, productId, stockNum int64, updateType string) error {
	productPOArr := make([]*po.Product, 0)

	tx := DB.Begin().WithContext(ctx)
	if tx.Error != nil {
		return tx.Error
	}
	// select for update
	if err := tx.Clauses(clause.Locking{Strength: "Update"}).Where("product_id = ?", productId).Find(&productPOArr).Error; err != nil {
		tx.Rollback()
		return err
	}
	if len(productPOArr) == 0 {
		tx.Rollback()
		return errors.New("item not found")
	}

	productPO := productPOArr[0]
	curStockNum := productPO.Stock
	if updateType == "incr" {
		curStockNum += stockNum
	} else if updateType == "decr" {
		curStockNum -= stockNum
	}
	if curStockNum < 0 {
		tx.Rollback()
		return errors.New("库存不足")
	}
	if err := tx.Model(&po.Product{}).Where("product_id = ?", productId).
		Updates(map[string]interface{}{
			"stock": curStockNum,
		}).Error; err != nil {
		tx.Rollback()
		return err
	}

	tx.Commit()
	return nil
}


================================================
FILE: book-shop/app/item/main.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package main

import (
	"log"
	"net"

	"github.com/cloudwego/biz-demo/book-shop/app/item/infras"
	item "github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item/itemservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/kitex/pkg/rpcinfo"
	"github.com/cloudwego/kitex/server"
	etcd "github.com/kitex-contrib/registry-etcd"
)

func Init() {
	infras.Init()
}

func main() {
	Init()

	r, err := etcd.NewEtcdRegistry([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}
	addr, err := net.ResolveTCPAddr("tcp", conf.ItemServiceAddress)
	if err != nil {
		panic(err)
	}
	svr := item.NewServer(new(ItemServiceImpl),
		server.WithServerBasicInfo(&rpcinfo.EndpointBasicInfo{ServiceName: conf.ItemRpcServiceName}), // server name
		server.WithServiceAddr(addr), // address
		server.WithRegistry(r),       // registry
	)

	err = svr.Run()
	if err != nil {
		log.Println(err.Error())
	}
}


================================================
FILE: book-shop/app/item/script/bootstrap.sh
================================================
#! /usr/bin/env bash
CURDIR=$(cd $(dirname $0); pwd)

if [ "X$1" != "X" ]; then
    RUNTIME_ROOT=$1
else
    RUNTIME_ROOT=${CURDIR}
fi

export KITEX_RUNTIME_ROOT=$RUNTIME_ROOT
export KITEX_LOG_DIR="$RUNTIME_ROOT/log"

if [ ! -d "$KITEX_LOG_DIR/app" ]; then
    mkdir -p "$KITEX_LOG_DIR/app"
fi

if [ ! -d "$KITEX_LOG_DIR/rpc" ]; then
    mkdir -p "$KITEX_LOG_DIR/rpc"
fi

exec "$CURDIR/bin/cwg.bookshop.item"


================================================
FILE: book-shop/app/order/build.sh
================================================
#!/usr/bin/env bash
RUN_NAME="cwg.bookshop.order"

mkdir -p output/bin
cp script/* output/
chmod +x output/bootstrap.sh

if [ "$IS_SYSTEM_TEST_ENV" != "1" ]; then
    go build -o output/bin/${RUN_NAME}
else
    go test -c -covermode=set -o output/bin/${RUN_NAME} -coverpkg=./...
fi


================================================
FILE: book-shop/app/order/common/converter.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package common

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/order/dal/client"
	"github.com/cloudwego/biz-demo/book-shop/app/order/dal/db"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/order"
	"github.com/cloudwego/biz-demo/book-shop/pkg/utils"
)

func ConvertCreateReq2PO(ctx context.Context, req *order.CreateOrderReq) (*db.Order, error) {
	orderId, err := utils.GenerateID()
	if err != nil {
		return nil, err
	}
	snapshot, err := client.GetProductSnapshot(ctx, req.GetProductId())
	if err != nil {
		return nil, err
	}

	ret := &db.Order{
		OrderId:         orderId,
		UserId:          req.UserId,
		Address:         req.Address,
		ProductId:       req.ProductId,
		StockNum:        req.StockNum,
		ProductSnapshot: snapshot,
		Status:          int64(order.Status_Finish),
	}
	return ret, nil
}

func ConvertPO2DTO(ctx context.Context, po *db.Order) *order.OrderItem {
	ret := &order.OrderItem{
		OrderId:         po.OrderId,
		UserId:          po.UserId,
		UserName:        "",
		Address:         po.Address,
		ProductId:       po.ProductId,
		StockNum:        po.StockNum,
		ProductSnapshot: po.ProductSnapshot,
		Status:          order.Status(po.Status),
		CreateTime:      po.CreatedAt.Unix(),
		UpdateTime:      po.UpdatedAt.Unix(),
	}
	userName, err := client.GetUserName(ctx, po.UserId)
	if err == nil {
		ret.UserName = userName
	}

	return ret
}


================================================
FILE: book-shop/app/order/dal/client/init.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package client

func Init() {
	initItemRpc()
	initUserRpc()
}


================================================
FILE: book-shop/app/order/dal/client/item.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package client

import (
	"context"
	"errors"
	"time"

	"github.com/bytedance/sonic"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/item/itemservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/kitex/client"
	"github.com/cloudwego/kitex/pkg/retry"
	etcd "github.com/kitex-contrib/registry-etcd"
)

var itemClient itemservice.Client

func initItemRpc() {
	r, err := etcd.NewEtcdResolver([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}

	c, err := itemservice.NewClient(
		conf.ItemRpcServiceName,
		client.WithRPCTimeout(3*time.Second),              // rpc timeout
		client.WithConnectTimeout(50*time.Millisecond),    // conn timeout
		client.WithFailureRetry(retry.NewFailurePolicy()), // retry
		client.WithResolver(r),                            // resolver
	)
	if err != nil {
		panic(err)
	}
	itemClient = c
}

func DecreaseStock(ctx context.Context, productId, stockNum int64) error {
	req := &item.DecrStockReq{
		ProductId: productId,
		StockNum:  stockNum,
	}
	resp, err := itemClient.DecrStock(ctx, req)
	if err != nil {
		return err
	}
	if resp.BaseResp.StatusCode != 0 {
		return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return nil
}

func DecreaseStockRevert(ctx context.Context, productId, stockNum int64) error {
	req := &item.DecrStockReq{
		ProductId: productId,
		StockNum:  stockNum,
	}
	resp, err := itemClient.DecrStockRevert(ctx, req)
	if err != nil {
		return err
	}
	if resp.BaseResp.StatusCode != 0 {
		return errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	return nil
}

func GetProductSnapshot(ctx context.Context, productId int64) (string, error) {
	req := &item.MGet2CReq{ProductIds: []int64{productId}}
	resp, err := itemClient.MGet2C(ctx, req)
	if err != nil {
		return "", err
	}
	if resp.BaseResp.StatusCode != 0 {
		return "", errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	if _, ok := resp.ProductMap[productId]; !ok {
		return "", errors.New("该商品不存在")
	}
	productStr, err := sonic.MarshalString(resp.ProductMap[productId])
	if err != nil {
		return "", err
	}
	return productStr, nil
}


================================================
FILE: book-shop/app/order/dal/client/user.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package client

import (
	"context"
	"time"

	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user/userservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
	"github.com/cloudwego/kitex/client"
	"github.com/cloudwego/kitex/pkg/retry"
	etcd "github.com/kitex-contrib/registry-etcd"
)

var userClient userservice.Client

func initUserRpc() {
	r, err := etcd.NewEtcdResolver([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}

	c, err := userservice.NewClient(
		conf.UserRpcServiceName,
		client.WithRPCTimeout(3*time.Second),              // rpc timeout
		client.WithConnectTimeout(50*time.Millisecond),    // conn timeout
		client.WithFailureRetry(retry.NewFailurePolicy()), // retry
		client.WithResolver(r),                            // resolver
	)
	if err != nil {
		panic(err)
	}
	userClient = c
}

func GetUserName(ctx context.Context, userId int64) (string, error) {
	req := &user.MGetUserReq{Ids: []int64{userId}}
	resp, err := userClient.MGetUser(ctx, req)
	if err != nil {
		return "", err
	}
	if resp.BaseResp.StatusCode != 0 {
		return "", errno.NewErrNo(int64(resp.BaseResp.StatusCode), resp.BaseResp.StatusMessage)
	}
	if len(resp.Users) > 0 {
		return resp.Users[0].UserName, nil
	}
	return "", nil
}


================================================
FILE: book-shop/app/order/dal/db/init.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package db

import (
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

var DB *gorm.DB

// Init init DB
func Init() {
	var err error
	DB, err = gorm.Open(mysql.Open(conf.MySQLDefaultDSN),
		&gorm.Config{
			PrepareStmt:            true,
			SkipDefaultTransaction: true,
		},
	)
	if err != nil {
		panic(err)
	}
}


================================================
FILE: book-shop/app/order/dal/db/order.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package db

import (
	"context"
	"errors"

	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"gorm.io/gorm"
)

type Order struct {
	gorm.Model
	OrderId         int64  `json:"order_id"`
	UserId          int64  `json:"user_id"`
	Address         string `json:"address"`
	ProductId       int64  `json:"product_id"`
	StockNum        int64  `json:"stock_num"`
	ProductSnapshot string `json:"product_snapshot"`
	Status          int64  `json:"status"`
}

func (o *Order) TableName() string {
	return conf.OrderTableName
}

func CreateOrder(ctx context.Context, orders []*Order) error {
	return DB.WithContext(ctx).Create(orders).Error
}

func UpdateOrder(ctx context.Context, orderId int64, updateMap map[string]interface{}) error {
	return DB.WithContext(ctx).Model(&Order{}).Where("order_id = ?", orderId).
		Updates(updateMap).Error
}

func ListOrders(ctx context.Context, filterMap map[string]interface{}) ([]*Order, error) {
	res := make([]*Order, 0)
	db := DB.WithContext(ctx)
	for k, v := range filterMap {
		db = db.Where(k+" = ?", v)
	}
	err := db.Find(&res).Error
	if err != nil {
		return nil, err
	}
	return res, nil
}

func GetOrderById(ctx context.Context, orderId int64) (*Order, error) {
	res := make([]*Order, 0)
	err := DB.WithContext(ctx).Where("order_id = ?", orderId).Find(&res).Error
	if err != nil && err != gorm.ErrRecordNotFound {
		return nil, err
	}
	if len(res) == 0 {
		return nil, errors.New("不存在该订单")
	}
	return res[0], nil
}


================================================
FILE: book-shop/app/order/handler.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package main

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/order/common"
	"github.com/cloudwego/biz-demo/book-shop/app/order/module"
	order "github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/order"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

// OrderServiceImpl implements the last service interface defined in the IDL.
type OrderServiceImpl struct{}

// CreateOrder implements the OrderServiceImpl interface.
func (s *OrderServiceImpl) CreateOrder(ctx context.Context, req *order.CreateOrderReq) (resp *order.CreateOrderResp, err error) {
	resp = order.NewCreateOrderResp()
	updateModule := module.NewUpdateModule(ctx)
	err = updateModule.CreateOrder(req)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	resp.BaseResp = errno.BuildBaseResp(errno.Success)
	return resp, nil
}

// CancelOrder implements the OrderServiceImpl interface.
func (s *OrderServiceImpl) CancelOrder(ctx context.Context, req *order.CancelOrderReq) (resp *order.CancelOrderResp, err error) {
	resp = order.NewCancelOrderResp()
	updateModule := module.NewUpdateModule(ctx)
	err = updateModule.CancelOrder(req)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	resp.BaseResp = errno.BuildBaseResp(errno.Success)
	return resp, nil
}

// ListOrder implements the OrderServiceImpl interface.
func (s *OrderServiceImpl) ListOrder(ctx context.Context, req *order.ListOrderReq) (resp *order.ListOrderResp, err error) {
	resp = order.NewListOrderResp()
	queryModule := module.NewQueryModule(ctx)
	pos, err := queryModule.ListOrder(req.UserId, (*int64)(req.Status))
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	orders := make([]*order.OrderItem, 0)
	for _, v := range pos {
		orders = append(orders, common.ConvertPO2DTO(ctx, v))
	}
	resp.Orders = orders
	resp.BaseResp = errno.BuildBaseResp(errno.Success)
	return resp, nil
}

// GetOrderById implements the OrderServiceImpl interface.
func (s *OrderServiceImpl) GetOrderById(ctx context.Context, req *order.GetOrderByIdReq) (resp *order.GetOrderByIdResp, err error) {
	resp = order.NewGetOrderByIdResp()
	queryModule := module.NewQueryModule(ctx)
	po, err := queryModule.GetOrderById(req.OrderId)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	resp.Order = common.ConvertPO2DTO(ctx, po)
	resp.BaseResp = errno.BuildBaseResp(errno.Success)
	return resp, nil
}


================================================
FILE: book-shop/app/order/main.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package main

import (
	"net"

	"github.com/cloudwego/biz-demo/book-shop/app/order/dal/client"
	"github.com/cloudwego/biz-demo/book-shop/app/order/dal/db"
	order "github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/order/orderservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/kitex/pkg/klog"
	"github.com/cloudwego/kitex/pkg/rpcinfo"
	"github.com/cloudwego/kitex/server"
	etcd "github.com/kitex-contrib/registry-etcd"
)

func Init() {
	client.Init()
	db.Init()
}

func main() {
	Init()
	r, err := etcd.NewEtcdRegistry([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}
	addr, err := net.ResolveTCPAddr("tcp", conf.OrderServiceAddress)
	if err != nil {
		panic(err)
	}
	svr := order.NewServer(new(OrderServiceImpl),
		server.WithServerBasicInfo(&rpcinfo.EndpointBasicInfo{ServiceName: conf.OrderRpcServiceName}), // server name
		server.WithServiceAddr(addr), // address
		server.WithRegistry(r),       // registry
	)
	err = svr.Run()
	if err != nil {
		klog.Fatal(err)
	}
}


================================================
FILE: book-shop/app/order/module/order_query_module.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package module

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/order/dal/db"
)

type QueryModule struct {
	ctx context.Context
}

func NewQueryModule(ctx context.Context) QueryModule {
	return QueryModule{
		ctx: ctx,
	}
}

func (m QueryModule) ListOrder(userId int64, status *int64) ([]*db.Order, error) {
	filter := make(map[string]interface{})
	filter["user_id"] = userId
	if status != nil {
		filter["status"] = *status
	}
	res, err := db.ListOrders(m.ctx, filter)
	return res, err
}

func (m QueryModule) GetOrderById(orderId int64) (*db.Order, error) {
	po, err := db.GetOrderById(m.ctx, orderId)
	return po, err
}


================================================
FILE: book-shop/app/order/module/order_update_module.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package module

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/order/common"
	"github.com/cloudwego/biz-demo/book-shop/app/order/dal/client"
	"github.com/cloudwego/biz-demo/book-shop/app/order/dal/db"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/order"
)

type UpdateModule struct {
	ctx context.Context
}

func NewUpdateModule(ctx context.Context) UpdateModule {
	return UpdateModule{
		ctx: ctx,
	}
}

func (m UpdateModule) CreateOrder(req *order.CreateOrderReq) error {
	po, err := common.ConvertCreateReq2PO(m.ctx, req)
	if err != nil {
		return err
	}
	// 扣减库存
	err = client.DecreaseStock(m.ctx, req.ProductId, req.StockNum)
	if err != nil {
		return err
	}
	poList := make([]*db.Order, 0)
	poList = append(poList, po)
	// 插入数据
	err = db.CreateOrder(m.ctx, poList)
	if err != nil {
		// 回滚
		m.createRollback(req)
		return err
	}
	return nil
}

func (m UpdateModule) createRollback(req *order.CreateOrderReq) {
	_ = client.DecreaseStockRevert(m.ctx, req.ProductId, req.StockNum)
}

func (m UpdateModule) CancelOrder(req *order.CancelOrderReq) error {
	updateMap := map[string]interface{}{
		"status": int64(order.Status_Cancel),
	}
	orderPO, err := db.GetOrderById(m.ctx, req.OrderId)
	if err != nil {
		return err
	}
	// 库存返还
	err = client.DecreaseStockRevert(m.ctx, orderPO.ProductId, orderPO.StockNum)
	if err != nil {
		return err
	}
	// 修改状态
	err = db.UpdateOrder(m.ctx, req.OrderId, updateMap)
	if err != nil {
		m.cancelRollback(orderPO.ProductId, orderPO.StockNum)
		return err
	}
	return nil
}

func (m UpdateModule) cancelRollback(productId, stockNum int64) {
	_ = client.DecreaseStock(m.ctx, productId, stockNum)
}


================================================
FILE: book-shop/app/order/script/bootstrap.sh
================================================
#! /usr/bin/env bash
CURDIR=$(cd $(dirname $0); pwd)

if [ "X$1" != "X" ]; then
    RUNTIME_ROOT=$1
else
    RUNTIME_ROOT=${CURDIR}
fi

export KITEX_RUNTIME_ROOT=$RUNTIME_ROOT
export KITEX_LOG_DIR="$RUNTIME_ROOT/log"

if [ ! -d "$KITEX_LOG_DIR/app" ]; then
    mkdir -p "$KITEX_LOG_DIR/app"
fi

if [ ! -d "$KITEX_LOG_DIR/rpc" ]; then
    mkdir -p "$KITEX_LOG_DIR/rpc"
fi

exec "$CURDIR/bin/cwg.bookshop.order"


================================================
FILE: book-shop/app/user/build.sh
================================================
#!/usr/bin/env bash
RUN_NAME="cwg.bookshop.user"

mkdir -p output/bin
cp script/* output/
chmod +x output/bootstrap.sh

if [ "$IS_SYSTEM_TEST_ENV" != "1" ]; then
    go build -o output/bin/${RUN_NAME}
else
    go test -c -covermode=set -o output/bin/${RUN_NAME} -coverpkg=./...
fi


================================================
FILE: book-shop/app/user/handler.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package main

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/app/user/service"
	user "github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

// UserServiceImpl implements the last service interface defined in the IDL.
type UserServiceImpl struct{}

// CreateUser implements the UserServiceImpl interface.
func (s *UserServiceImpl) CreateUser(ctx context.Context, req *user.CreateUserReq) (resp *user.CreateUserResp, err error) {
	resp = user.NewCreateUserResp()

	if len(req.GetUserName()) == 0 || len(req.GetPassword()) == 0 {
		resp.BaseResp = errno.BuildBaseResp(errno.ParamErr)
		return resp, nil
	}

	err = service.NewUserService(ctx).CreateUser(req)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	resp.BaseResp = errno.BuildBaseResp(errno.Success)
	return resp, nil
}

// MGetUser implements the UserServiceImpl interface.
func (s *UserServiceImpl) MGetUser(ctx context.Context, req *user.MGetUserReq) (resp *user.MGetUserResp, err error) {
	resp = user.NewMGetUserResp()

	if len(req.Ids) == 0 {
		resp.BaseResp = errno.BuildBaseResp(errno.ParamErr)
		return resp, nil
	}

	users, err := service.NewUserService(ctx).MGetUser(req)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	resp.Users = users
	resp.BaseResp = errno.BuildBaseResp(errno.Success)
	return resp, nil
}

// CheckUser implements the UserServiceImpl interface.
func (s *UserServiceImpl) CheckUser(ctx context.Context, req *user.CheckUserReq) (resp *user.CheckUserResp, err error) {
	resp = user.NewCheckUserResp()

	if len(req.Password) == 0 || len(req.UserName) == 0 {
		resp.BaseResp = errno.BuildBaseResp(errno.ParamErr)
		return resp, nil
	}

	userId, err := service.NewUserService(ctx).CheckUser(req)
	if err != nil {
		resp.BaseResp = errno.BuildBaseResp(err)
		return resp, nil
	}
	resp.UserId = userId
	resp.BaseResp = errno.BuildBaseResp(errno.Success)
	return resp, nil
}


================================================
FILE: book-shop/app/user/infras/db/init.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package db

import (
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

var DB *gorm.DB

// Init init DB
func Init() {
	var err error
	DB, err = gorm.Open(mysql.Open(conf.MySQLDefaultDSN),
		&gorm.Config{
			PrepareStmt:            true,
			SkipDefaultTransaction: true,
		},
	)
	if err != nil {
		panic(err)
	}
}


================================================
FILE: book-shop/app/user/infras/db/user.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package db

import (
	"context"

	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	UserName string `json:"user_name"`
	Password string `json:"password"`
}

func (u *User) TableName() string {
	return conf.UserTableName
}

// MGetUsers multiple get list of user info
func MGetUsers(ctx context.Context, userIDs []int64) ([]*User, error) {
	res := make([]*User, 0)
	if len(userIDs) == 0 {
		return res, nil
	}

	if err := DB.WithContext(ctx).Where("id in ?", userIDs).Find(&res).Error; err != nil {
		return nil, err
	}
	return res, nil
}

// CreateUser create user info
func CreateUser(ctx context.Context, users []*User) error {
	return DB.WithContext(ctx).Create(users).Error
}

// QueryUser query list of user info
func QueryUser(ctx context.Context, userName string) ([]*User, error) {
	res := make([]*User, 0)
	err := DB.WithContext(ctx).Where("user_name = ?", userName).Find(&res).Error
	if err != nil && err != gorm.ErrRecordNotFound {
		return nil, err
	}
	return res, nil
}


================================================
FILE: book-shop/app/user/infras/redis/client.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package redis

import (
	"strconv"
	"time"

	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	redigo "github.com/gomodule/redigo/redis"
)

var pool *redigo.Pool

func init() {
	pool = &redigo.Pool{
		Dial: func() (redigo.Conn, error) {
			c, err := redigo.Dial("tcp", conf.RedisAddress,
				redigo.DialConnectTimeout(500*time.Millisecond),
				redigo.DialReadTimeout(500*time.Millisecond),
				redigo.DialWriteTimeout(500*time.Millisecond))
			if err != nil {
				return nil, err
			}
			return c, nil
		},
		MaxIdle: conf.RedisConnPoolSize,
	}
}

func GetClient() redigo.Conn {
	return pool.Get()
}

func Upsert(userId int64, userInfo string) error {
	c := GetClient()
	defer c.Close()

	_, err := c.Do("SET", conf.RedisKey_User+strconv.FormatInt(userId, 10), userInfo)
	return err
}

func Del(userId int64) error {
	c := GetClient()
	defer c.Close()

	_, err := c.Do("DEL", conf.RedisKey_User+strconv.FormatInt(userId, 10))
	return err
}

func IsExist(userId int64) (bool, error) {
	c := GetClient()
	defer c.Close()

	isExist, err := redigo.Bool(c.Do("EXISTS", conf.RedisKey_User+strconv.FormatInt(userId, 10)))
	return isExist, err
}

func MGet(userIds []int64) ([]string, error) {
	c := GetClient()
	defer c.Close()

	keys := make([]interface{}, 0)
	for _, id := range userIds {
		keys = append(keys, conf.RedisKey_User+strconv.FormatInt(id, 10))
	}

	ret, err := redigo.Strings(c.Do("MGET", keys...))
	return ret, err
}


================================================
FILE: book-shop/app/user/main.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package main

import (
	"net"

	"github.com/cloudwego/biz-demo/book-shop/app/user/infras/db"
	user "github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user/userservice"
	"github.com/cloudwego/biz-demo/book-shop/pkg/conf"
	"github.com/cloudwego/kitex/pkg/klog"
	"github.com/cloudwego/kitex/pkg/rpcinfo"
	"github.com/cloudwego/kitex/server"
	etcd "github.com/kitex-contrib/registry-etcd"
)

func Init() {
	db.Init()
}

func main() {
	Init()
	r, err := etcd.NewEtcdRegistry([]string{conf.EtcdAddress})
	if err != nil {
		panic(err)
	}
	addr, err := net.ResolveTCPAddr("tcp", conf.UserServiceAddress)
	if err != nil {
		panic(err)
	}

	svr := user.NewServer(new(UserServiceImpl),
		server.WithServerBasicInfo(&rpcinfo.EndpointBasicInfo{ServiceName: conf.UserRpcServiceName}), // server name
		server.WithServiceAddr(addr), // address
		server.WithRegistry(r),       // registry
	)
	err = svr.Run()
	if err != nil {
		klog.Fatal(err)
	}
}


================================================
FILE: book-shop/app/user/script/bootstrap.sh
================================================
#! /usr/bin/env bash
CURDIR=$(cd $(dirname $0); pwd)

if [ "X$1" != "X" ]; then
    RUNTIME_ROOT=$1
else
    RUNTIME_ROOT=${CURDIR}
fi

export KITEX_RUNTIME_ROOT=$RUNTIME_ROOT
export KITEX_LOG_DIR="$RUNTIME_ROOT/log"

if [ ! -d "$KITEX_LOG_DIR/app" ]; then
    mkdir -p "$KITEX_LOG_DIR/app"
fi

if [ ! -d "$KITEX_LOG_DIR/rpc" ]; then
    mkdir -p "$KITEX_LOG_DIR/rpc"
fi

exec "$CURDIR/bin/cwg.bookshop.user"


================================================
FILE: book-shop/app/user/service/user_service.go
================================================
// Copyright 2022 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package service

import (
	"context"
	"crypto/md5"
	"fmt"
	"io"

	"github.com/bytedance/sonic"
	"github.com/cloudwego/biz-demo/book-shop/app/user/infras/db"
	"github.com/cloudwego/biz-demo/book-shop/app/user/infras/redis"
	"github.com/cloudwego/biz-demo/book-shop/kitex_gen/cwg/bookshop/user"
	"github.com/cloudwego/biz-demo/book-shop/pkg/errno"
)

type UserService struct {
	ctx context.Context
}

func NewUserService(ctx context.Context) *UserService {
	return &UserService{
		ctx: ctx,
	}
}

func (s *UserService) CreateUser(req *user.CreateUserReq) error {
	users, err := db.QueryUser(s.ctx, req.GetUserName())
	if err != nil {
		return err
	}
	if len(users) != 0 {
		return errno.UserAlreadyExistErr
	}

	h := md5.New()
	if _, err = io.WriteString(h, req.Password); err != nil {
		return err
	}
	passWord := fmt.Sprintf("%x", h.Sum(nil))
	return db.CreateUser(s.ctx, []*db.User{{
		UserName: req.UserName,
		Password: passWord,
	}})
}

// MGetUser using cache mode: Cache Aside
func (s *UserService) MGetUser(req *user.MGetUserReq) ([]*user.User, error) {
	ret := make([]*user.User, 0)
	idNotCached := make([]int64, 0)

	userInfoStr, err := redis.MGet(req.GetIds())
	// 降级
	if err != nil || userInfoStr == nil {
		idNotCached = req.Ids
	} else {
		for index, item := range userInfoStr {
			if item == "" {
				idNotCached = append(idNotCached, req.GetIds()[index])
			} else {
				ret = append(ret, s.getDtoFromString(item))
			}
		}
	}

	users, err := db.MGetUsers(s.ctx, idNotCached)
	if err != nil {
		return nil, err
	}

	for _, userModel := range users {
		userCur := &user.User{
			UserId:   int64(userModel.ID),
			UserName: userModel.UserName,
		}
		ret = append(ret, userCur)

		str, _ := sonic.MarshalString(userCur)

		_ = redis.Upsert(int64(userModel.ID), str)
	}
	return ret, nil
}

func (s *UserService) CheckUser(req *user.CheckUserReq) (int64, error) {
	h := md5.New()
	if _, err := io.WriteString(h, req.Password); err != nil {
		return 0, err
	}
	passWord := fmt.Sprintf("%x", h.Sum(nil))

	userName := req.UserName
	users, err := db.QueryUser(s.ctx, userName)
	if err != nil {
		return 0, err
	}
	if len(users) == 0 {
		return 0, errno.UserNotExistErr
	}
	u := users[0]
	if u.Password != passWord {
		return 0, errno.LoginErr
	}
	return int64(u.ID), nil
}

func (s *UserService) getDtoFromString(userInfo string) *user.User {
	ret := &user.User{}
	_ = sonic.UnmarshalString(userInfo, ret)
	return ret
}


================================================
FILE: book-shop/deploy/mysql/init.sql
================================================
create table `t_user`
(
    `id`         bigint unsigned auto_increment,
    `created_at` datetime(3) NULL,
    `updated_at` datetime(3) NULL,
    `deleted_at` datetime(3) NULL,
    `user_name`  varchar(128) NOT NULL DEFAULT '',
    `password`   varchar(128) NOT NULL DEFAULT '',
    PRIMARY KEY (`id`),
    KEY        `idx_username` (`user_name`) COMMENT 'username index'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='user account table';

create table `t_product`
(
    `id`          bigint unsigned auto_increment,
    `created_at`  datetime(3) NULL,
    `updated_at`  datetime(3) NULL,
    `deleted_at`  datetime(3) NULL,
    `product_id`  bigint(20) NOT NULL,
    `name`        varchar(255) NOT NULL DEFAULT '',
    `pic`         varchar(255) NOT NULL DEFAULT '',
    `description` text NULL,
    `isbn`        varchar(255) NOT NULL DEFAULT '',
    `spu_name`    varchar(255) NOT NULL DEFAULT '',
    `spu_price`   int(11) NOT NULL DEFAULT '0',
    `price`       int(11) NOT NULL DEFAULT '0',
    `stock`       int(11) NOT NULL DEFAULT '0',
    `status`      tinyint(4) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    KEY         `idx_product_id` (`product_id`) COMMENT 'product_id index'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='product table';

create table `t_order`
(
    `id`               bigint unsigned auto_increment,
    `created_at`       datetime(3) NULL,
    `updated_at`       datetime(3) NULL,
    `deleted_at`       datetime(3) NULL,
    `order_id`         bigint(20) NOT NULL,
    `user_id`          bigint NOT NULL,
    `address`          text NULL,
    `product_id`       bigint(20) NOT NULL,
    `stock_num`        int(11) NOT NULL DEFAULT '0',
    `product_snapshot` longtext NULL,
    `status`           tinyint(4) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    KEY              `idx_order_id` (`order_id`) COMMENT 'order_id index'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='order table';


================================================
FILE: book-shop/deploy/redis/redis.conf
================================================
# Copyright 2021 CloudWeGo Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

bind 0.0.0.0
protected-mode no
port 6379
tcp-backlog 511
daemonize no
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
always-show-logo yes
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
re
Download .txt
Showing preview only (333K chars total). Download the full file or copy to clipboard to get everything.
gitextract_78o5kfb2/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       ├── pr-check.yml
│       └── tests.yml
├── .gitignore
├── .golangci.yml
├── .licenserc.yaml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── _typos.toml
├── book-shop/
│   ├── Makefile
│   ├── README.md
│   ├── app/
│   │   ├── facade/
│   │   │   ├── handlers/
│   │   │   │   ├── handler_item/
│   │   │   │   │   ├── add.go
│   │   │   │   │   ├── del.go
│   │   │   │   │   ├── edit.go
│   │   │   │   │   ├── get.go
│   │   │   │   │   ├── list.go
│   │   │   │   │   ├── mget2c.go
│   │   │   │   │   ├── offline.go
│   │   │   │   │   ├── online.go
│   │   │   │   │   └── search.go
│   │   │   │   ├── handler_order/
│   │   │   │   │   ├── cancel.go
│   │   │   │   │   ├── create.go
│   │   │   │   │   ├── get.go
│   │   │   │   │   └── list.go
│   │   │   │   └── handler_user/
│   │   │   │       ├── shop_login.go
│   │   │   │       ├── user_login.go
│   │   │   │       └── user_register.go
│   │   │   ├── infras/
│   │   │   │   └── client/
│   │   │   │       ├── init.go
│   │   │   │       ├── item.go
│   │   │   │       ├── order.go
│   │   │   │       └── user.go
│   │   │   ├── main.go
│   │   │   ├── model/
│   │   │   │   └── model.go
│   │   │   └── run.sh
│   │   ├── item/
│   │   │   ├── build.sh
│   │   │   ├── common/
│   │   │   │   ├── constant/
│   │   │   │   │   └── constant.go
│   │   │   │   ├── converter/
│   │   │   │   │   ├── dto_2_entity.go
│   │   │   │   │   └── entity_2_dto.go
│   │   │   │   ├── entity/
│   │   │   │   │   └── product_entity.go
│   │   │   │   └── po/
│   │   │   │       └── product_po.go
│   │   │   ├── domain/
│   │   │   │   ├── repository/
│   │   │   │   │   ├── product_2c_repository.go
│   │   │   │   │   ├── product_repository.go
│   │   │   │   │   ├── repository_registry.go
│   │   │   │   │   └── stock_repository.go
│   │   │   │   └── service/
│   │   │   │       ├── product_query_service.go
│   │   │   │       ├── product_state_service.go
│   │   │   │       ├── product_stock_service.go
│   │   │   │       └── product_update_service.go
│   │   │   ├── handler/
│   │   │   │   ├── add_handler.go
│   │   │   │   ├── decrease_stock_handler.go
│   │   │   │   ├── decrease_stock_revert_handler.go
│   │   │   │   ├── delete_handler.go
│   │   │   │   ├── edit_handler.go
│   │   │   │   ├── get_handler.go
│   │   │   │   ├── list_handler.go
│   │   │   │   ├── mget2c_handler.go
│   │   │   │   ├── offline_handler.go
│   │   │   │   ├── online_handler.go
│   │   │   │   └── search_handler.go
│   │   │   ├── handler.go
│   │   │   ├── infras/
│   │   │   │   ├── es/
│   │   │   │   │   └── client.go
│   │   │   │   ├── init.go
│   │   │   │   └── repository/
│   │   │   │       ├── converter/
│   │   │   │       │   ├── product_do_2_po.go
│   │   │   │       │   └── product_po_2_do.go
│   │   │   │       ├── differ/
│   │   │   │       │   └── po_diff.go
│   │   │   │       ├── init.go
│   │   │   │       ├── product_2c_repo_impl.go
│   │   │   │       ├── product_repo_impl.go
│   │   │   │       └── stock_repo_impl.go
│   │   │   ├── main.go
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   ├── order/
│   │   │   ├── build.sh
│   │   │   ├── common/
│   │   │   │   └── converter.go
│   │   │   ├── dal/
│   │   │   │   ├── client/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── item.go
│   │   │   │   │   └── user.go
│   │   │   │   └── db/
│   │   │   │       ├── init.go
│   │   │   │       └── order.go
│   │   │   ├── handler.go
│   │   │   ├── main.go
│   │   │   ├── module/
│   │   │   │   ├── order_query_module.go
│   │   │   │   └── order_update_module.go
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   └── user/
│   │       ├── build.sh
│   │       ├── handler.go
│   │       ├── infras/
│   │       │   ├── db/
│   │       │   │   ├── init.go
│   │       │   │   └── user.go
│   │       │   └── redis/
│   │       │       └── client.go
│   │       ├── main.go
│   │       ├── script/
│   │       │   └── bootstrap.sh
│   │       └── service/
│   │           └── user_service.go
│   ├── deploy/
│   │   ├── mysql/
│   │   │   └── init.sql
│   │   └── redis/
│   │       └── redis.conf
│   ├── docker-compose.yml
│   ├── docs/
│   │   ├── docs.go
│   │   ├── swagger.json
│   │   └── swagger.yaml
│   ├── go.mod
│   ├── go.sum
│   ├── idl/
│   │   ├── base.thrift
│   │   ├── item.thrift
│   │   ├── order.thrift
│   │   └── user.thrift
│   ├── kitex_gen/
│   │   ├── base/
│   │   │   ├── base.go
│   │   │   ├── k-base.go
│   │   │   └── k-consts.go
│   │   └── cwg/
│   │       └── bookshop/
│   │           ├── item/
│   │           │   ├── item.go
│   │           │   ├── itemservice/
│   │           │   │   ├── client.go
│   │           │   │   ├── invoker.go
│   │           │   │   ├── itemservice.go
│   │           │   │   └── server.go
│   │           │   ├── k-consts.go
│   │           │   └── k-item.go
│   │           ├── order/
│   │           │   ├── k-consts.go
│   │           │   ├── k-order.go
│   │           │   ├── order.go
│   │           │   └── orderservice/
│   │           │       ├── client.go
│   │           │       ├── invoker.go
│   │           │       ├── orderservice.go
│   │           │       └── server.go
│   │           └── user/
│   │               ├── k-consts.go
│   │               ├── k-user.go
│   │               ├── user.go
│   │               └── userservice/
│   │                   ├── client.go
│   │                   ├── invoker.go
│   │                   ├── server.go
│   │                   └── userservice.go
│   ├── licenses/
│   │   ├── LICENSE-copier.txt
│   │   ├── LICENSE-diff.txt
│   │   ├── LICENSE-elastic.txt
│   │   ├── LICENSE-gorm-mysql.txt
│   │   ├── LICENSE-gorm.txt
│   │   ├── LICENSE-redigo.txt
│   │   ├── LICENSE-snowflake.txt
│   │   └── LICENSE-thrift.txt
│   └── pkg/
│       ├── conf/
│       │   └── conf.go
│       ├── errno/
│       │   ├── errno.go
│       │   └── resp.go
│       └── utils/
│           ├── idgen.go
│           └── logutil.go
├── bookinfo/
│   ├── Makefile
│   ├── README.md
│   ├── README_CN.md
│   ├── build/
│   │   └── Dockerfile
│   ├── cmd/
│   │   ├── details/
│   │   │   └── cmd.go
│   │   ├── main.go
│   │   ├── productpage/
│   │   │   └── cmd.go
│   │   ├── ratings/
│   │   │   └── cmd.go
│   │   └── reviews/
│   │       └── cmd.go
│   ├── conf/
│   │   ├── details.yaml
│   │   ├── productpage.yaml
│   │   ├── ratings.yaml
│   │   └── reviews.yaml
│   ├── go.mod
│   ├── go.sum
│   ├── idl/
│   │   ├── base.thrift
│   │   ├── details.thrift
│   │   ├── productpage.thrift
│   │   ├── ratings.thrift
│   │   └── reviews.thrift
│   ├── internal/
│   │   ├── handler/
│   │   │   └── productpage/
│   │   │       └── product.go
│   │   ├── server/
│   │   │   ├── details/
│   │   │   │   ├── options.go
│   │   │   │   ├── server.go
│   │   │   │   ├── wire.go
│   │   │   │   └── wire_gen.go
│   │   │   ├── productpage/
│   │   │   │   ├── options.go
│   │   │   │   ├── server.go
│   │   │   │   ├── wire.go
│   │   │   │   └── wire_gen.go
│   │   │   ├── ratings/
│   │   │   │   ├── options.go
│   │   │   │   ├── server.go
│   │   │   │   ├── wire.go
│   │   │   │   └── wire_gen.go
│   │   │   └── reviews/
│   │   │       ├── options.go
│   │   │       ├── server.go
│   │   │       ├── wire.go
│   │   │       └── wire_gen.go
│   │   └── service/
│   │       ├── details/
│   │       │   └── service.go
│   │       ├── ratings/
│   │       │   └── service.go
│   │       └── reviews/
│   │           └── service.go
│   ├── kitex_gen/
│   │   ├── base/
│   │   │   ├── base.go
│   │   │   ├── k-base.go
│   │   │   └── k-consts.go
│   │   └── cwg/
│   │       └── bookinfo/
│   │           ├── details/
│   │           │   ├── details.go
│   │           │   ├── detailsservice/
│   │           │   │   ├── client.go
│   │           │   │   ├── detailsservice.go
│   │           │   │   ├── invoker.go
│   │           │   │   └── server.go
│   │           │   ├── k-consts.go
│   │           │   └── k-details.go
│   │           ├── product/
│   │           │   ├── k-consts.go
│   │           │   ├── k-productpage.go
│   │           │   ├── productpage.go
│   │           │   └── productpageservice/
│   │           │       ├── client.go
│   │           │       ├── invoker.go
│   │           │       ├── productpageservice.go
│   │           │       └── server.go
│   │           ├── ratings/
│   │           │   ├── k-consts.go
│   │           │   ├── k-ratings.go
│   │           │   ├── ratings.go
│   │           │   └── ratingservice/
│   │           │       ├── client.go
│   │           │       ├── invoker.go
│   │           │       ├── ratingservice.go
│   │           │       └── server.go
│   │           └── reviews/
│   │               ├── k-consts.go
│   │               ├── k-reviews.go
│   │               ├── reviews.go
│   │               └── reviewsservice/
│   │                   ├── client.go
│   │                   ├── invoker.go
│   │                   ├── reviewsservice.go
│   │                   └── server.go
│   ├── licenses/
│   │   ├── LICENSE-cobra.txt
│   │   ├── LICENSE-logrus.txt
│   │   ├── LICENSE-opentelemetry-go.txt
│   │   ├── LICENSE-pflag.txt
│   │   ├── LICENSE-testify.txt
│   │   ├── LICENSE-thrift.txt
│   │   ├── LICENSE-viper.txt
│   │   └── LICENSE-wire.txt
│   ├── manifest/
│   │   └── bookinfo/
│   │       ├── traffic/
│   │       │   ├── bookinfo-gateway.yaml
│   │       │   ├── canary.yaml
│   │       │   ├── destination-rule-all.yaml
│   │       │   ├── virtual-service-ratings-canary.yaml
│   │       │   ├── virtual-service-reviews-50-50.yaml
│   │       │   ├── virtual-service-reviews-80-20.yaml
│   │       │   ├── virtual-service-reviews-canary.yaml
│   │       │   ├── virtual-service-reviews-v1.yaml
│   │       │   └── virtual-service-reviews-v2.yaml
│   │       └── workloads/
│   │           ├── Chart.yaml
│   │           ├── charts/
│   │           │   ├── details/
│   │           │   │   ├── .helmignore
│   │           │   │   ├── Chart.yaml
│   │           │   │   ├── templates/
│   │           │   │   │   ├── NOTES.txt
│   │           │   │   │   ├── details.cm.yaml
│   │           │   │   │   ├── details.svc.yaml
│   │           │   │   │   └── details.yaml
│   │           │   │   └── values.yaml
│   │           │   ├── productpage/
│   │           │   │   ├── .helmignore
│   │           │   │   ├── Chart.yaml
│   │           │   │   ├── templates/
│   │           │   │   │   ├── NOTES.txt
│   │           │   │   │   ├── productpage.cm.yaml
│   │           │   │   │   ├── productpage.svc.yaml
│   │           │   │   │   └── productpage.yaml
│   │           │   │   └── values.yaml
│   │           │   ├── ratings/
│   │           │   │   ├── .helmignore
│   │           │   │   ├── Chart.yaml
│   │           │   │   ├── templates/
│   │           │   │   │   ├── NOTES.txt
│   │           │   │   │   ├── ratings-v1.yaml
│   │           │   │   │   ├── ratings-v2.yaml
│   │           │   │   │   ├── ratings.cm.yaml
│   │           │   │   │   └── ratings.svc.yaml
│   │           │   │   └── values.yaml
│   │           │   └── reviews/
│   │           │       ├── .helmignore
│   │           │       ├── Chart.yaml
│   │           │       ├── templates/
│   │           │       │   ├── NOTES.txt
│   │           │       │   ├── reviews-v1.yaml
│   │           │       │   ├── reviews-v2.yaml
│   │           │       │   ├── reviews-v3.yaml
│   │           │       │   ├── reviews.cm.yaml
│   │           │       │   └── reviews.svc.yaml
│   │           │       └── values.yaml
│   │           └── values.yaml
│   └── pkg/
│       ├── configparser/
│       │   ├── config.go
│       │   ├── parser.go
│       │   ├── provider_file.go
│       │   └── provider_flags.go
│       ├── constants/
│       │   ├── env.go
│       │   └── service.go
│       ├── injectors/
│       │   ├── provide_details.go
│       │   ├── provide_ratings.go
│       │   └── provide_reviews.go
│       ├── metadata/
│       │   └── propagator.go
│       ├── utils/
│       │   └── logutils/
│       │       └── level.go
│       └── version/
│           ├── var.go
│           └── version.go
├── check_branch_name.sh
├── easy_note/
│   ├── Makefile
│   ├── README.md
│   ├── api.md
│   ├── api_request/
│   │   ├── api_service/
│   │   │   ├── api_service.go
│   │   │   └── hertz_client.go
│   │   └── main.go
│   ├── cmd/
│   │   ├── api/
│   │   │   ├── .gitignore
│   │   │   ├── .hz
│   │   │   ├── Makefile
│   │   │   ├── build.sh
│   │   │   ├── hertz_handler/
│   │   │   │   ├── demoapi/
│   │   │   │   │   ├── api_service.go
│   │   │   │   │   └── handler.go
│   │   │   │   └── ping.go
│   │   │   ├── hertz_router/
│   │   │   │   ├── demoapi/
│   │   │   │   │   ├── api.go
│   │   │   │   │   └── middleware.go
│   │   │   │   └── register.go
│   │   │   ├── main.go
│   │   │   ├── mw/
│   │   │   │   └── jwt.go
│   │   │   ├── router.go
│   │   │   ├── router_gen.go
│   │   │   ├── rpc/
│   │   │   │   ├── init.go
│   │   │   │   ├── note.go
│   │   │   │   └── user.go
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   ├── note/
│   │   │   ├── Makefile
│   │   │   ├── build.sh
│   │   │   ├── dal/
│   │   │   │   ├── db/
│   │   │   │   │   ├── init.go
│   │   │   │   │   └── note.go
│   │   │   │   └── init.go
│   │   │   ├── handler.go
│   │   │   ├── main.go
│   │   │   ├── pack/
│   │   │   │   ├── note.go
│   │   │   │   └── resp.go
│   │   │   ├── rpc/
│   │   │   │   ├── init.go
│   │   │   │   └── user.go
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── service/
│   │   │       ├── create_note.go
│   │   │       ├── delete_note.go
│   │   │       ├── mget_note.go
│   │   │       ├── query_note.go
│   │   │       └── update_note.go
│   │   └── user/
│   │       ├── Makefile
│   │       ├── build.sh
│   │       ├── dal/
│   │       │   ├── db/
│   │       │   │   ├── init.go
│   │       │   │   └── user.go
│   │       │   └── init.go
│   │       ├── handler.go
│   │       ├── main.go
│   │       ├── pack/
│   │       │   ├── resp.go
│   │       │   └── user.go
│   │       ├── script/
│   │       │   └── bootstrap.sh
│   │       └── service/
│   │           ├── check_user.go
│   │           ├── create_user.go
│   │           └── mget_user.go
│   ├── docker-compose.yaml
│   ├── go.mod
│   ├── go.sum
│   ├── hertz_gen/
│   │   └── demoapi/
│   │       └── api.go
│   ├── idl/
│   │   ├── api.thrift
│   │   ├── note.thrift
│   │   └── user.thrift
│   ├── kitex_gen/
│   │   ├── demonote/
│   │   │   ├── k-consts.go
│   │   │   ├── k-note.go
│   │   │   ├── note.go
│   │   │   ├── note_validator.go
│   │   │   └── noteservice/
│   │   │       ├── client.go
│   │   │       ├── invoker.go
│   │   │       ├── noteservice.go
│   │   │       └── server.go
│   │   └── demouser/
│   │       ├── k-consts.go
│   │       ├── k-user.go
│   │       ├── user.go
│   │       ├── user_validator.go
│   │       └── userservice/
│   │           ├── client.go
│   │           ├── invoker.go
│   │           ├── server.go
│   │           └── userservice.go
│   ├── licenses/
│   │   ├── LICENSE-gorm-mysql.txt
│   │   ├── LICENSE-gorm.txt
│   │   ├── LICENSE-opentelemetry-go.txt
│   │   └── LICENSE-thrift.txt
│   └── pkg/
│       ├── configs/
│       │   ├── otel/
│       │   │   └── otel-collector-config.yaml
│       │   └── sql/
│       │       └── init.sql
│       ├── consts/
│       │   └── consts.go
│       ├── errno/
│       │   └── errno.go
│       └── mw/
│           ├── client.go
│           ├── common.go
│           └── server.go
├── gomall/
│   ├── .gitignore
│   ├── Makefile
│   ├── README.md
│   ├── README_cn.md
│   ├── app/
│   │   ├── cart/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   ├── cart.go
│   │   │   │   │   └── cart_test.go
│   │   │   │   └── service/
│   │   │   │       ├── add_item.go
│   │   │   │       ├── add_item_test.go
│   │   │   │       ├── empty_cart.go
│   │   │   │       ├── empty_cart_test.go
│   │   │   │       ├── get_cart.go
│   │   │   │       └── get_cart_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── infra/
│   │   │   │   └── rpc/
│   │   │   │       └── client.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   ├── bootstrap.sh
│   │   │   │   └── cart.sql
│   │   │   └── utils/
│   │   │       ├── constant.go
│   │   │       └── errors.go
│   │   ├── checkout/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   └── service/
│   │   │   │       ├── checkout.go
│   │   │   │       └── checkout_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── infra/
│   │   │   │   ├── mq/
│   │   │   │   │   └── nats.go
│   │   │   │   └── rpc/
│   │   │   │       └── client.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── utils/
│   │   │       └── errors.go
│   │   ├── email/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── consumer/
│   │   │   │   │   ├── consumer.go
│   │   │   │   │   └── email/
│   │   │   │   │       ├── email.go
│   │   │   │   │       └── email_test.go
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   └── service/
│   │   │   │       ├── send.go
│   │   │   │       └── send_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── infra/
│   │   │   │   ├── mq/
│   │   │   │   │   └── nats.go
│   │   │   │   └── notify/
│   │   │   │       └── email.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   └── script/
│   │   │       └── bootstrap.sh
│   │   ├── frontend/
│   │   │   ├── .air.toml
│   │   │   ├── .gitignore
│   │   │   ├── .hz
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── handler/
│   │   │   │   │   ├── about/
│   │   │   │   │   │   ├── about_service.go
│   │   │   │   │   │   └── about_service_test.go
│   │   │   │   │   ├── auth/
│   │   │   │   │   │   ├── auth_service.go
│   │   │   │   │   │   └── auth_service_test.go
│   │   │   │   │   ├── cart/
│   │   │   │   │   │   ├── cart_service.go
│   │   │   │   │   │   └── cart_service_test.go
│   │   │   │   │   ├── category/
│   │   │   │   │   │   ├── category_service.go
│   │   │   │   │   │   └── category_service_test.go
│   │   │   │   │   ├── checkout/
│   │   │   │   │   │   ├── checkout_service.go
│   │   │   │   │   │   └── checkout_service_test.go
│   │   │   │   │   ├── home/
│   │   │   │   │   │   ├── home_service.go
│   │   │   │   │   │   └── home_service_test.go
│   │   │   │   │   ├── order/
│   │   │   │   │   │   ├── order_service.go
│   │   │   │   │   │   └── order_service_test.go
│   │   │   │   │   └── product/
│   │   │   │   │       ├── product_service.go
│   │   │   │   │       └── product_service_test.go
│   │   │   │   ├── router/
│   │   │   │   │   ├── about/
│   │   │   │   │   │   ├── about.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── auth/
│   │   │   │   │   │   ├── auth_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── cart/
│   │   │   │   │   │   ├── cart_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── category/
│   │   │   │   │   │   ├── category_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── checkout/
│   │   │   │   │   │   ├── checkout_page.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── home/
│   │   │   │   │   │   ├── home.go
│   │   │   │   │   │   └── middleware.go
│   │   │   │   │   ├── order/
│   │   │   │   │   │   ├── middleware.go
│   │   │   │   │   │   └── order_page.go
│   │   │   │   │   ├── product/
│   │   │   │   │   │   ├── middleware.go
│   │   │   │   │   │   └── product_page.go
│   │   │   │   │   └── register.go
│   │   │   │   ├── service/
│   │   │   │   │   ├── about.go
│   │   │   │   │   ├── add_cart_item.go
│   │   │   │   │   ├── category.go
│   │   │   │   │   ├── checkout.go
│   │   │   │   │   ├── checkout_result.go
│   │   │   │   │   ├── checkout_waiting.go
│   │   │   │   │   ├── get_cart.go
│   │   │   │   │   ├── get_product.go
│   │   │   │   │   ├── home.go
│   │   │   │   │   ├── login.go
│   │   │   │   │   ├── logout.go
│   │   │   │   │   ├── order_list.go
│   │   │   │   │   ├── register.go
│   │   │   │   │   └── search_producs.go
│   │   │   │   └── utils/
│   │   │   │       └── resp.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── hertz_gen/
│   │   │   │   ├── api/
│   │   │   │   │   └── api.pb.go
│   │   │   │   └── frontend/
│   │   │   │       ├── about/
│   │   │   │       │   └── about.pb.go
│   │   │   │       ├── auth/
│   │   │   │       │   └── auth_page.pb.go
│   │   │   │       ├── cart/
│   │   │   │       │   └── cart_page.pb.go
│   │   │   │       ├── category/
│   │   │   │       │   └── category_page.pb.go
│   │   │   │       ├── checkout/
│   │   │   │       │   └── checkout_page.pb.go
│   │   │   │       ├── common/
│   │   │   │       │   └── common.pb.go
│   │   │   │       ├── home/
│   │   │   │       │   └── home.pb.go
│   │   │   │       ├── order/
│   │   │   │       │   └── order_page.pb.go
│   │   │   │       └── product/
│   │   │   │           └── product_page.pb.go
│   │   │   ├── infra/
│   │   │   │   ├── mtl/
│   │   │   │   │   ├── log.go
│   │   │   │   │   ├── metric.go
│   │   │   │   │   ├── mtl.go
│   │   │   │   │   └── tracing.go
│   │   │   │   └── rpc/
│   │   │   │       └── client.go
│   │   │   ├── main.go
│   │   │   ├── middleware/
│   │   │   │   ├── auth.go
│   │   │   │   └── middleware.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   ├── template/
│   │   │   │   ├── about.tmpl
│   │   │   │   ├── cart-num.tmpl
│   │   │   │   ├── cart.tmpl
│   │   │   │   ├── category.tmpl
│   │   │   │   ├── checkout.tmpl
│   │   │   │   ├── error.tmpl
│   │   │   │   ├── footer.tmpl
│   │   │   │   ├── header.tmpl
│   │   │   │   ├── home.tmpl
│   │   │   │   ├── order.tmpl
│   │   │   │   ├── product.tmpl
│   │   │   │   ├── result.tmpl
│   │   │   │   ├── search.tmpl
│   │   │   │   ├── sign-in.tmpl
│   │   │   │   ├── sign-up.tmpl
│   │   │   │   ├── utils.tmpl
│   │   │   │   └── waiting.tmpl
│   │   │   ├── types/
│   │   │   │   └── order.go
│   │   │   └── utils/
│   │   │       ├── constant.go
│   │   │       ├── errors.go
│   │   │       ├── function.go
│   │   │       ├── response.go
│   │   │       ├── safe.go
│   │   │       └── strings.go
│   │   ├── order/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   ├── order.go
│   │   │   │   │   └── order_item.go
│   │   │   │   └── service/
│   │   │   │       ├── list_order.go
│   │   │   │       ├── list_order_test.go
│   │   │   │       ├── mark_order_paid.go
│   │   │   │       ├── mark_order_paid_test.go
│   │   │   │       ├── place_order.go
│   │   │   │       └── place_order_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── test/
│   │   │       └── rpc_test.go
│   │   ├── payment/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   └── payment.go
│   │   │   │   └── service/
│   │   │   │       ├── charge.go
│   │   │   │       └── charge_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── middleware/
│   │   │   │   └── mw.go
│   │   │   ├── payment.sql
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   └── bootstrap.sh
│   │   │   └── utils/
│   │   │       └── errors.go
│   │   ├── product/
│   │   │   ├── .gitignore
│   │   │   ├── biz/
│   │   │   │   ├── dal/
│   │   │   │   │   ├── init.go
│   │   │   │   │   ├── mysql/
│   │   │   │   │   │   └── init.go
│   │   │   │   │   └── redis/
│   │   │   │   │       └── init.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── base.go
│   │   │   │   │   ├── category.go
│   │   │   │   │   └── product.go
│   │   │   │   └── service/
│   │   │   │       ├── get_product.go
│   │   │   │       ├── get_product_test.go
│   │   │   │       ├── list_products.go
│   │   │   │       ├── list_products_test.go
│   │   │   │       ├── search_products.go
│   │   │   │       └── search_products_test.go
│   │   │   ├── build.sh
│   │   │   ├── conf/
│   │   │   │   ├── conf.go
│   │   │   │   ├── dev/
│   │   │   │   │   └── conf.yaml
│   │   │   │   ├── online/
│   │   │   │   │   └── conf.yaml
│   │   │   │   └── test/
│   │   │   │       └── conf.yaml
│   │   │   ├── docker-compose.yaml
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── handler.go
│   │   │   ├── kitex_info.yaml
│   │   │   ├── main.go
│   │   │   ├── readme.md
│   │   │   ├── script/
│   │   │   │   ├── bootstrap.sh
│   │   │   │   └── product.sql
│   │   │   └── utils/
│   │   │       └── constant.go
│   │   └── user/
│   │       ├── .gitignore
│   │       ├── biz/
│   │       │   ├── dal/
│   │       │   │   ├── init.go
│   │       │   │   ├── mysql/
│   │       │   │   │   └── init.go
│   │       │   │   └── redis/
│   │       │   │       └── init.go
│   │       │   ├── model/
│   │       │   │   ├── base.go
│   │       │   │   └── user.go
│   │       │   └── service/
│   │       │       ├── login.go
│   │       │       ├── login_test.go
│   │       │       ├── register.go
│   │       │       └── register_test.go
│   │       ├── build.sh
│   │       ├── conf/
│   │       │   ├── conf.go
│   │       │   ├── dev/
│   │       │   │   └── conf.yaml
│   │       │   ├── online/
│   │       │   │   └── conf.yaml
│   │       │   └── test/
│   │       │       └── conf.yaml
│   │       ├── docker-compose.yaml
│   │       ├── go.mod
│   │       ├── go.sum
│   │       ├── handler.go
│   │       ├── kitex_info.yaml
│   │       ├── main.go
│   │       ├── readme.md
│   │       └── script/
│   │           └── bootstrap.sh
│   ├── common/
│   │   ├── clientsuite/
│   │   │   └── client.go
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── mtl/
│   │   │   ├── log.go
│   │   │   ├── metrics.go
│   │   │   └── tracing.go
│   │   ├── serversuite/
│   │   │   └── server.go
│   │   └── utils/
│   │       ├── ip.go
│   │       └── kitex.go
│   ├── db/
│   │   └── sql/
│   │       └── ini/
│   │           ├── README.md
│   │           └── databases.sql
│   ├── deploy/
│   │   ├── config/
│   │   │   ├── loki.yml
│   │   │   ├── prometheus.yml
│   │   │   └── promtail.yml
│   │   └── grafana.json
│   ├── docker-compose.yaml
│   ├── go.work
│   ├── gomall.code-workspace
│   ├── idl/
│   │   ├── api.proto
│   │   ├── cart.proto
│   │   ├── checkout.proto
│   │   ├── email.proto
│   │   ├── frontend/
│   │   │   ├── about.proto
│   │   │   ├── auth_page.proto
│   │   │   ├── cart_page.proto
│   │   │   ├── category_page.proto
│   │   │   ├── checkout_page.proto
│   │   │   ├── common.proto
│   │   │   ├── home.proto
│   │   │   ├── order_page.proto
│   │   │   └── product_page.proto
│   │   ├── order.proto
│   │   ├── payment.proto
│   │   ├── product.proto
│   │   └── user.proto
│   ├── rpc_gen/
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── kitex_gen/
│   │   │   ├── cart/
│   │   │   │   ├── cart.pb.fast.go
│   │   │   │   ├── cart.pb.go
│   │   │   │   └── cartservice/
│   │   │   │       ├── cartservice.go
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       └── server.go
│   │   │   ├── checkout/
│   │   │   │   ├── checkout.pb.fast.go
│   │   │   │   ├── checkout.pb.go
│   │   │   │   └── checkoutservice/
│   │   │   │       ├── checkoutservice.go
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       └── server.go
│   │   │   ├── email/
│   │   │   │   ├── email.pb.fast.go
│   │   │   │   ├── email.pb.go
│   │   │   │   └── emailservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── emailservice.go
│   │   │   │       ├── invoker.go
│   │   │   │       └── server.go
│   │   │   ├── order/
│   │   │   │   ├── order.pb.fast.go
│   │   │   │   ├── order.pb.go
│   │   │   │   └── orderservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       ├── orderservice.go
│   │   │   │       └── server.go
│   │   │   ├── payment/
│   │   │   │   ├── payment.pb.fast.go
│   │   │   │   ├── payment.pb.go
│   │   │   │   └── paymentservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       ├── paymentservice.go
│   │   │   │       └── server.go
│   │   │   ├── product/
│   │   │   │   ├── product.pb.fast.go
│   │   │   │   ├── product.pb.go
│   │   │   │   └── productcatalogservice/
│   │   │   │       ├── client.go
│   │   │   │       ├── invoker.go
│   │   │   │       ├── productcatalogservice.go
│   │   │   │       └── server.go
│   │   │   └── user/
│   │   │       ├── user.pb.fast.go
│   │   │       ├── user.pb.go
│   │   │       └── userservice/
│   │   │           ├── client.go
│   │   │           ├── invoker.go
│   │   │           ├── server.go
│   │   │           └── userservice.go
│   │   └── rpc/
│   │       ├── cart/
│   │       │   ├── cart_client.go
│   │       │   ├── cart_default.go
│   │       │   └── cart_init.go
│   │       ├── checkout/
│   │       │   ├── checkout_client.go
│   │       │   ├── checkout_default.go
│   │       │   └── checkout_init.go
│   │       ├── email/
│   │       │   ├── email_client.go
│   │       │   ├── email_default.go
│   │       │   └── email_init.go
│   │       ├── order/
│   │       │   ├── order_client.go
│   │       │   ├── order_default.go
│   │       │   └── order_init.go
│   │       ├── payment/
│   │       │   ├── payment_client.go
│   │       │   ├── payment_default.go
│   │       │   └── payment_init.go
│   │       ├── product/
│   │       │   ├── product_client.go
│   │       │   ├── product_default.go
│   │       │   └── product_init.go
│   │       └── user/
│   │           ├── user_client.go
│   │           ├── user_default.go
│   │           └── user_init.go
│   ├── scripts/
│   │   ├── copy_env.sh
│   │   ├── fix.sh
│   │   ├── gen.sh
│   │   ├── list_app.sh
│   │   ├── run.sh
│   │   ├── run_all.sh
│   │   ├── tidy.sh
│   │   └── vet.sh
│   └── tutorial/
│       ├── README.md
│       ├── ch01/
│       │   ├── go.work
│       │   └── hello_world/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       └── main.go
│       ├── ch02/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch03/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   └── client/
│       │   │   │   │       └── client.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch04/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   └── client/
│       │   │   │   │       └── client.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch05/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch06/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch07/
│       │   ├── Makefile
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── echo.proto
│       │       └── echo.thrift
│       ├── ch08/
│       │   ├── Makefile
│       │   ├── app/
│       │   │   └── frontend/
│       │   │       ├── .gitignore
│       │   │       ├── .hz
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── handler/
│       │   │       │   │   └── home/
│       │   │       │   │       ├── home_service.go
│       │   │       │   │       └── home_service_test.go
│       │   │       │   ├── router/
│       │   │       │   │   ├── home/
│       │   │       │   │   │   ├── home.go
│       │   │       │   │   │   └── middleware.go
│       │   │       │   │   └── register.go
│       │   │       │   ├── service/
│       │   │       │   │   └── home.go
│       │   │       │   └── utils/
│       │   │       │       └── resp.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── hertz_gen/
│       │   │       │   ├── api/
│       │   │       │   │   └── api.pb.go
│       │   │       │   └── frontend/
│       │   │       │       └── home/
│       │   │       │           └── home.pb.go
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       ├── script/
│       │   │       │   └── bootstrap.sh
│       │   │       └── template/
│       │   │           ├── footer.tmpl
│       │   │           ├── header.tmpl
│       │   │           └── home.tmpl
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   └── idl/
│       │       ├── api.proto
│       │       ├── echo.proto
│       │       ├── echo.thrift
│       │       └── frontend/
│       │           └── home.proto
│       ├── ch09/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   └── home/
│       │   │   │   │   │       ├── home_service.go
│       │   │   │   │   │       └── home_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       └── home/
│       │   │   │   │           └── home.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   └── sign-up.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   └── home.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch10/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   └── sign-up.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch11/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── cart.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   └── sign-up.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch12/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── cart.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch13/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── cart.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── rpc/
│       │   │   │   │   └── client.go
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   ├── register.go
│       │   │   │   │   │   └── search_products.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       ├── client.go
│       │   │   │   │       └── client_test.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── about.tmpl
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── required.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       └── function.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   ├── order_page.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── order.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── order/
│       │       │   │   ├── order.pb.fast.go
│       │       │   │   ├── order.pb.go
│       │       │   │   └── orderservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── orderservice.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── order/
│       │           │   ├── order_client.go
│       │           │   ├── order_default.go
│       │           │   └── order_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch14/
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── cart.go
│       │   │   │   │   │   └── cart_test.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── cart.sql
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── email/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── consumer/
│       │   │   │   │   │   ├── consumer.go
│       │   │   │   │   │   └── email/
│       │   │   │   │   │       ├── email.go
│       │   │   │   │   │       └── email_test.go
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── send.go
│       │   │   │   │       └── send_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── notify/
│       │   │   │   │       └── email.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   ├── utils.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       ├── function.go
│       │   │   │       ├── response.go
│       │   │   │       ├── safe.go
│       │   │   │       └── strings.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   └── mw.go
│       │   │   │   ├── payment.sql
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   ├── base.go
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── email.proto
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   ├── order_page.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── order.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── email/
│       │       │   │   ├── email.pb.fast.go
│       │       │   │   ├── email.pb.go
│       │       │   │   └── emailservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── emailservice.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── order/
│       │       │   │   ├── order.pb.fast.go
│       │       │   │   ├── order.pb.go
│       │       │   │   └── orderservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── orderservice.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── email/
│       │           │   ├── email_client.go
│       │           │   ├── email_default.go
│       │           │   └── email_init.go
│       │           ├── order/
│       │           │   ├── order_client.go
│       │           │   ├── order_default.go
│       │           │   └── order_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch15/
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── cart.go
│       │   │   │   │   │   └── cart_test.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── cart.sql
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── email/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── consumer/
│       │   │   │   │   │   ├── consumer.go
│       │   │   │   │   │   └── email/
│       │   │   │   │   │       ├── email.go
│       │   │   │   │   │       └── email_test.go
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── send.go
│       │   │   │   │       └── send_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── notify/
│       │   │   │   │       └── email.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mtl/
│       │   │   │   │   │   ├── log.go
│       │   │   │   │   │   ├── metric.go
│       │   │   │   │   │   ├── mtl.go
│       │   │   │   │   │   └── tracing.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   ├── utils.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       ├── function.go
│       │   │   │       ├── response.go
│       │   │   │       ├── safe.go
│       │   │   │       └── strings.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   └── mw.go
│       │   │   │   ├── payment.sql
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── product/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   └── product.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── get_product.go
│       │   │   │   │       ├── get_product_test.go
│       │   │   │   │       ├── list_products.go
│       │   │   │   │       ├── list_products_test.go
│       │   │   │   │       ├── search_products.go
│       │   │   │   │       └── search_products_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── product.sql
│       │   │   │   └── utils/
│       │   │   │       └── constant.go
│       │   │   └── user/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   ├── model/
│       │   │       │   │   ├── base.go
│       │   │       │   │   └── user.go
│       │   │       │   └── service/
│       │   │       │       ├── login.go
│       │   │       │       ├── login_test.go
│       │   │       │       ├── register.go
│       │   │       │       └── register_test.go
│       │   │       ├── build.sh
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── common/
│       │   │   ├── clientsuite/
│       │   │   │   └── client.go
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   ├── mtl/
│       │   │   │   ├── log.go
│       │   │   │   ├── metrics.go
│       │   │   │   └── tracing.go
│       │   │   ├── serversuite/
│       │   │   │   └── server.go
│       │   │   └── utils/
│       │   │       └── kitex.go
│       │   ├── db/
│       │   │   └── sql/
│       │   │       └── ini/
│       │   │           ├── README.md
│       │   │           └── databases.sql
│       │   ├── demo/
│       │   │   ├── demo_proto/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   └── user.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── echo.go
│       │   │   │   │       └── echo_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── cmd/
│       │   │   │   │   ├── client/
│       │   │   │   │   │   └── client.go
│       │   │   │   │   └── dbop/
│       │   │   │   │       └── db.go
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_gen/
│       │   │   │   │   └── pbapi/
│       │   │   │   │       ├── echo/
│       │   │   │   │       │   ├── client.go
│       │   │   │   │       │   ├── echo.go
│       │   │   │   │       │   ├── invoker.go
│       │   │   │   │       │   └── server.go
│       │   │   │   │       ├── echo.pb.fast.go
│       │   │   │   │       └── echo.pb.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   └── demo_thrift/
│       │   │       ├── .gitignore
│       │   │       ├── biz/
│       │   │       │   ├── dal/
│       │   │       │   │   ├── init.go
│       │   │       │   │   ├── mysql/
│       │   │       │   │   │   └── init.go
│       │   │       │   │   └── redis/
│       │   │       │   │       └── init.go
│       │   │       │   └── service/
│       │   │       │       ├── echo.go
│       │   │       │       └── echo_test.go
│       │   │       ├── build.sh
│       │   │       ├── cmd/
│       │   │       │   └── client/
│       │   │       │       └── client.go
│       │   │       ├── conf/
│       │   │       │   ├── conf.go
│       │   │       │   ├── dev/
│       │   │       │   │   └── conf.yaml
│       │   │       │   ├── online/
│       │   │       │   │   └── conf.yaml
│       │   │       │   └── test/
│       │   │       │       └── conf.yaml
│       │   │       ├── docker-compose.yaml
│       │   │       ├── go.mod
│       │   │       ├── go.sum
│       │   │       ├── handler.go
│       │   │       ├── kitex_gen/
│       │   │       │   └── api/
│       │   │       │       ├── echo/
│       │   │       │       │   ├── client.go
│       │   │       │       │   ├── echo.go
│       │   │       │       │   ├── invoker.go
│       │   │       │       │   └── server.go
│       │   │       │       ├── echo.go
│       │   │       │       ├── k-consts.go
│       │   │       │       └── k-echo.go
│       │   │       ├── kitex_info.yaml
│       │   │       ├── main.go
│       │   │       ├── readme.md
│       │   │       └── script/
│       │   │           └── bootstrap.sh
│       │   ├── deploy/
│       │   │   └── config/
│       │   │       └── prometheus.yml
│       │   ├── docker-compose.yaml
│       │   ├── go.work
│       │   ├── hello_world/
│       │   │   ├── go.mod
│       │   │   ├── go.sum
│       │   │   └── main.go
│       │   ├── idl/
│       │   │   ├── api.proto
│       │   │   ├── cart.proto
│       │   │   ├── checkout.proto
│       │   │   ├── echo.proto
│       │   │   ├── echo.thrift
│       │   │   ├── email.proto
│       │   │   ├── frontend/
│       │   │   │   ├── auth_page.proto
│       │   │   │   ├── cart_page.proto
│       │   │   │   ├── category_page.proto
│       │   │   │   ├── checkout_page.proto
│       │   │   │   ├── common.proto
│       │   │   │   ├── home.proto
│       │   │   │   ├── order_page.proto
│       │   │   │   └── product_page.proto
│       │   │   ├── order.proto
│       │   │   ├── payment.proto
│       │   │   ├── product.proto
│       │   │   └── user.proto
│       │   └── rpc_gen/
│       │       ├── go.mod
│       │       ├── go.sum
│       │       ├── kitex_gen/
│       │       │   ├── cart/
│       │       │   │   ├── cart.pb.fast.go
│       │       │   │   ├── cart.pb.go
│       │       │   │   └── cartservice/
│       │       │   │       ├── cartservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── checkout/
│       │       │   │   ├── checkout.pb.fast.go
│       │       │   │   ├── checkout.pb.go
│       │       │   │   └── checkoutservice/
│       │       │   │       ├── checkoutservice.go
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── email/
│       │       │   │   ├── email.pb.fast.go
│       │       │   │   ├── email.pb.go
│       │       │   │   └── emailservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── emailservice.go
│       │       │   │       ├── invoker.go
│       │       │   │       └── server.go
│       │       │   ├── order/
│       │       │   │   ├── order.pb.fast.go
│       │       │   │   ├── order.pb.go
│       │       │   │   └── orderservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── orderservice.go
│       │       │   │       └── server.go
│       │       │   ├── payment/
│       │       │   │   ├── payment.pb.fast.go
│       │       │   │   ├── payment.pb.go
│       │       │   │   └── paymentservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── paymentservice.go
│       │       │   │       └── server.go
│       │       │   ├── product/
│       │       │   │   ├── product.pb.fast.go
│       │       │   │   ├── product.pb.go
│       │       │   │   └── productcatalogservice/
│       │       │   │       ├── client.go
│       │       │   │       ├── invoker.go
│       │       │   │       ├── productcatalogservice.go
│       │       │   │       └── server.go
│       │       │   └── user/
│       │       │       ├── user.pb.fast.go
│       │       │       ├── user.pb.go
│       │       │       └── userservice/
│       │       │           ├── client.go
│       │       │           ├── invoker.go
│       │       │           ├── server.go
│       │       │           └── userservice.go
│       │       └── rpc/
│       │           ├── cart/
│       │           │   ├── cart_client.go
│       │           │   ├── cart_default.go
│       │           │   └── cart_init.go
│       │           ├── checkout/
│       │           │   ├── checkout_client.go
│       │           │   ├── checkout_default.go
│       │           │   └── checkout_init.go
│       │           ├── email/
│       │           │   ├── email_client.go
│       │           │   ├── email_default.go
│       │           │   └── email_init.go
│       │           ├── order/
│       │           │   ├── order_client.go
│       │           │   ├── order_default.go
│       │           │   └── order_init.go
│       │           ├── payment/
│       │           │   ├── payment_client.go
│       │           │   ├── payment_default.go
│       │           │   └── payment_init.go
│       │           ├── product/
│       │           │   ├── product_client.go
│       │           │   ├── product_default.go
│       │           │   └── product_init.go
│       │           └── user/
│       │               ├── user_client.go
│       │               ├── user_default.go
│       │               └── user_init.go
│       ├── ch16/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── app/
│       │   │   ├── cart/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── cart.go
│       │   │   │   │   │   └── cart_test.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── add_item.go
│       │   │   │   │       ├── add_item_test.go
│       │   │   │   │       ├── empty_cart.go
│       │   │   │   │       ├── empty_cart_test.go
│       │   │   │   │       ├── get_cart.go
│       │   │   │   │       └── get_cart_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   ├── bootstrap.sh
│       │   │   │   │   └── cart.sql
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       └── errors.go
│       │   │   ├── checkout/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── checkout.go
│       │   │   │   │       └── checkout_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   └── utils/
│       │   │   │       └── errors.go
│       │   │   ├── email/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── consumer/
│       │   │   │   │   │   ├── consumer.go
│       │   │   │   │   │   └── email/
│       │   │   │   │   │       ├── email.go
│       │   │   │   │   │       └── email_test.go
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── send.go
│       │   │   │   │       └── send_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mq/
│       │   │   │   │   │   └── nats.go
│       │   │   │   │   └── notify/
│       │   │   │   │       └── email.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── frontend/
│       │   │   │   ├── .air.toml
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .hz
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── handler/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_service.go
│       │   │   │   │   │   │   └── auth_service_test.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_service.go
│       │   │   │   │   │   │   └── cart_service_test.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_service.go
│       │   │   │   │   │   │   └── category_service_test.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_service.go
│       │   │   │   │   │   │   └── checkout_service_test.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home_service.go
│       │   │   │   │   │   │   └── home_service_test.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── order_service.go
│       │   │   │   │   │   │   └── order_service_test.go
│       │   │   │   │   │   └── product/
│       │   │   │   │   │       ├── product_service.go
│       │   │   │   │   │       └── product_service_test.go
│       │   │   │   │   ├── router/
│       │   │   │   │   │   ├── auth/
│       │   │   │   │   │   │   ├── auth_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── cart/
│       │   │   │   │   │   │   ├── cart_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── category/
│       │   │   │   │   │   │   ├── category_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── checkout/
│       │   │   │   │   │   │   ├── checkout_page.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── home/
│       │   │   │   │   │   │   ├── home.go
│       │   │   │   │   │   │   └── middleware.go
│       │   │   │   │   │   ├── order/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── order_page.go
│       │   │   │   │   │   ├── product/
│       │   │   │   │   │   │   ├── middleware.go
│       │   │   │   │   │   │   └── product_page.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   ├── service/
│       │   │   │   │   │   ├── add_cart_item.go
│       │   │   │   │   │   ├── category.go
│       │   │   │   │   │   ├── checkout.go
│       │   │   │   │   │   ├── checkout_result.go
│       │   │   │   │   │   ├── checkout_waiting.go
│       │   │   │   │   │   ├── get_cart.go
│       │   │   │   │   │   ├── get_product.go
│       │   │   │   │   │   ├── home.go
│       │   │   │   │   │   ├── login.go
│       │   │   │   │   │   ├── logout.go
│       │   │   │   │   │   ├── order_list.go
│       │   │   │   │   │   └── register.go
│       │   │   │   │   └── utils/
│       │   │   │   │       └── resp.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── hertz_gen/
│       │   │   │   │   ├── api/
│       │   │   │   │   │   └── api.pb.go
│       │   │   │   │   └── frontend/
│       │   │   │   │       ├── auth/
│       │   │   │   │       │   └── auth_page.pb.go
│       │   │   │   │       ├── cart/
│       │   │   │   │       │   └── cart_page.pb.go
│       │   │   │   │       ├── category/
│       │   │   │   │       │   └── category_page.pb.go
│       │   │   │   │       ├── checkout/
│       │   │   │   │       │   └── checkout_page.pb.go
│       │   │   │   │       ├── common/
│       │   │   │   │       │   └── common.pb.go
│       │   │   │   │       ├── home/
│       │   │   │   │       │   └── home.pb.go
│       │   │   │   │       ├── order/
│       │   │   │   │       │   └── order_page.pb.go
│       │   │   │   │       └── product/
│       │   │   │   │           └── product_page.pb.go
│       │   │   │   ├── infra/
│       │   │   │   │   ├── mtl/
│       │   │   │   │   │   ├── log.go
│       │   │   │   │   │   ├── metric.go
│       │   │   │   │   │   ├── mtl.go
│       │   │   │   │   │   └── tracing.go
│       │   │   │   │   └── rpc/
│       │   │   │   │       └── client.go
│       │   │   │   ├── main.go
│       │   │   │   ├── middleware/
│       │   │   │   │   ├── auth.go
│       │   │   │   │   └── middleware.go
│       │   │   │   ├── readme.md
│       │   │   │   ├── script/
│       │   │   │   │   └── bootstrap.sh
│       │   │   │   ├── template/
│       │   │   │   │   ├── cart-num.tmpl
│       │   │   │   │   ├── cart.tmpl
│       │   │   │   │   ├── category.tmpl
│       │   │   │   │   ├── checkout.tmpl
│       │   │   │   │   ├── footer.tmpl
│       │   │   │   │   ├── header.tmpl
│       │   │   │   │   ├── home.tmpl
│       │   │   │   │   ├── order.tmpl
│       │   │   │   │   ├── product.tmpl
│       │   │   │   │   ├── result.tmpl
│       │   │   │   │   ├── search.tmpl
│       │   │   │   │   ├── sign-in.tmpl
│       │   │   │   │   ├── sign-up.tmpl
│       │   │   │   │   ├── utils.tmpl
│       │   │   │   │   └── waiting.tmpl
│       │   │   │   ├── types/
│       │   │   │   │   └── order.go
│       │   │   │   └── utils/
│       │   │   │       ├── constant.go
│       │   │   │       ├── errors.go
│       │   │   │       ├── function.go
│       │   │   │       ├── response.go
│       │   │   │       ├── safe.go
│       │   │   │       └── strings.go
│       │   │   ├── order/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   ├── order.go
│       │   │   │   │   │   └── order_item.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── list_order.go
│       │   │   │   │       ├── list_order_test.go
│       │   │   │   │       ├── place_order.go
│       │   │   │   │       └── place_order_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   └── test/
│       │   │   │   │       └── conf.yaml
│       │   │   │   ├── docker-compose.yaml
│       │   │   │   ├── go.mod
│       │   │   │   ├── go.sum
│       │   │   │   ├── handler.go
│       │   │   │   ├── kitex_info.yaml
│       │   │   │   ├── main.go
│       │   │   │   ├── readme.md
│       │   │   │   └── script/
│       │   │   │       └── bootstrap.sh
│       │   │   ├── payment/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── biz/
│       │   │   │   │   ├── dal/
│       │   │   │   │   │   ├── init.go
│       │   │   │   │   │   ├── mysql/
│       │   │   │   │   │   │   └── init.go
│       │   │   │   │   │   └── redis/
│       │   │   │   │   │       └── init.go
│       │   │   │   │   ├── model/
│       │   │   │   │   │   ├── base.go
│       │   │   │   │   │   └── payment.go
│       │   │   │   │   └── service/
│       │   │   │   │       ├── charge.go
│       │   │   │   │       └── charge_test.go
│       │   │   │   ├── build.sh
│       │   │   │   ├── conf/
│       │   │   │   │   ├── conf.go
│       │   │   │   │   ├── dev/
│       │   │   │   │   │   └── conf.yaml
│       │   │   │   │   ├── online/
│       │   │   │   │   │   └── conf.yaml
│       │   
Download .txt
Showing preview only (2,054K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (22244 symbols across 2579 files)

FILE: book-shop/app/facade/handlers/handler_item/add.go
  function AddProduct (line 39) | func AddProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/del.go
  function DelProduct (line 38) | func DelProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/edit.go
  function EditProduct (line 39) | func EditProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/get.go
  function GetProduct (line 39) | func GetProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/list.go
  function ListProduct (line 38) | func ListProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/mget2c.go
  function MGetProduct2C (line 40) | func MGetProduct2C(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/offline.go
  function OfflineProduct (line 38) | func OfflineProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/online.go
  function OnlineProduct (line 38) | func OnlineProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_item/search.go
  function SearchProduct (line 38) | func SearchProduct(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_order/cancel.go
  function CancelOrder (line 38) | func CancelOrder(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_order/create.go
  function CreateOrder (line 41) | func CreateOrder(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_order/get.go
  function GetOrder (line 39) | func GetOrder(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_order/list.go
  function ListOrder (line 39) | func ListOrder(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_user/shop_login.go
  function ShopLogin (line 34) | func ShopLogin(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_user/user_login.go
  function UserLogin (line 34) | func UserLogin(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/handlers/handler_user/user_register.go
  function UserRegister (line 37) | func UserRegister(ctx context.Context, c *app.RequestContext) {

FILE: book-shop/app/facade/infras/client/init.go
  function Init (line 19) | func Init() {

FILE: book-shop/app/facade/infras/client/item.go
  function initItemRpc (line 33) | func initItemRpc() {
  function AddProduct (line 52) | func AddProduct(ctx context.Context, req *item.AddReq) (int64, error) {
  function EditProduct (line 63) | func EditProduct(ctx context.Context, req *item.EditReq) error {
  function OperateProduct (line 74) | func OperateProduct(ctx context.Context, productId int64, operate string...
  function GetProduct (line 104) | func GetProduct(ctx context.Context, productId int64) (*item.Product, er...
  function MGetProducts2C (line 115) | func MGetProducts2C(ctx context.Context, productIds []int64) (map[int64]...
  function SearchProduct (line 128) | func SearchProduct(ctx context.Context, req *item.SearchReq) ([]*item.Pr...
  function ListProduct (line 139) | func ListProduct(ctx context.Context, req *item.ListReq) ([]*item.Produc...

FILE: book-shop/app/facade/infras/client/order.go
  function initOrderRpc (line 33) | func initOrderRpc() {
  function CreateOrder (line 52) | func CreateOrder(ctx context.Context, req *order.CreateOrderReq) error {
  function CancelOrder (line 63) | func CancelOrder(ctx context.Context, orderId int64) error {
  function GetOrderById (line 74) | func GetOrderById(ctx context.Context, orderId int64) (*order.OrderItem,...
  function ListOrder (line 87) | func ListOrder(ctx context.Context, userId int64, status *int64) ([]*ord...

FILE: book-shop/app/facade/infras/client/user.go
  function initUserRpc (line 34) | func initUserRpc() {
  function CreateUser (line 53) | func CreateUser(ctx context.Context, req *user.CreateUserReq) error {
  function CheckUser (line 64) | func CheckUser(ctx context.Context, req *user.CheckUserReq) (int64, erro...

FILE: book-shop/app/facade/main.go
  function Init (line 39) | func Init() {
  function main (line 118) | func main() {

FILE: book-shop/app/facade/model/model.go
  type Response (line 32) | type Response struct
  function SendResponse (line 39) | func SendResponse(c *app.RequestContext, err error, data interface{}) {
  type UserParam (line 48) | type UserParam struct
  type LoginResponse (line 53) | type LoginResponse struct
  type AddProductRequest (line 59) | type AddProductRequest struct
  type EditProductRequest (line 70) | type EditProductRequest struct
  type OperateProductReq (line 82) | type OperateProductReq struct
  type SearchProductReq (line 86) | type SearchProductReq struct
  type ListProductReq (line 92) | type ListProductReq struct
  type CreateOrderReq (line 98) | type CreateOrderReq struct
  type CancelOrderReq (line 104) | type CancelOrderReq struct
  type ListOrderReq (line 108) | type ListOrderReq struct

FILE: book-shop/app/item/common/constant/constant.go
  constant ProductStatusOnline (line 21) | ProductStatusOnline  ProductStatus = 0
  constant ProductStatusOffline (line 22) | ProductStatusOffline ProductStatus = 1
  constant ProductStatusDelete (line 23) | ProductStatusDelete  ProductStatus = 2
  constant StateOperationTypeAdd (line 35) | StateOperationTypeAdd     StateOperationType = 1
  constant StateOperationTypeSave (line 36) | StateOperationTypeSave    StateOperationType = 2
  constant StateOperationTypeDel (line 37) | StateOperationTypeDel     StateOperationType = 3
  constant StateOperationTypeOffline (line 38) | StateOperationTypeOffline StateOperationType = 4
  constant StateOperationTypeOnline (line 39) | StateOperationTypeOnline  StateOperationType = 5

FILE: book-shop/app/item/common/converter/dto_2_entity.go
  function ConvertDTO2Entity (line 24) | func ConvertDTO2Entity(dto *item.Product) *entity.ProductEntity {
  function ConvertAddReq2Entity (line 45) | func ConvertAddReq2Entity(req *item.AddReq) (*entity.ProductEntity, erro...
  function ConvertEditReq2Entity (line 72) | func ConvertEditReq2Entity(originEntity *entity.ProductEntity, req *item...

FILE: book-shop/app/item/common/converter/entity_2_dto.go
  function ConvertEntity2DTO (line 23) | func ConvertEntity2DTO(e *entity.ProductEntity) *item.Product {

FILE: book-shop/app/item/common/entity/product_entity.go
  type ProductEntity (line 20) | type ProductEntity struct
    method Clone (line 31) | func (entity *ProductEntity) Clone() (*ProductEntity, error) {
  type PropertyEntity (line 37) | type PropertyEntity struct

FILE: book-shop/app/item/common/po/product_po.go
  type Product (line 23) | type Product struct
    method TableName (line 37) | func (p *Product) TableName() string {

FILE: book-shop/app/item/domain/repository/product_2c_repository.go
  type Product2CRepository (line 24) | type Product2CRepository interface

FILE: book-shop/app/item/domain/repository/product_repository.go
  type ProductRepository (line 24) | type ProductRepository interface

FILE: book-shop/app/item/domain/repository/repository_registry.go
  type RepositoryRegistry (line 18) | type RepositoryRegistry struct
    method GetProductRepository (line 30) | func (r *RepositoryRegistry) GetProductRepository() ProductRepository {
    method SetProductRepository (line 34) | func (r *RepositoryRegistry) SetProductRepository(productRepositoryIns...
    method GetProduct2CRepository (line 38) | func (r *RepositoryRegistry) GetProduct2CRepository() Product2CReposit...
    method SetProduct2CRepository (line 42) | func (r *RepositoryRegistry) SetProduct2CRepository(product2CRepositor...
    method GetStockRepository (line 46) | func (r *RepositoryRegistry) GetStockRepository() StockRepository {
    method SetStockRepository (line 50) | func (r *RepositoryRegistry) SetStockRepository(stockRepositoryIns Sto...
  function GetRegistry (line 26) | func GetRegistry() *RepositoryRegistry {

FILE: book-shop/app/item/domain/repository/stock_repository.go
  type StockRepository (line 22) | type StockRepository interface

FILE: book-shop/app/item/domain/service/product_query_service.go
  type ProductQueryService (line 26) | type ProductQueryService struct
    method GetProduct (line 35) | func (s *ProductQueryService) GetProduct(ctx context.Context, productI...
    method ListProducts (line 43) | func (s *ProductQueryService) ListProducts(ctx context.Context, name, ...
    method MGet2C (line 61) | func (s *ProductQueryService) MGet2C(ctx context.Context, productIds [...
    method Search (line 69) | func (s *ProductQueryService) Search(ctx context.Context, name, descri...
  function GetProductQueryServiceInstance (line 31) | func GetProductQueryServiceInstance() *ProductQueryService {

FILE: book-shop/app/item/domain/service/product_state_service.go
  type ProductStateService (line 29) | type ProductStateService struct
    method GetCanTransferFunc (line 101) | func (s *ProductStateService) GetCanTransferFunc(operationType constan...
    method getConstructTargetInfoFunc (line 110) | func (s *ProductStateService) getConstructTargetInfoFunc(operationType...
    method ConstructTargetInfo (line 119) | func (s *ProductStateService) ConstructTargetInfo(originProduct *entit...
    method OperateProduct (line 139) | func (s *ProductStateService) OperateProduct(ctx context.Context, orig...
  function GetProductStateService (line 33) | func GetProductStateService() *ProductStateService {
  type ProductStateInfo (line 37) | type ProductStateInfo struct
  type CanTransferFunc (line 41) | type CanTransferFunc
  type ConstructTargetInfoFunc (line 43) | type ConstructTargetInfoFunc

FILE: book-shop/app/item/domain/service/product_stock_service.go
  type ProductStockService (line 24) | type ProductStockService struct
    method IncreaseStockNum (line 32) | func (s *ProductStockService) IncreaseStockNum(ctx context.Context, pr...
    method DecreaseStockNum (line 36) | func (s *ProductStockService) DecreaseStockNum(ctx context.Context, pr...
  function GetProductStockServiceInstance (line 28) | func GetProductStockServiceInstance() *ProductStockService {

FILE: book-shop/app/item/domain/service/product_update_service.go
  type ProductUpdateService (line 26) | type ProductUpdateService struct
    method AddProduct (line 34) | func (s *ProductUpdateService) AddProduct(ctx context.Context, entity ...
    method EditProduct (line 42) | func (s *ProductUpdateService) EditProduct(ctx context.Context, origin...
  function GetProductUpdateServiceInstance (line 30) | func GetProductUpdateServiceInstance() *ProductUpdateService {

FILE: book-shop/app/item/handler.go
  type ItemServiceImpl (line 26) | type ItemServiceImpl struct
    method Add (line 29) | func (s *ItemServiceImpl) Add(ctx context.Context, req *item.AddReq) (...
    method Edit (line 35) | func (s *ItemServiceImpl) Edit(ctx context.Context, req *item.EditReq)...
    method Delete (line 41) | func (s *ItemServiceImpl) Delete(ctx context.Context, req *item.Delete...
    method Online (line 47) | func (s *ItemServiceImpl) Online(ctx context.Context, req *item.Online...
    method Offline (line 53) | func (s *ItemServiceImpl) Offline(ctx context.Context, req *item.Offli...
    method Get (line 59) | func (s *ItemServiceImpl) Get(ctx context.Context, req *item.GetReq) (...
    method Search (line 65) | func (s *ItemServiceImpl) Search(ctx context.Context, req *item.Search...
    method List (line 71) | func (s *ItemServiceImpl) List(ctx context.Context, req *item.ListReq)...
    method MGet2C (line 77) | func (s *ItemServiceImpl) MGet2C(ctx context.Context, req *item.MGet2C...
    method DecrStock (line 83) | func (s *ItemServiceImpl) DecrStock(ctx context.Context, req *item.Dec...
    method DecrStockRevert (line 89) | func (s *ItemServiceImpl) DecrStockRevert(ctx context.Context, req *it...

FILE: book-shop/app/item/handler/add_handler.go
  type AddHandler (line 27) | type AddHandler struct
    method Add (line 39) | func (h *AddHandler) Add() (*item.AddResp, error) {
  function NewAddHandler (line 32) | func NewAddHandler(ctx context.Context, req *item.AddReq) *AddHandler {

FILE: book-shop/app/item/handler/decrease_stock_handler.go
  type DecrStockHandler (line 26) | type DecrStockHandler struct
    method DecrStock (line 38) | func (h *DecrStockHandler) DecrStock() (*item.DecrStockResp, error) {
  function NewDecrStockHandler (line 31) | func NewDecrStockHandler(ctx context.Context, req *item.DecrStockReq) *D...

FILE: book-shop/app/item/handler/decrease_stock_revert_handler.go
  type DecrStockRevertHandler (line 26) | type DecrStockRevertHandler struct
    method DecrStockRevert (line 38) | func (h *DecrStockRevertHandler) DecrStockRevert() (*item.DecrStockRes...
  function NewDecrStockRevertHandler (line 31) | func NewDecrStockRevertHandler(ctx context.Context, req *item.DecrStockR...

FILE: book-shop/app/item/handler/delete_handler.go
  type DeleteHandler (line 27) | type DeleteHandler struct
    method Delete (line 39) | func (h *DeleteHandler) Delete() (*item.DeleteResp, error) {
  function NewDeleteHandler (line 32) | func NewDeleteHandler(ctx context.Context, req *item.DeleteReq) *DeleteH...

FILE: book-shop/app/item/handler/edit_handler.go
  type EditHandler (line 27) | type EditHandler struct
    method Edit (line 39) | func (h *EditHandler) Edit() (*item.EditResp, error) {
  function NewEditHandler (line 32) | func NewEditHandler(ctx context.Context, req *item.EditReq) *EditHandler {

FILE: book-shop/app/item/handler/get_handler.go
  type GetHandler (line 27) | type GetHandler struct
    method Get (line 39) | func (h *GetHandler) Get() (*item.GetResp, error) {
  function NewGetHandler (line 32) | func NewGetHandler(ctx context.Context, req *item.GetReq) *GetHandler {

FILE: book-shop/app/item/handler/list_handler.go
  type ListHandler (line 27) | type ListHandler struct
    method List (line 39) | func (h *ListHandler) List() (*item.ListResp, error) {
  function NewListHandler (line 32) | func NewListHandler(ctx context.Context, req *item.ListReq) *ListHandler {

FILE: book-shop/app/item/handler/mget2c_handler.go
  type MGet2CHandler (line 27) | type MGet2CHandler struct
    method MGet (line 39) | func (h *MGet2CHandler) MGet() (*item.MGet2CResp, error) {
  function NewMGet2CHandler (line 32) | func NewMGet2CHandler(ctx context.Context, req *item.MGet2CReq) *MGet2CH...

FILE: book-shop/app/item/handler/offline_handler.go
  type OfflineHandler (line 27) | type OfflineHandler struct
    method Offline (line 39) | func (h *OfflineHandler) Offline() (*item.OfflineResp, error) {
  function NewOfflineHandler (line 32) | func NewOfflineHandler(ctx context.Context, req *item.OfflineReq) *Offli...

FILE: book-shop/app/item/handler/online_handler.go
  type OnlineHandler (line 27) | type OnlineHandler struct
    method Online (line 39) | func (h *OnlineHandler) Online() (*item.OnlineResp, error) {
  function NewOnlineHandler (line 32) | func NewOnlineHandler(ctx context.Context, req *item.OnlineReq) *OnlineH...

FILE: book-shop/app/item/handler/search_handler.go
  type SearchHandler (line 27) | type SearchHandler struct
    method Search (line 39) | func (h *SearchHandler) Search() (*item.SearchResp, error) {
  function NewSearchHandler (line 32) | func NewSearchHandler(ctx context.Context, req *item.SearchReq) *SearchH...

FILE: book-shop/app/item/infras/es/client.go
  function GetESClient (line 36) | func GetESClient() *elastic.Client {
  function UpsertProductES (line 53) | func UpsertProductES(ctx context.Context, productId int64, product *enti...
  function BatchGetProductById (line 59) | func BatchGetProductById(ctx context.Context, productIds []int64) ([]*en...
  function SearchProduct (line 77) | func SearchProduct(ctx context.Context, filter map[string]interface{}) (...
  function getEntityFromSource (line 101) | func getEntityFromSource(source string) *entity.ProductEntity {
  function getDocFromEntity (line 121) | func getDocFromEntity(e *entity.ProductEntity) map[string]interface{} {

FILE: book-shop/app/item/infras/init.go
  function Init (line 20) | func Init() {

FILE: book-shop/app/item/infras/repository/converter/product_do_2_po.go
  type productDO2POConverter (line 25) | type productDO2POConverter struct
    method Convert2po (line 29) | func (converter *productDO2POConverter) Convert2po(ctx context.Context...

FILE: book-shop/app/item/infras/repository/converter/product_po_2_do.go
  type productPO2DOConverter (line 25) | type productPO2DOConverter struct
    method Convert2do (line 29) | func (converter *productPO2DOConverter) Convert2do(ctx context.Context...

FILE: book-shop/app/item/infras/repository/differ/po_diff.go
  type productPODiffer (line 23) | type productPODiffer struct
    method GetChangedMap (line 27) | func (differ *productPODiffer) GetChangedMap(origin, target *po.Produc...

FILE: book-shop/app/item/infras/repository/init.go
  function register (line 27) | func register() {
  function initDB (line 36) | func initDB() {
  function Init (line 49) | func Init() {

FILE: book-shop/app/item/infras/repository/product_2c_repo_impl.go
  type Product2CRepositoryImpl (line 25) | type Product2CRepositoryImpl struct
    method MGetProducts2C (line 27) | func (i Product2CRepositoryImpl) MGetProducts2C(ctx context.Context, p...
    method SearchProducts (line 32) | func (i Product2CRepositoryImpl) SearchProducts(ctx context.Context, n...

FILE: book-shop/app/item/infras/repository/product_repo_impl.go
  type ProductRepositoryImpl (line 31) | type ProductRepositoryImpl struct
    method AddProduct (line 33) | func (i ProductRepositoryImpl) AddProduct(ctx context.Context, product...
    method UpdateProduct (line 51) | func (i ProductRepositoryImpl) UpdateProduct(ctx context.Context, orig...
    method GetProductById (line 73) | func (i ProductRepositoryImpl) GetProductById(ctx context.Context, pro...
    method ListProducts (line 89) | func (i ProductRepositoryImpl) ListProducts(ctx context.Context, filte...

FILE: book-shop/app/item/infras/repository/stock_repo_impl.go
  type StockRepositoryImpl (line 26) | type StockRepositoryImpl struct
    method IncrStock (line 28) | func (i StockRepositoryImpl) IncrStock(ctx context.Context, productId,...
    method DecrStock (line 32) | func (i StockRepositoryImpl) DecrStock(ctx context.Context, productId,...
    method updateStock (line 36) | func (i StockRepositoryImpl) updateStock(ctx context.Context, productI...

FILE: book-shop/app/item/main.go
  function Init (line 30) | func Init() {
  function main (line 34) | func main() {

FILE: book-shop/app/order/common/converter.go
  function ConvertCreateReq2PO (line 27) | func ConvertCreateReq2PO(ctx context.Context, req *order.CreateOrderReq)...
  function ConvertPO2DTO (line 49) | func ConvertPO2DTO(ctx context.Context, po *db.Order) *order.OrderItem {

FILE: book-shop/app/order/dal/client/init.go
  function Init (line 18) | func Init() {

FILE: book-shop/app/order/dal/client/item.go
  function initItemRpc (line 35) | func initItemRpc() {
  function DecreaseStock (line 54) | func DecreaseStock(ctx context.Context, productId, stockNum int64) error {
  function DecreaseStockRevert (line 69) | func DecreaseStockRevert(ctx context.Context, productId, stockNum int64)...
  function GetProductSnapshot (line 84) | func GetProductSnapshot(ctx context.Context, productId int64) (string, e...

FILE: book-shop/app/order/dal/client/user.go
  function initUserRpc (line 33) | func initUserRpc() {
  function GetUserName (line 52) | func GetUserName(ctx context.Context, userId int64) (string, error) {

FILE: book-shop/app/order/dal/db/init.go
  function Init (line 27) | func Init() {

FILE: book-shop/app/order/dal/db/order.go
  type Order (line 26) | type Order struct
    method TableName (line 37) | func (o *Order) TableName() string {
  function CreateOrder (line 41) | func CreateOrder(ctx context.Context, orders []*Order) error {
  function UpdateOrder (line 45) | func UpdateOrder(ctx context.Context, orderId int64, updateMap map[strin...
  function ListOrders (line 50) | func ListOrders(ctx context.Context, filterMap map[string]interface{}) (...
  function GetOrderById (line 63) | func GetOrderById(ctx context.Context, orderId int64) (*Order, error) {

FILE: book-shop/app/order/handler.go
  type OrderServiceImpl (line 28) | type OrderServiceImpl struct
    method CreateOrder (line 31) | func (s *OrderServiceImpl) CreateOrder(ctx context.Context, req *order...
    method CancelOrder (line 44) | func (s *OrderServiceImpl) CancelOrder(ctx context.Context, req *order...
    method ListOrder (line 57) | func (s *OrderServiceImpl) ListOrder(ctx context.Context, req *order.L...
    method GetOrderById (line 75) | func (s *OrderServiceImpl) GetOrderById(ctx context.Context, req *orde...

FILE: book-shop/app/order/main.go
  function Init (line 31) | func Init() {
  function main (line 36) | func main() {

FILE: book-shop/app/order/module/order_query_module.go
  type QueryModule (line 24) | type QueryModule struct
    method ListOrder (line 34) | func (m QueryModule) ListOrder(userId int64, status *int64) ([]*db.Ord...
    method GetOrderById (line 44) | func (m QueryModule) GetOrderById(orderId int64) (*db.Order, error) {
  function NewQueryModule (line 28) | func NewQueryModule(ctx context.Context) QueryModule {

FILE: book-shop/app/order/module/order_update_module.go
  type UpdateModule (line 27) | type UpdateModule struct
    method CreateOrder (line 37) | func (m UpdateModule) CreateOrder(req *order.CreateOrderReq) error {
    method createRollback (line 59) | func (m UpdateModule) createRollback(req *order.CreateOrderReq) {
    method CancelOrder (line 63) | func (m UpdateModule) CancelOrder(req *order.CancelOrderReq) error {
    method cancelRollback (line 85) | func (m UpdateModule) cancelRollback(productId, stockNum int64) {
  function NewUpdateModule (line 31) | func NewUpdateModule(ctx context.Context) UpdateModule {

FILE: book-shop/app/user/handler.go
  type UserServiceImpl (line 27) | type UserServiceImpl struct
    method CreateUser (line 30) | func (s *UserServiceImpl) CreateUser(ctx context.Context, req *user.Cr...
    method MGetUser (line 48) | func (s *UserServiceImpl) MGetUser(ctx context.Context, req *user.MGet...
    method CheckUser (line 67) | func (s *UserServiceImpl) CheckUser(ctx context.Context, req *user.Che...

FILE: book-shop/app/user/infras/db/init.go
  function Init (line 27) | func Init() {

FILE: book-shop/app/user/infras/db/user.go
  type User (line 25) | type User struct
    method TableName (line 31) | func (u *User) TableName() string {
  function MGetUsers (line 36) | func MGetUsers(ctx context.Context, userIDs []int64) ([]*User, error) {
  function CreateUser (line 49) | func CreateUser(ctx context.Context, users []*User) error {
  function QueryUser (line 54) | func QueryUser(ctx context.Context, userName string) ([]*User, error) {

FILE: book-shop/app/user/infras/redis/client.go
  function init (line 28) | func init() {
  function GetClient (line 44) | func GetClient() redigo.Conn {
  function Upsert (line 48) | func Upsert(userId int64, userInfo string) error {
  function Del (line 56) | func Del(userId int64) error {
  function IsExist (line 64) | func IsExist(userId int64) (bool, error) {
  function MGet (line 72) | func MGet(userIds []int64) ([]string, error) {

FILE: book-shop/app/user/main.go
  function Init (line 30) | func Init() {
  function main (line 34) | func main() {

FILE: book-shop/app/user/service/user_service.go
  type UserService (line 31) | type UserService struct
    method CreateUser (line 41) | func (s *UserService) CreateUser(req *user.CreateUserReq) error {
    method MGetUser (line 62) | func (s *UserService) MGetUser(req *user.MGetUserReq) ([]*user.User, e...
    method CheckUser (line 99) | func (s *UserService) CheckUser(req *user.CheckUserReq) (int64, error) {
    method getDtoFromString (line 121) | func (s *UserService) getDtoFromString(userInfo string) *user.User {
  function NewUserService (line 35) | func NewUserService(ctx context.Context) *UserService {

FILE: book-shop/deploy/mysql/init.sql
  type `t_user` (line 1) | create table `t_user`
  type `t_product` (line 13) | create table `t_product`
  type `t_order` (line 33) | create table `t_order`

FILE: book-shop/docs/docs.go
  constant docTemplate (line 7) | docTemplate = `{
  function init (line 818) | func init() {

FILE: book-shop/kitex_gen/base/base.go
  type BaseResp (line 11) | type BaseResp struct
    method GetStatusMessage (line 25) | func (p *BaseResp) GetStatusMessage() (v string) {
    method GetStatusCode (line 29) | func (p *BaseResp) GetStatusCode() (v int32) {
    method GetExtra (line 35) | func (p *BaseResp) GetExtra() (v map[string]string) {
    method SetStatusMessage (line 41) | func (p *BaseResp) SetStatusMessage(val string) {
    method SetStatusCode (line 44) | func (p *BaseResp) SetStatusCode(val int32) {
    method SetExtra (line 47) | func (p *BaseResp) SetExtra(val map[string]string) {
    method IsSetExtra (line 57) | func (p *BaseResp) IsSetExtra() bool {
    method Read (line 61) | func (p *BaseResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 140) | func (p *BaseResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 149) | func (p *BaseResp) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 158) | func (p *BaseResp) ReadField3(iprot thrift.TProtocol) error {
    method Write (line 187) | func (p *BaseResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 224) | func (p *BaseResp) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 241) | func (p *BaseResp) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 258) | func (p *BaseResp) writeField3(oprot thrift.TProtocol) (err error) {
    method String (line 290) | func (p *BaseResp) String() string {
    method DeepEqual (line 297) | func (p *BaseResp) DeepEqual(ano *BaseResp) bool {
    method Field1DeepEqual (line 315) | func (p *BaseResp) Field1DeepEqual(src string) bool {
    method Field2DeepEqual (line 322) | func (p *BaseResp) Field2DeepEqual(src int32) bool {
    method Field3DeepEqual (line 329) | func (p *BaseResp) Field3DeepEqual(src map[string]string) bool {
  function NewBaseResp (line 17) | func NewBaseResp() *BaseResp {

FILE: book-shop/kitex_gen/base/k-base.go
  method FastRead (line 26) | func (p *BaseResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 125) | func (p *BaseResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 139) | func (p *BaseResp) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 153) | func (p *BaseResp) FastReadField3(buf []byte) (int, error) {
  method FastWrite (line 194) | func (p *BaseResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 198) | func (p *BaseResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bina...
  method BLength (line 211) | func (p *BaseResp) BLength() int {
  method fastWriteField1 (line 224) | func (p *BaseResp) fastWriteField1(buf []byte, binaryWriter bthrift.Bina...
  method fastWriteField2 (line 233) | func (p *BaseResp) fastWriteField2(buf []byte, binaryWriter bthrift.Bina...
  method fastWriteField3 (line 242) | func (p *BaseResp) fastWriteField3(buf []byte, binaryWriter bthrift.Bina...
  method field1Length (line 264) | func (p *BaseResp) field1Length() int {
  method field2Length (line 273) | func (p *BaseResp) field2Length() int {
  method field3Length (line 282) | func (p *BaseResp) field3Length() int {

FILE: book-shop/kitex_gen/cwg/bookshop/item/item.go
  type Status (line 15) | type Status
    method String (line 23) | func (p Status) String() string {
    method Scan (line 49) | func (p *Status) Scan(value interface{}) (err error) {
    method Value (line 56) | func (p *Status) Value() (driver.Value, error) {
  constant Status_Online (line 18) | Status_Online  Status = 0
  constant Status_Offline (line 19) | Status_Offline Status = 1
  constant Status_Delete (line 20) | Status_Delete  Status = 2
  function StatusFromString (line 35) | func StatusFromString(s string) (Status, error) {
  function StatusPtr (line 47) | func StatusPtr(v Status) *Status { return &v }
  type BookProperty (line 63) | type BookProperty struct
    method GetIsbn (line 73) | func (p *BookProperty) GetIsbn() (v string) {
    method GetSpuName (line 77) | func (p *BookProperty) GetSpuName() (v string) {
    method GetSpuPrice (line 81) | func (p *BookProperty) GetSpuPrice() (v int64) {
    method SetIsbn (line 84) | func (p *BookProperty) SetIsbn(val string) {
    method SetSpuName (line 87) | func (p *BookProperty) SetSpuName(val string) {
    method SetSpuPrice (line 90) | func (p *BookProperty) SetSpuPrice(val int64) {
    method Read (line 100) | func (p *BookProperty) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 179) | func (p *BookProperty) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 188) | func (p *BookProperty) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 197) | func (p *BookProperty) ReadField3(iprot thrift.TProtocol) error {
    method Write (line 206) | func (p *BookProperty) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 243) | func (p *BookProperty) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 260) | func (p *BookProperty) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 277) | func (p *BookProperty) writeField3(oprot thrift.TProtocol) (err error) {
    method String (line 294) | func (p *BookProperty) String() string {
    method DeepEqual (line 301) | func (p *BookProperty) DeepEqual(ano *BookProperty) bool {
    method Field1DeepEqual (line 319) | func (p *BookProperty) Field1DeepEqual(src string) bool {
    method Field2DeepEqual (line 326) | func (p *BookProperty) Field2DeepEqual(src string) bool {
    method Field3DeepEqual (line 333) | func (p *BookProperty) Field3DeepEqual(src int64) bool {
  function NewBookProperty (line 69) | func NewBookProperty() *BookProperty {
  type Product (line 341) | type Product struct
    method GetProductId (line 356) | func (p *Product) GetProductId() (v int64) {
    method GetName (line 360) | func (p *Product) GetName() (v string) {
    method GetPic (line 364) | func (p *Product) GetPic() (v string) {
    method GetDescription (line 368) | func (p *Product) GetDescription() (v string) {
    method GetProperty (line 374) | func (p *Product) GetProperty() (v *BookProperty) {
    method GetPrice (line 381) | func (p *Product) GetPrice() (v int64) {
    method GetStock (line 385) | func (p *Product) GetStock() (v int64) {
    method GetStatus (line 389) | func (p *Product) GetStatus() (v Status) {
    method SetProductId (line 392) | func (p *Product) SetProductId(val int64) {
    method SetName (line 395) | func (p *Product) SetName(val string) {
    method SetPic (line 398) | func (p *Product) SetPic(val string) {
    method SetDescription (line 401) | func (p *Product) SetDescription(val string) {
    method SetProperty (line 404) | func (p *Product) SetProperty(val *BookProperty) {
    method SetPrice (line 407) | func (p *Product) SetPrice(val int64) {
    method SetStock (line 410) | func (p *Product) SetStock(val int64) {
    method SetStatus (line 413) | func (p *Product) SetStatus(val Status) {
    method IsSetProperty (line 428) | func (p *Product) IsSetProperty() bool {
    method Read (line 432) | func (p *Product) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 561) | func (p *Product) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 570) | func (p *Product) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 579) | func (p *Product) ReadField3(iprot thrift.TProtocol) error {
    method ReadField4 (line 588) | func (p *Product) ReadField4(iprot thrift.TProtocol) error {
    method ReadField5 (line 597) | func (p *Product) ReadField5(iprot thrift.TProtocol) error {
    method ReadField6 (line 605) | func (p *Product) ReadField6(iprot thrift.TProtocol) error {
    method ReadField7 (line 614) | func (p *Product) ReadField7(iprot thrift.TProtocol) error {
    method ReadField8 (line 623) | func (p *Product) ReadField8(iprot thrift.TProtocol) error {
    method Write (line 632) | func (p *Product) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 689) | func (p *Product) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 706) | func (p *Product) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 723) | func (p *Product) writeField3(oprot thrift.TProtocol) (err error) {
    method writeField4 (line 740) | func (p *Product) writeField4(oprot thrift.TProtocol) (err error) {
    method writeField5 (line 757) | func (p *Product) writeField5(oprot thrift.TProtocol) (err error) {
    method writeField6 (line 774) | func (p *Product) writeField6(oprot thrift.TProtocol) (err error) {
    method writeField7 (line 791) | func (p *Product) writeField7(oprot thrift.TProtocol) (err error) {
    method writeField8 (line 808) | func (p *Product) writeField8(oprot thrift.TProtocol) (err error) {
    method String (line 825) | func (p *Product) String() string {
    method DeepEqual (line 832) | func (p *Product) DeepEqual(ano *Product) bool {
    method Field1DeepEqual (line 865) | func (p *Product) Field1DeepEqual(src int64) bool {
    method Field2DeepEqual (line 872) | func (p *Product) Field2DeepEqual(src string) bool {
    method Field3DeepEqual (line 879) | func (p *Product) Field3DeepEqual(src string) bool {
    method Field4DeepEqual (line 886) | func (p *Product) Field4DeepEqual(src string) bool {
    method Field5DeepEqual (line 893) | func (p *Product) Field5DeepEqual(src *BookProperty) bool {
    method Field6DeepEqual (line 900) | func (p *Product) Field6DeepEqual(src int64) bool {
    method Field7DeepEqual (line 907) | func (p *Product) Field7DeepEqual(src int64) bool {
    method Field8DeepEqual (line 914) | func (p *Product) Field8DeepEqual(src Status) bool {
  function NewProduct (line 352) | func NewProduct() *Product {
  type AddReq (line 922) | type AddReq struct
    method GetName (line 935) | func (p *AddReq) GetName() (v string) {
    method GetPic (line 939) | func (p *AddReq) GetPic() (v string) {
    method GetDescription (line 943) | func (p *AddReq) GetDescription() (v string) {
    method GetProperty (line 949) | func (p *AddReq) GetProperty() (v *BookProperty) {
    method GetPrice (line 956) | func (p *AddReq) GetPrice() (v int64) {
    method GetStock (line 960) | func (p *AddReq) GetStock() (v int64) {
    method SetName (line 963) | func (p *AddReq) SetName(val string) {
    method SetPic (line 966) | func (p *AddReq) SetPic(val string) {
    method SetDescription (line 969) | func (p *AddReq) SetDescription(val string) {
    method SetProperty (line 972) | func (p *AddReq) SetProperty(val *BookProperty) {
    method SetPrice (line 975) | func (p *AddReq) SetPrice(val int64) {
    method SetStock (line 978) | func (p *AddReq) SetStock(val int64) {
    method IsSetProperty (line 991) | func (p *AddReq) IsSetProperty() bool {
    method Read (line 995) | func (p *AddReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 1147) | func (p *AddReq) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 1156) | func (p *AddReq) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 1165) | func (p *AddReq) ReadField3(iprot thrift.TProtocol) error {
    method ReadField4 (line 1174) | func (p *AddReq) ReadField4(iprot thrift.TProtocol) error {
    method ReadField5 (line 1182) | func (p *AddReq) ReadField5(iprot thrift.TProtocol) error {
    method ReadField6 (line 1191) | func (p *AddReq) ReadField6(iprot thrift.TProtocol) error {
    method Write (line 1200) | func (p *AddReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 1249) | func (p *AddReq) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 1266) | func (p *AddReq) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 1283) | func (p *AddReq) writeField3(oprot thrift.TProtocol) (err error) {
    method writeField4 (line 1300) | func (p *AddReq) writeField4(oprot thrift.TProtocol) (err error) {
    method writeField5 (line 1317) | func (p *AddReq) writeField5(oprot thrift.TProtocol) (err error) {
    method writeField6 (line 1334) | func (p *AddReq) writeField6(oprot thrift.TProtocol) (err error) {
    method String (line 1351) | func (p *AddReq) String() string {
    method DeepEqual (line 1358) | func (p *AddReq) DeepEqual(ano *AddReq) bool {
    method Field1DeepEqual (line 1385) | func (p *AddReq) Field1DeepEqual(src string) bool {
    method Field2DeepEqual (line 1392) | func (p *AddReq) Field2DeepEqual(src string) bool {
    method Field3DeepEqual (line 1399) | func (p *AddReq) Field3DeepEqual(src string) bool {
    method Field4DeepEqual (line 1406) | func (p *AddReq) Field4DeepEqual(src *BookProperty) bool {
    method Field5DeepEqual (line 1413) | func (p *AddReq) Field5DeepEqual(src int64) bool {
    method Field6DeepEqual (line 1420) | func (p *AddReq) Field6DeepEqual(src int64) bool {
  function NewAddReq (line 931) | func NewAddReq() *AddReq {
  type AddResp (line 1428) | type AddResp struct
    method GetProductId (line 1437) | func (p *AddResp) GetProductId() (v int64) {
    method GetBaseResp (line 1443) | func (p *AddResp) GetBaseResp() (v *base.BaseResp) {
    method SetProductId (line 1449) | func (p *AddResp) SetProductId(val int64) {
    method SetBaseResp (line 1452) | func (p *AddResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 1461) | func (p *AddResp) IsSetBaseResp() bool {
    method Read (line 1465) | func (p *AddResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 1534) | func (p *AddResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField255 (line 1543) | func (p *AddResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 1551) | func (p *AddResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 1584) | func (p *AddResp) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 1601) | func (p *AddResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 1618) | func (p *AddResp) String() string {
    method DeepEqual (line 1625) | func (p *AddResp) DeepEqual(ano *AddResp) bool {
    method Field1DeepEqual (line 1640) | func (p *AddResp) Field1DeepEqual(src int64) bool {
    method Field255DeepEqual (line 1647) | func (p *AddResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewAddResp (line 1433) | func NewAddResp() *AddResp {
  type EditReq (line 1655) | type EditReq struct
    method GetProductId (line 1669) | func (p *EditReq) GetProductId() (v int64) {
    method GetName (line 1675) | func (p *EditReq) GetName() (v string) {
    method GetPic (line 1684) | func (p *EditReq) GetPic() (v string) {
    method GetDescription (line 1693) | func (p *EditReq) GetDescription() (v string) {
    method GetProperty (line 1702) | func (p *EditReq) GetProperty() (v *BookProperty) {
    method GetPrice (line 1711) | func (p *EditReq) GetPrice() (v int64) {
    method GetStock (line 1720) | func (p *EditReq) GetStock() (v int64) {
    method SetProductId (line 1726) | func (p *EditReq) SetProductId(val int64) {
    method SetName (line 1729) | func (p *EditReq) SetName(val *string) {
    method SetPic (line 1732) | func (p *EditReq) SetPic(val *string) {
    method SetDescription (line 1735) | func (p *EditReq) SetDescription(val *string) {
    method SetProperty (line 1738) | func (p *EditReq) SetProperty(val *BookProperty) {
    method SetPrice (line 1741) | func (p *EditReq) SetPrice(val *int64) {
    method SetStock (line 1744) | func (p *EditReq) SetStock(val *int64) {
    method IsSetName (line 1758) | func (p *EditReq) IsSetName() bool {
    method IsSetPic (line 1762) | func (p *EditReq) IsSetPic() bool {
    method IsSetDescription (line 1766) | func (p *EditReq) IsSetDescription() bool {
    method IsSetProperty (line 1770) | func (p *EditReq) IsSetProperty() bool {
    method IsSetPrice (line 1774) | func (p *EditReq) IsSetPrice() bool {
    method IsSetStock (line 1778) | func (p *EditReq) IsSetStock() bool {
    method Read (line 1782) | func (p *EditReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 1909) | func (p *EditReq) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 1918) | func (p *EditReq) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 1927) | func (p *EditReq) ReadField3(iprot thrift.TProtocol) error {
    method ReadField4 (line 1936) | func (p *EditReq) ReadField4(iprot thrift.TProtocol) error {
    method ReadField5 (line 1945) | func (p *EditReq) ReadField5(iprot thrift.TProtocol) error {
    method ReadField6 (line 1953) | func (p *EditReq) ReadField6(iprot thrift.TProtocol) error {
    method ReadField7 (line 1962) | func (p *EditReq) ReadField7(iprot thrift.TProtocol) error {
    method Write (line 1971) | func (p *EditReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 2024) | func (p *EditReq) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 2041) | func (p *EditReq) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 2060) | func (p *EditReq) writeField3(oprot thrift.TProtocol) (err error) {
    method writeField4 (line 2079) | func (p *EditReq) writeField4(oprot thrift.TProtocol) (err error) {
    method writeField5 (line 2098) | func (p *EditReq) writeField5(oprot thrift.TProtocol) (err error) {
    method writeField6 (line 2117) | func (p *EditReq) writeField6(oprot thrift.TProtocol) (err error) {
    method writeField7 (line 2136) | func (p *EditReq) writeField7(oprot thrift.TProtocol) (err error) {
    method String (line 2155) | func (p *EditReq) String() string {
    method DeepEqual (line 2162) | func (p *EditReq) DeepEqual(ano *EditReq) bool {
    method Field1DeepEqual (line 2192) | func (p *EditReq) Field1DeepEqual(src int64) bool {
    method Field2DeepEqual (line 2199) | func (p *EditReq) Field2DeepEqual(src *string) bool {
    method Field3DeepEqual (line 2211) | func (p *EditReq) Field3DeepEqual(src *string) bool {
    method Field4DeepEqual (line 2223) | func (p *EditReq) Field4DeepEqual(src *string) bool {
    method Field5DeepEqual (line 2235) | func (p *EditReq) Field5DeepEqual(src *BookProperty) bool {
    method Field6DeepEqual (line 2242) | func (p *EditReq) Field6DeepEqual(src *int64) bool {
    method Field7DeepEqual (line 2254) | func (p *EditReq) Field7DeepEqual(src *int64) bool {
  function NewEditReq (line 1665) | func NewEditReq() *EditReq {
  type EditResp (line 2267) | type EditResp struct
    method GetBaseResp (line 2277) | func (p *EditResp) GetBaseResp() (v *base.BaseResp) {
    method SetBaseResp (line 2283) | func (p *EditResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 2291) | func (p *EditResp) IsSetBaseResp() bool {
    method Read (line 2295) | func (p *EditResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField255 (line 2354) | func (p *EditResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 2362) | func (p *EditResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 2391) | func (p *EditResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 2408) | func (p *EditResp) String() string {
    method DeepEqual (line 2415) | func (p *EditResp) DeepEqual(ano *EditResp) bool {
    method Field255DeepEqual (line 2427) | func (p *EditResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewEditResp (line 2271) | func NewEditResp() *EditResp {
  type DeleteReq (line 2435) | type DeleteReq struct
    method GetProductId (line 2443) | func (p *DeleteReq) GetProductId() (v int64) {
    method SetProductId (line 2446) | func (p *DeleteReq) SetProductId(val int64) {
    method Read (line 2454) | func (p *DeleteReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 2521) | func (p *DeleteReq) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 2530) | func (p *DeleteReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 2559) | func (p *DeleteReq) writeField1(oprot thrift.TProtocol) (err error) {
    method String (line 2576) | func (p *DeleteReq) String() string {
    method DeepEqual (line 2583) | func (p *DeleteReq) DeepEqual(ano *DeleteReq) bool {
    method Field1DeepEqual (line 2595) | func (p *DeleteReq) Field1DeepEqual(src int64) bool {
  function NewDeleteReq (line 2439) | func NewDeleteReq() *DeleteReq {
  type DeleteResp (line 2603) | type DeleteResp struct
    method GetBaseResp (line 2613) | func (p *DeleteResp) GetBaseResp() (v *base.BaseResp) {
    method SetBaseResp (line 2619) | func (p *DeleteResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 2627) | func (p *DeleteResp) IsSetBaseResp() bool {
    method Read (line 2631) | func (p *DeleteResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField255 (line 2690) | func (p *DeleteResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 2698) | func (p *DeleteResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 2727) | func (p *DeleteResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 2744) | func (p *DeleteResp) String() string {
    method DeepEqual (line 2751) | func (p *DeleteResp) DeepEqual(ano *DeleteResp) bool {
    method Field255DeepEqual (line 2763) | func (p *DeleteResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewDeleteResp (line 2607) | func NewDeleteResp() *DeleteResp {
  type OnlineReq (line 2771) | type OnlineReq struct
    method GetProductId (line 2779) | func (p *OnlineReq) GetProductId() (v int64) {
    method SetProductId (line 2782) | func (p *OnlineReq) SetProductId(val int64) {
    method Read (line 2790) | func (p *OnlineReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 2857) | func (p *OnlineReq) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 2866) | func (p *OnlineReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 2895) | func (p *OnlineReq) writeField1(oprot thrift.TProtocol) (err error) {
    method String (line 2912) | func (p *OnlineReq) String() string {
    method DeepEqual (line 2919) | func (p *OnlineReq) DeepEqual(ano *OnlineReq) bool {
    method Field1DeepEqual (line 2931) | func (p *OnlineReq) Field1DeepEqual(src int64) bool {
  function NewOnlineReq (line 2775) | func NewOnlineReq() *OnlineReq {
  type OnlineResp (line 2939) | type OnlineResp struct
    method GetBaseResp (line 2949) | func (p *OnlineResp) GetBaseResp() (v *base.BaseResp) {
    method SetBaseResp (line 2955) | func (p *OnlineResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 2963) | func (p *OnlineResp) IsSetBaseResp() bool {
    method Read (line 2967) | func (p *OnlineResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField255 (line 3026) | func (p *OnlineResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 3034) | func (p *OnlineResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 3063) | func (p *OnlineResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 3080) | func (p *OnlineResp) String() string {
    method DeepEqual (line 3087) | func (p *OnlineResp) DeepEqual(ano *OnlineResp) bool {
    method Field255DeepEqual (line 3099) | func (p *OnlineResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewOnlineResp (line 2943) | func NewOnlineResp() *OnlineResp {
  type OfflineReq (line 3107) | type OfflineReq struct
    method GetProductId (line 3115) | func (p *OfflineReq) GetProductId() (v int64) {
    method SetProductId (line 3118) | func (p *OfflineReq) SetProductId(val int64) {
    method Read (line 3126) | func (p *OfflineReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 3193) | func (p *OfflineReq) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 3202) | func (p *OfflineReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 3231) | func (p *OfflineReq) writeField1(oprot thrift.TProtocol) (err error) {
    method String (line 3248) | func (p *OfflineReq) String() string {
    method DeepEqual (line 3255) | func (p *OfflineReq) DeepEqual(ano *OfflineReq) bool {
    method Field1DeepEqual (line 3267) | func (p *OfflineReq) Field1DeepEqual(src int64) bool {
  function NewOfflineReq (line 3111) | func NewOfflineReq() *OfflineReq {
  type OfflineResp (line 3275) | type OfflineResp struct
    method GetBaseResp (line 3285) | func (p *OfflineResp) GetBaseResp() (v *base.BaseResp) {
    method SetBaseResp (line 3291) | func (p *OfflineResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 3299) | func (p *OfflineResp) IsSetBaseResp() bool {
    method Read (line 3303) | func (p *OfflineResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField255 (line 3362) | func (p *OfflineResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 3370) | func (p *OfflineResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 3399) | func (p *OfflineResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 3416) | func (p *OfflineResp) String() string {
    method DeepEqual (line 3423) | func (p *OfflineResp) DeepEqual(ano *OfflineResp) bool {
    method Field255DeepEqual (line 3435) | func (p *OfflineResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewOfflineResp (line 3279) | func NewOfflineResp() *OfflineResp {
  type GetReq (line 3443) | type GetReq struct
    method GetProductId (line 3451) | func (p *GetReq) GetProductId() (v int64) {
    method SetProductId (line 3454) | func (p *GetReq) SetProductId(val int64) {
    method Read (line 3462) | func (p *GetReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 3529) | func (p *GetReq) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 3538) | func (p *GetReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 3567) | func (p *GetReq) writeField1(oprot thrift.TProtocol) (err error) {
    method String (line 3584) | func (p *GetReq) String() string {
    method DeepEqual (line 3591) | func (p *GetReq) DeepEqual(ano *GetReq) bool {
    method Field1DeepEqual (line 3603) | func (p *GetReq) Field1DeepEqual(src int64) bool {
  function NewGetReq (line 3447) | func NewGetReq() *GetReq {
  type GetResp (line 3611) | type GetResp struct
    method GetProduct (line 3622) | func (p *GetResp) GetProduct() (v *Product) {
    method GetBaseResp (line 3631) | func (p *GetResp) GetBaseResp() (v *base.BaseResp) {
    method SetProduct (line 3637) | func (p *GetResp) SetProduct(val *Product) {
    method SetBaseResp (line 3640) | func (p *GetResp) SetBaseResp(val *base.BaseResp) {
    method IsSetProduct (line 3649) | func (p *GetResp) IsSetProduct() bool {
    method IsSetBaseResp (line 3653) | func (p *GetResp) IsSetBaseResp() bool {
    method Read (line 3657) | func (p *GetResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 3726) | func (p *GetResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField255 (line 3734) | func (p *GetResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 3742) | func (p *GetResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 3775) | func (p *GetResp) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 3792) | func (p *GetResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 3809) | func (p *GetResp) String() string {
    method DeepEqual (line 3816) | func (p *GetResp) DeepEqual(ano *GetResp) bool {
    method Field1DeepEqual (line 3831) | func (p *GetResp) Field1DeepEqual(src *Product) bool {
    method Field255DeepEqual (line 3838) | func (p *GetResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewGetResp (line 3616) | func NewGetResp() *GetResp {
  type MGet2CReq (line 3846) | type MGet2CReq struct
    method GetProductIds (line 3854) | func (p *MGet2CReq) GetProductIds() (v []int64) {
    method SetProductIds (line 3857) | func (p *MGet2CReq) SetProductIds(val []int64) {
    method Read (line 3865) | func (p *MGet2CReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 3932) | func (p *MGet2CReq) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 3954) | func (p *MGet2CReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 3983) | func (p *MGet2CReq) writeField1(oprot thrift.TProtocol) (err error) {
    method String (line 4008) | func (p *MGet2CReq) String() string {
    method DeepEqual (line 4015) | func (p *MGet2CReq) DeepEqual(ano *MGet2CReq) bool {
    method Field1DeepEqual (line 4027) | func (p *MGet2CReq) Field1DeepEqual(src []int64) bool {
  function NewMGet2CReq (line 3850) | func NewMGet2CReq() *MGet2CReq {
  type MGet2CResp (line 4041) | type MGet2CResp struct
    method GetProductMap (line 4050) | func (p *MGet2CResp) GetProductMap() (v map[int64]*Product) {
    method GetBaseResp (line 4056) | func (p *MGet2CResp) GetBaseResp() (v *base.BaseResp) {
    method SetProductMap (line 4062) | func (p *MGet2CResp) SetProductMap(val map[int64]*Product) {
    method SetBaseResp (line 4065) | func (p *MGet2CResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 4074) | func (p *MGet2CResp) IsSetBaseResp() bool {
    method Read (line 4078) | func (p *MGet2CResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 4147) | func (p *MGet2CResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField255 (line 4173) | func (p *MGet2CResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 4181) | func (p *MGet2CResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 4214) | func (p *MGet2CResp) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 4244) | func (p *MGet2CResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 4261) | func (p *MGet2CResp) String() string {
    method DeepEqual (line 4268) | func (p *MGet2CResp) DeepEqual(ano *MGet2CResp) bool {
    method Field1DeepEqual (line 4283) | func (p *MGet2CResp) Field1DeepEqual(src map[int64]*Product) bool {
    method Field255DeepEqual (line 4296) | func (p *MGet2CResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewMGet2CResp (line 4046) | func NewMGet2CResp() *MGet2CResp {
  type SearchReq (line 4304) | type SearchReq struct
    method GetName (line 4316) | func (p *SearchReq) GetName() (v string) {
    method GetDescription (line 4325) | func (p *SearchReq) GetDescription() (v string) {
    method GetSpuName (line 4334) | func (p *SearchReq) GetSpuName() (v string) {
    method SetName (line 4340) | func (p *SearchReq) SetName(val *string) {
    method SetDescription (line 4343) | func (p *SearchReq) SetDescription(val *string) {
    method SetSpuName (line 4346) | func (p *SearchReq) SetSpuName(val *string) {
    method IsSetName (line 4356) | func (p *SearchReq) IsSetName() bool {
    method IsSetDescription (line 4360) | func (p *SearchReq) IsSetDescription() bool {
    method IsSetSpuName (line 4364) | func (p *SearchReq) IsSetSpuName() bool {
    method Read (line 4368) | func (p *SearchReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 4447) | func (p *SearchReq) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 4456) | func (p *SearchReq) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 4465) | func (p *SearchReq) ReadField3(iprot thrift.TProtocol) error {
    method Write (line 4474) | func (p *SearchReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 4511) | func (p *SearchReq) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 4530) | func (p *SearchReq) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 4549) | func (p *SearchReq) writeField3(oprot thrift.TProtocol) (err error) {
    method String (line 4568) | func (p *SearchReq) String() string {
    method DeepEqual (line 4575) | func (p *SearchReq) DeepEqual(ano *SearchReq) bool {
    method Field1DeepEqual (line 4593) | func (p *SearchReq) Field1DeepEqual(src *string) bool {
    method Field2DeepEqual (line 4605) | func (p *SearchReq) Field2DeepEqual(src *string) bool {
    method Field3DeepEqual (line 4617) | func (p *SearchReq) Field3DeepEqual(src *string) bool {
  function NewSearchReq (line 4310) | func NewSearchReq() *SearchReq {
  type SearchResp (line 4630) | type SearchResp struct
    method GetProducts (line 4639) | func (p *SearchResp) GetProducts() (v []*Product) {
    method GetBaseResp (line 4645) | func (p *SearchResp) GetBaseResp() (v *base.BaseResp) {
    method SetProducts (line 4651) | func (p *SearchResp) SetProducts(val []*Product) {
    method SetBaseResp (line 4654) | func (p *SearchResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 4663) | func (p *SearchResp) IsSetBaseResp() bool {
    method Read (line 4667) | func (p *SearchResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 4736) | func (p *SearchResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField255 (line 4756) | func (p *SearchResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 4764) | func (p *SearchResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 4797) | func (p *SearchResp) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 4822) | func (p *SearchResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 4839) | func (p *SearchResp) String() string {
    method DeepEqual (line 4846) | func (p *SearchResp) DeepEqual(ano *SearchResp) bool {
    method Field1DeepEqual (line 4861) | func (p *SearchResp) Field1DeepEqual(src []*Product) bool {
    method Field255DeepEqual (line 4874) | func (p *SearchResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewSearchResp (line 4635) | func NewSearchResp() *SearchResp {
  type ListReq (line 4882) | type ListReq struct
    method GetName (line 4894) | func (p *ListReq) GetName() (v string) {
    method GetSpuName (line 4903) | func (p *ListReq) GetSpuName() (v string) {
    method GetStatus (line 4912) | func (p *ListReq) GetStatus() (v Status) {
    method SetName (line 4918) | func (p *ListReq) SetName(val *string) {
    method SetSpuName (line 4921) | func (p *ListReq) SetSpuName(val *string) {
    method SetStatus (line 4924) | func (p *ListReq) SetStatus(val *Status) {
    method IsSetName (line 4934) | func (p *ListReq) IsSetName() bool {
    method IsSetSpuName (line 4938) | func (p *ListReq) IsSetSpuName() bool {
    method IsSetStatus (line 4942) | func (p *ListReq) IsSetStatus() bool {
    method Read (line 4946) | func (p *ListReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 5025) | func (p *ListReq) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 5034) | func (p *ListReq) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 5043) | func (p *ListReq) ReadField3(iprot thrift.TProtocol) error {
    method Write (line 5053) | func (p *ListReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 5090) | func (p *ListReq) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 5109) | func (p *ListReq) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 5128) | func (p *ListReq) writeField3(oprot thrift.TProtocol) (err error) {
    method String (line 5147) | func (p *ListReq) String() string {
    method DeepEqual (line 5154) | func (p *ListReq) DeepEqual(ano *ListReq) bool {
    method Field1DeepEqual (line 5172) | func (p *ListReq) Field1DeepEqual(src *string) bool {
    method Field2DeepEqual (line 5184) | func (p *ListReq) Field2DeepEqual(src *string) bool {
    method Field3DeepEqual (line 5196) | func (p *ListReq) Field3DeepEqual(src *Status) bool {
  function NewListReq (line 4888) | func NewListReq() *ListReq {
  type ListResp (line 5209) | type ListResp struct
    method GetProducts (line 5218) | func (p *ListResp) GetProducts() (v []*Product) {
    method GetBaseResp (line 5224) | func (p *ListResp) GetBaseResp() (v *base.BaseResp) {
    method SetProducts (line 5230) | func (p *ListResp) SetProducts(val []*Product) {
    method SetBaseResp (line 5233) | func (p *ListResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 5242) | func (p *ListResp) IsSetBaseResp() bool {
    method Read (line 5246) | func (p *ListResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 5315) | func (p *ListResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField255 (line 5335) | func (p *ListResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 5343) | func (p *ListResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 5376) | func (p *ListResp) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 5401) | func (p *ListResp) writeField255(oprot thrift.TProtocol) (err error) {
    method String (line 5418) | func (p *ListResp) String() string {
    method DeepEqual (line 5425) | func (p *ListResp) DeepEqual(ano *ListResp) bool {
    method Field1DeepEqual (line 5440) | func (p *ListResp) Field1DeepEqual(src []*Product) bool {
    method Field255DeepEqual (line 5453) | func (p *ListResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewListResp (line 5214) | func NewListResp() *ListResp {
  type DecrStockReq (line 5461) | type DecrStockReq struct
    method GetProductId (line 5470) | func (p *DecrStockReq) GetProductId() (v int64) {
    method GetStockNum (line 5474) | func (p *DecrStockReq) GetStockNum() (v int64) {
    method SetProductId (line 5477) | func (p *DecrStockReq) SetProductId(val int64) {
    method SetStockNum (line 5480) | func (p *DecrStockReq) SetStockNum(val int64) {
    method Read (line 5489) | func (p *DecrStockReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 5573) | func (p *DecrStockReq) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 5582) | func (p *DecrStockReq) ReadField2(iprot thrift.TProtocol) error {
    method Write (line 5591) | func (p *DecrStockReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 5624) | func (p *DecrStockReq) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 5641) | func (p *DecrStockReq) writeField2(oprot thrift.TProtocol) (err error) {
    method String (line 5658) | func (p *DecrStockReq) String() string {
    method DeepEqual (line 5665) | func (p *DecrStockReq) DeepEqual(ano *DecrStockReq) bool {
    method Field1DeepEqual (line 5680) | func (p *DecrStockReq) Field1DeepEqual(src int64) bool {
    method Field2DeepEqual (line 5687) | func (p *DecrStockReq) Field2DeepEqual(src int64) bool {
  function NewDecrStockReq (line 5466) | func NewDecrStockReq() *DecrStockReq {
  type DecrStockResp (line 5695) | type DecrStockResp struct
    method GetBaseResp (line 5705) | func (p *DecrStockResp) GetBaseResp() (v *base.BaseResp) {
    method SetBaseResp (line 5711) | func (p *DecrStockResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 5719) | func (p *DecrStockResp) IsSetBaseResp() bool {
    method Read (line 5723) | func (p *DecrStockResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField255 (line 5782) | func (p *DecrStockResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 5790) | func (p *DecrStockResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 5819) | func (p *DecrStockResp) writeField255(oprot thrift.TProtocol) (err err...
    method String (line 5836) | func (p *DecrStockResp) String() string {
    method DeepEqual (line 5843) | func (p *DecrStockResp) DeepEqual(ano *DecrStockResp) bool {
    method Field255DeepEqual (line 5855) | func (p *DecrStockResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewDecrStockResp (line 5699) | func NewDecrStockResp() *DecrStockResp {
  type ItemService (line 5863) | type ItemService interface
  type ItemServiceClient (line 5887) | type ItemServiceClient struct
    method Client_ (line 5909) | func (p *ItemServiceClient) Client_() thrift.TClient {
    method Add (line 5913) | func (p *ItemServiceClient) Add(ctx context.Context, req *AddReq) (r *...
    method Edit (line 5923) | func (p *ItemServiceClient) Edit(ctx context.Context, req *EditReq) (r...
    method Delete (line 5933) | func (p *ItemServiceClient) Delete(ctx context.Context, req *DeleteReq...
    method Online (line 5943) | func (p *ItemServiceClient) Online(ctx context.Context, req *OnlineReq...
    method Offline (line 5953) | func (p *ItemServiceClient) Offline(ctx context.Context, req *OfflineR...
    method Get (line 5963) | func (p *ItemServiceClient) Get(ctx context.Context, req *GetReq) (r *...
    method MGet2C (line 5973) | func (p *ItemServiceClient) MGet2C(ctx context.Context, req *MGet2CReq...
    method Search (line 5983) | func (p *ItemServiceClient) Search(ctx context.Context, req *SearchReq...
    method List (line 5993) | func (p *ItemServiceClient) List(ctx context.Context, req *ListReq) (r...
    method DecrStock (line 6003) | func (p *ItemServiceClient) DecrStock(ctx context.Context, req *DecrSt...
    method DecrStockRevert (line 6013) | func (p *ItemServiceClient) DecrStockRevert(ctx context.Context, req *...
  function NewItemServiceClientFactory (line 5891) | func NewItemServiceClientFactory(t thrift.TTransport, f thrift.TProtocol...
  function NewItemServiceClientProtocol (line 5897) | func NewItemServiceClientProtocol(t thrift.TTransport, iprot thrift.TPro...
  function NewItemServiceClient (line 5903) | func NewItemServiceClient(c thrift.TClient) *ItemServiceClient {
  type ItemServiceProcessor (line 6023) | type ItemServiceProcessor struct
    method AddToProcessorMap (line 6028) | func (p *ItemServiceProcessor) AddToProcessorMap(key string, processor...
    method GetProcessorFunction (line 6032) | func (p *ItemServiceProcessor) GetProcessorFunction(key string) (proce...
    method ProcessorMap (line 6037) | func (p *ItemServiceProcessor) ProcessorMap() map[string]thrift.TProce...
    method Process (line 6056) | func (p *ItemServiceProcessor) Process(ctx context.Context, iprot, opr...
  function NewItemServiceProcessor (line 6041) | func NewItemServiceProcessor(handler ItemService) *ItemServiceProcessor {
  type itemServiceProcessorAdd (line 6074) | type itemServiceProcessorAdd struct
    method Process (line 6078) | func (p *itemServiceProcessorAdd) Process(ctx context.Context, seqId i...
  type itemServiceProcessorEdit (line 6122) | type itemServiceProcessorEdit struct
    method Process (line 6126) | func (p *itemServiceProcessorEdit) Process(ctx context.Context, seqId ...
  type itemServiceProcessorDelete (line 6170) | type itemServiceProcessorDelete struct
    method Process (line 6174) | func (p *itemServiceProcessorDelete) Process(ctx context.Context, seqI...
  type itemServiceProcessorOnline (line 6218) | type itemServiceProcessorOnline struct
    method Process (line 6222) | func (p *itemServiceProcessorOnline) Process(ctx context.Context, seqI...
  type itemServiceProcessorOffline (line 6266) | type itemServiceProcessorOffline struct
    method Process (line 6270) | func (p *itemServiceProcessorOffline) Process(ctx context.Context, seq...
  type itemServiceProcessorGet (line 6314) | type itemServiceProcessorGet struct
    method Process (line 6318) | func (p *itemServiceProcessorGet) Process(ctx context.Context, seqId i...
  type itemServiceProcessorMGet2C (line 6362) | type itemServiceProcessorMGet2C struct
    method Process (line 6366) | func (p *itemServiceProcessorMGet2C) Process(ctx context.Context, seqI...
  type itemServiceProcessorSearch (line 6410) | type itemServiceProcessorSearch struct
    method Process (line 6414) | func (p *itemServiceProcessorSearch) Process(ctx context.Context, seqI...
  type itemServiceProcessorList (line 6458) | type itemServiceProcessorList struct
    method Process (line 6462) | func (p *itemServiceProcessorList) Process(ctx context.Context, seqId ...
  type itemServiceProcessorDecrStock (line 6506) | type itemServiceProcessorDecrStock struct
    method Process (line 6510) | func (p *itemServiceProcessorDecrStock) Process(ctx context.Context, s...
  type itemServiceProcessorDecrStockRevert (line 6554) | type itemServiceProcessorDecrStockRevert struct
    method Process (line 6558) | func (p *itemServiceProcessorDecrStockRevert) Process(ctx context.Cont...
  type ItemServiceAddArgs (line 6602) | type ItemServiceAddArgs struct
    method GetReq (line 6612) | func (p *ItemServiceAddArgs) GetReq() (v *AddReq) {
    method SetReq (line 6618) | func (p *ItemServiceAddArgs) SetReq(val *AddReq) {
    method IsSetReq (line 6626) | func (p *ItemServiceAddArgs) IsSetReq() bool {
    method Read (line 6630) | func (p *ItemServiceAddArgs) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 6689) | func (p *ItemServiceAddArgs) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 6697) | func (p *ItemServiceAddArgs) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 6726) | func (p *ItemServiceAddArgs) writeField1(oprot thrift.TProtocol) (err ...
    method String (line 6743) | func (p *ItemServiceAddArgs) String() string {
    method DeepEqual (line 6750) | func (p *ItemServiceAddArgs) DeepEqual(ano *ItemServiceAddArgs) bool {
    method Field1DeepEqual (line 6762) | func (p *ItemServiceAddArgs) Field1DeepEqual(src *AddReq) bool {
  function NewItemServiceAddArgs (line 6606) | func NewItemServiceAddArgs() *ItemServiceAddArgs {
  type ItemServiceAddResult (line 6770) | type ItemServiceAddResult struct
    method GetSuccess (line 6780) | func (p *ItemServiceAddResult) GetSuccess() (v *AddResp) {
    method SetSuccess (line 6786) | func (p *ItemServiceAddResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 6794) | func (p *ItemServiceAddResult) IsSetSuccess() bool {
    method Read (line 6798) | func (p *ItemServiceAddResult) Read(iprot thrift.TProtocol) (err error) {
    method ReadField0 (line 6857) | func (p *ItemServiceAddResult) ReadField0(iprot thrift.TProtocol) error {
    method Write (line 6865) | func (p *ItemServiceAddResult) Write(oprot thrift.TProtocol) (err erro...
    method writeField0 (line 6894) | func (p *ItemServiceAddResult) writeField0(oprot thrift.TProtocol) (er...
    method String (line 6913) | func (p *ItemServiceAddResult) String() string {
    method DeepEqual (line 6920) | func (p *ItemServiceAddResult) DeepEqual(ano *ItemServiceAddResult) bo...
    method Field0DeepEqual (line 6932) | func (p *ItemServiceAddResult) Field0DeepEqual(src *AddResp) bool {
  function NewItemServiceAddResult (line 6774) | func NewItemServiceAddResult() *ItemServiceAddResult {
  type ItemServiceEditArgs (line 6940) | type ItemServiceEditArgs struct
    method GetReq (line 6950) | func (p *ItemServiceEditArgs) GetReq() (v *EditReq) {
    method SetReq (line 6956) | func (p *ItemServiceEditArgs) SetReq(val *EditReq) {
    method IsSetReq (line 6964) | func (p *ItemServiceEditArgs) IsSetReq() bool {
    method Read (line 6968) | func (p *ItemServiceEditArgs) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 7027) | func (p *ItemServiceEditArgs) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 7035) | func (p *ItemServiceEditArgs) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 7064) | func (p *ItemServiceEditArgs) writeField1(oprot thrift.TProtocol) (err...
    method String (line 7081) | func (p *ItemServiceEditArgs) String() string {
    method DeepEqual (line 7088) | func (p *ItemServiceEditArgs) DeepEqual(ano *ItemServiceEditArgs) bool {
    method Field1DeepEqual (line 7100) | func (p *ItemServiceEditArgs) Field1DeepEqual(src *EditReq) bool {
  function NewItemServiceEditArgs (line 6944) | func NewItemServiceEditArgs() *ItemServiceEditArgs {
  type ItemServiceEditResult (line 7108) | type ItemServiceEditResult struct
    method GetSuccess (line 7118) | func (p *ItemServiceEditResult) GetSuccess() (v *EditResp) {
    method SetSuccess (line 7124) | func (p *ItemServiceEditResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 7132) | func (p *ItemServiceEditResult) IsSetSuccess() bool {
    method Read (line 7136) | func (p *ItemServiceEditResult) Read(iprot thrift.TProtocol) (err erro...
    method ReadField0 (line 7195) | func (p *ItemServiceEditResult) ReadField0(iprot thrift.TProtocol) err...
    method Write (line 7203) | func (p *ItemServiceEditResult) Write(oprot thrift.TProtocol) (err err...
    method writeField0 (line 7232) | func (p *ItemServiceEditResult) writeField0(oprot thrift.TProtocol) (e...
    method String (line 7251) | func (p *ItemServiceEditResult) String() string {
    method DeepEqual (line 7258) | func (p *ItemServiceEditResult) DeepEqual(ano *ItemServiceEditResult) ...
    method Field0DeepEqual (line 7270) | func (p *ItemServiceEditResult) Field0DeepEqual(src *EditResp) bool {
  function NewItemServiceEditResult (line 7112) | func NewItemServiceEditResult() *ItemServiceEditResult {
  type ItemServiceDeleteArgs (line 7278) | type ItemServiceDeleteArgs struct
    method GetReq (line 7288) | func (p *ItemServiceDeleteArgs) GetReq() (v *DeleteReq) {
    method SetReq (line 7294) | func (p *ItemServiceDeleteArgs) SetReq(val *DeleteReq) {
    method IsSetReq (line 7302) | func (p *ItemServiceDeleteArgs) IsSetReq() bool {
    method Read (line 7306) | func (p *ItemServiceDeleteArgs) Read(iprot thrift.TProtocol) (err erro...
    method ReadField1 (line 7365) | func (p *ItemServiceDeleteArgs) ReadField1(iprot thrift.TProtocol) err...
    method Write (line 7373) | func (p *ItemServiceDeleteArgs) Write(oprot thrift.TProtocol) (err err...
    method writeField1 (line 7402) | func (p *ItemServiceDeleteArgs) writeField1(oprot thrift.TProtocol) (e...
    method String (line 7419) | func (p *ItemServiceDeleteArgs) String() string {
    method DeepEqual (line 7426) | func (p *ItemServiceDeleteArgs) DeepEqual(ano *ItemServiceDeleteArgs) ...
    method Field1DeepEqual (line 7438) | func (p *ItemServiceDeleteArgs) Field1DeepEqual(src *DeleteReq) bool {
  function NewItemServiceDeleteArgs (line 7282) | func NewItemServiceDeleteArgs() *ItemServiceDeleteArgs {
  type ItemServiceDeleteResult (line 7446) | type ItemServiceDeleteResult struct
    method GetSuccess (line 7456) | func (p *ItemServiceDeleteResult) GetSuccess() (v *DeleteResp) {
    method SetSuccess (line 7462) | func (p *ItemServiceDeleteResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 7470) | func (p *ItemServiceDeleteResult) IsSetSuccess() bool {
    method Read (line 7474) | func (p *ItemServiceDeleteResult) Read(iprot thrift.TProtocol) (err er...
    method ReadField0 (line 7533) | func (p *ItemServiceDeleteResult) ReadField0(iprot thrift.TProtocol) e...
    method Write (line 7541) | func (p *ItemServiceDeleteResult) Write(oprot thrift.TProtocol) (err e...
    method writeField0 (line 7570) | func (p *ItemServiceDeleteResult) writeField0(oprot thrift.TProtocol) ...
    method String (line 7589) | func (p *ItemServiceDeleteResult) String() string {
    method DeepEqual (line 7596) | func (p *ItemServiceDeleteResult) DeepEqual(ano *ItemServiceDeleteResu...
    method Field0DeepEqual (line 7608) | func (p *ItemServiceDeleteResult) Field0DeepEqual(src *DeleteResp) bool {
  function NewItemServiceDeleteResult (line 7450) | func NewItemServiceDeleteResult() *ItemServiceDeleteResult {
  type ItemServiceOnlineArgs (line 7616) | type ItemServiceOnlineArgs struct
    method GetReq (line 7626) | func (p *ItemServiceOnlineArgs) GetReq() (v *OnlineReq) {
    method SetReq (line 7632) | func (p *ItemServiceOnlineArgs) SetReq(val *OnlineReq) {
    method IsSetReq (line 7640) | func (p *ItemServiceOnlineArgs) IsSetReq() bool {
    method Read (line 7644) | func (p *ItemServiceOnlineArgs) Read(iprot thrift.TProtocol) (err erro...
    method ReadField1 (line 7703) | func (p *ItemServiceOnlineArgs) ReadField1(iprot thrift.TProtocol) err...
    method Write (line 7711) | func (p *ItemServiceOnlineArgs) Write(oprot thrift.TProtocol) (err err...
    method writeField1 (line 7740) | func (p *ItemServiceOnlineArgs) writeField1(oprot thrift.TProtocol) (e...
    method String (line 7757) | func (p *ItemServiceOnlineArgs) String() string {
    method DeepEqual (line 7764) | func (p *ItemServiceOnlineArgs) DeepEqual(ano *ItemServiceOnlineArgs) ...
    method Field1DeepEqual (line 7776) | func (p *ItemServiceOnlineArgs) Field1DeepEqual(src *OnlineReq) bool {
  function NewItemServiceOnlineArgs (line 7620) | func NewItemServiceOnlineArgs() *ItemServiceOnlineArgs {
  type ItemServiceOnlineResult (line 7784) | type ItemServiceOnlineResult struct
    method GetSuccess (line 7794) | func (p *ItemServiceOnlineResult) GetSuccess() (v *OnlineResp) {
    method SetSuccess (line 7800) | func (p *ItemServiceOnlineResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 7808) | func (p *ItemServiceOnlineResult) IsSetSuccess() bool {
    method Read (line 7812) | func (p *ItemServiceOnlineResult) Read(iprot thrift.TProtocol) (err er...
    method ReadField0 (line 7871) | func (p *ItemServiceOnlineResult) ReadField0(iprot thrift.TProtocol) e...
    method Write (line 7879) | func (p *ItemServiceOnlineResult) Write(oprot thrift.TProtocol) (err e...
    method writeField0 (line 7908) | func (p *ItemServiceOnlineResult) writeField0(oprot thrift.TProtocol) ...
    method String (line 7927) | func (p *ItemServiceOnlineResult) String() string {
    method DeepEqual (line 7934) | func (p *ItemServiceOnlineResult) DeepEqual(ano *ItemServiceOnlineResu...
    method Field0DeepEqual (line 7946) | func (p *ItemServiceOnlineResult) Field0DeepEqual(src *OnlineResp) bool {
  function NewItemServiceOnlineResult (line 7788) | func NewItemServiceOnlineResult() *ItemServiceOnlineResult {
  type ItemServiceOfflineArgs (line 7954) | type ItemServiceOfflineArgs struct
    method GetReq (line 7964) | func (p *ItemServiceOfflineArgs) GetReq() (v *OfflineReq) {
    method SetReq (line 7970) | func (p *ItemServiceOfflineArgs) SetReq(val *OfflineReq) {
    method IsSetReq (line 7978) | func (p *ItemServiceOfflineArgs) IsSetReq() bool {
    method Read (line 7982) | func (p *ItemServiceOfflineArgs) Read(iprot thrift.TProtocol) (err err...
    method ReadField1 (line 8041) | func (p *ItemServiceOfflineArgs) ReadField1(iprot thrift.TProtocol) er...
    method Write (line 8049) | func (p *ItemServiceOfflineArgs) Write(oprot thrift.TProtocol) (err er...
    method writeField1 (line 8078) | func (p *ItemServiceOfflineArgs) writeField1(oprot thrift.TProtocol) (...
    method String (line 8095) | func (p *ItemServiceOfflineArgs) String() string {
    method DeepEqual (line 8102) | func (p *ItemServiceOfflineArgs) DeepEqual(ano *ItemServiceOfflineArgs...
    method Field1DeepEqual (line 8114) | func (p *ItemServiceOfflineArgs) Field1DeepEqual(src *OfflineReq) bool {
  function NewItemServiceOfflineArgs (line 7958) | func NewItemServiceOfflineArgs() *ItemServiceOfflineArgs {
  type ItemServiceOfflineResult (line 8122) | type ItemServiceOfflineResult struct
    method GetSuccess (line 8132) | func (p *ItemServiceOfflineResult) GetSuccess() (v *OfflineResp) {
    method SetSuccess (line 8138) | func (p *ItemServiceOfflineResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 8146) | func (p *ItemServiceOfflineResult) IsSetSuccess() bool {
    method Read (line 8150) | func (p *ItemServiceOfflineResult) Read(iprot thrift.TProtocol) (err e...
    method ReadField0 (line 8209) | func (p *ItemServiceOfflineResult) ReadField0(iprot thrift.TProtocol) ...
    method Write (line 8217) | func (p *ItemServiceOfflineResult) Write(oprot thrift.TProtocol) (err ...
    method writeField0 (line 8246) | func (p *ItemServiceOfflineResult) writeField0(oprot thrift.TProtocol)...
    method String (line 8265) | func (p *ItemServiceOfflineResult) String() string {
    method DeepEqual (line 8272) | func (p *ItemServiceOfflineResult) DeepEqual(ano *ItemServiceOfflineRe...
    method Field0DeepEqual (line 8284) | func (p *ItemServiceOfflineResult) Field0DeepEqual(src *OfflineResp) b...
  function NewItemServiceOfflineResult (line 8126) | func NewItemServiceOfflineResult() *ItemServiceOfflineResult {
  type ItemServiceGetArgs (line 8292) | type ItemServiceGetArgs struct
    method GetReq (line 8302) | func (p *ItemServiceGetArgs) GetReq() (v *GetReq) {
    method SetReq (line 8308) | func (p *ItemServiceGetArgs) SetReq(val *GetReq) {
    method IsSetReq (line 8316) | func (p *ItemServiceGetArgs) IsSetReq() bool {
    method Read (line 8320) | func (p *ItemServiceGetArgs) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 8379) | func (p *ItemServiceGetArgs) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 8387) | func (p *ItemServiceGetArgs) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 8416) | func (p *ItemServiceGetArgs) writeField1(oprot thrift.TProtocol) (err ...
    method String (line 8433) | func (p *ItemServiceGetArgs) String() string {
    method DeepEqual (line 8440) | func (p *ItemServiceGetArgs) DeepEqual(ano *ItemServiceGetArgs) bool {
    method Field1DeepEqual (line 8452) | func (p *ItemServiceGetArgs) Field1DeepEqual(src *GetReq) bool {
  function NewItemServiceGetArgs (line 8296) | func NewItemServiceGetArgs() *ItemServiceGetArgs {
  type ItemServiceGetResult (line 8460) | type ItemServiceGetResult struct
    method GetSuccess (line 8470) | func (p *ItemServiceGetResult) GetSuccess() (v *GetResp) {
    method SetSuccess (line 8476) | func (p *ItemServiceGetResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 8484) | func (p *ItemServiceGetResult) IsSetSuccess() bool {
    method Read (line 8488) | func (p *ItemServiceGetResult) Read(iprot thrift.TProtocol) (err error) {
    method ReadField0 (line 8547) | func (p *ItemServiceGetResult) ReadField0(iprot thrift.TProtocol) error {
    method Write (line 8555) | func (p *ItemServiceGetResult) Write(oprot thrift.TProtocol) (err erro...
    method writeField0 (line 8584) | func (p *ItemServiceGetResult) writeField0(oprot thrift.TProtocol) (er...
    method String (line 8603) | func (p *ItemServiceGetResult) String() string {
    method DeepEqual (line 8610) | func (p *ItemServiceGetResult) DeepEqual(ano *ItemServiceGetResult) bo...
    method Field0DeepEqual (line 8622) | func (p *ItemServiceGetResult) Field0DeepEqual(src *GetResp) bool {
  function NewItemServiceGetResult (line 8464) | func NewItemServiceGetResult() *ItemServiceGetResult {
  type ItemServiceMGet2CArgs (line 8630) | type ItemServiceMGet2CArgs struct
    method GetReq (line 8640) | func (p *ItemServiceMGet2CArgs) GetReq() (v *MGet2CReq) {
    method SetReq (line 8646) | func (p *ItemServiceMGet2CArgs) SetReq(val *MGet2CReq) {
    method IsSetReq (line 8654) | func (p *ItemServiceMGet2CArgs) IsSetReq() bool {
    method Read (line 8658) | func (p *ItemServiceMGet2CArgs) Read(iprot thrift.TProtocol) (err erro...
    method ReadField1 (line 8717) | func (p *ItemServiceMGet2CArgs) ReadField1(iprot thrift.TProtocol) err...
    method Write (line 8725) | func (p *ItemServiceMGet2CArgs) Write(oprot thrift.TProtocol) (err err...
    method writeField1 (line 8754) | func (p *ItemServiceMGet2CArgs) writeField1(oprot thrift.TProtocol) (e...
    method String (line 8771) | func (p *ItemServiceMGet2CArgs) String() string {
    method DeepEqual (line 8778) | func (p *ItemServiceMGet2CArgs) DeepEqual(ano *ItemServiceMGet2CArgs) ...
    method Field1DeepEqual (line 8790) | func (p *ItemServiceMGet2CArgs) Field1DeepEqual(src *MGet2CReq) bool {
  function NewItemServiceMGet2CArgs (line 8634) | func NewItemServiceMGet2CArgs() *ItemServiceMGet2CArgs {
  type ItemServiceMGet2CResult (line 8798) | type ItemServiceMGet2CResult struct
    method GetSuccess (line 8808) | func (p *ItemServiceMGet2CResult) GetSuccess() (v *MGet2CResp) {
    method SetSuccess (line 8814) | func (p *ItemServiceMGet2CResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 8822) | func (p *ItemServiceMGet2CResult) IsSetSuccess() bool {
    method Read (line 8826) | func (p *ItemServiceMGet2CResult) Read(iprot thrift.TProtocol) (err er...
    method ReadField0 (line 8885) | func (p *ItemServiceMGet2CResult) ReadField0(iprot thrift.TProtocol) e...
    method Write (line 8893) | func (p *ItemServiceMGet2CResult) Write(oprot thrift.TProtocol) (err e...
    method writeField0 (line 8922) | func (p *ItemServiceMGet2CResult) writeField0(oprot thrift.TProtocol) ...
    method String (line 8941) | func (p *ItemServiceMGet2CResult) String() string {
    method DeepEqual (line 8948) | func (p *ItemServiceMGet2CResult) DeepEqual(ano *ItemServiceMGet2CResu...
    method Field0DeepEqual (line 8960) | func (p *ItemServiceMGet2CResult) Field0DeepEqual(src *MGet2CResp) bool {
  function NewItemServiceMGet2CResult (line 8802) | func NewItemServiceMGet2CResult() *ItemServiceMGet2CResult {
  type ItemServiceSearchArgs (line 8968) | type ItemServiceSearchArgs struct
    method GetReq (line 8978) | func (p *ItemServiceSearchArgs) GetReq() (v *SearchReq) {
    method SetReq (line 8984) | func (p *ItemServiceSearchArgs) SetReq(val *SearchReq) {
    method IsSetReq (line 8992) | func (p *ItemServiceSearchArgs) IsSetReq() bool {
    method Read (line 8996) | func (p *ItemServiceSearchArgs) Read(iprot thrift.TProtocol) (err erro...
    method ReadField1 (line 9055) | func (p *ItemServiceSearchArgs) ReadField1(iprot thrift.TProtocol) err...
    method Write (line 9063) | func (p *ItemServiceSearchArgs) Write(oprot thrift.TProtocol) (err err...
    method writeField1 (line 9092) | func (p *ItemServiceSearchArgs) writeField1(oprot thrift.TProtocol) (e...
    method String (line 9109) | func (p *ItemServiceSearchArgs) String() string {
    method DeepEqual (line 9116) | func (p *ItemServiceSearchArgs) DeepEqual(ano *ItemServiceSearchArgs) ...
    method Field1DeepEqual (line 9128) | func (p *ItemServiceSearchArgs) Field1DeepEqual(src *SearchReq) bool {
  function NewItemServiceSearchArgs (line 8972) | func NewItemServiceSearchArgs() *ItemServiceSearchArgs {
  type ItemServiceSearchResult (line 9136) | type ItemServiceSearchResult struct
    method GetSuccess (line 9146) | func (p *ItemServiceSearchResult) GetSuccess() (v *SearchResp) {
    method SetSuccess (line 9152) | func (p *ItemServiceSearchResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 9160) | func (p *ItemServiceSearchResult) IsSetSuccess() bool {
    method Read (line 9164) | func (p *ItemServiceSearchResult) Read(iprot thrift.TProtocol) (err er...
    method ReadField0 (line 9223) | func (p *ItemServiceSearchResult) ReadField0(iprot thrift.TProtocol) e...
    method Write (line 9231) | func (p *ItemServiceSearchResult) Write(oprot thrift.TProtocol) (err e...
    method writeField0 (line 9260) | func (p *ItemServiceSearchResult) writeField0(oprot thrift.TProtocol) ...
    method String (line 9279) | func (p *ItemServiceSearchResult) String() string {
    method DeepEqual (line 9286) | func (p *ItemServiceSearchResult) DeepEqual(ano *ItemServiceSearchResu...
    method Field0DeepEqual (line 9298) | func (p *ItemServiceSearchResult) Field0DeepEqual(src *SearchResp) bool {
  function NewItemServiceSearchResult (line 9140) | func NewItemServiceSearchResult() *ItemServiceSearchResult {
  type ItemServiceListArgs (line 9306) | type ItemServiceListArgs struct
    method GetReq (line 9316) | func (p *ItemServiceListArgs) GetReq() (v *ListReq) {
    method SetReq (line 9322) | func (p *ItemServiceListArgs) SetReq(val *ListReq) {
    method IsSetReq (line 9330) | func (p *ItemServiceListArgs) IsSetReq() bool {
    method Read (line 9334) | func (p *ItemServiceListArgs) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 9393) | func (p *ItemServiceListArgs) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 9401) | func (p *ItemServiceListArgs) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 9430) | func (p *ItemServiceListArgs) writeField1(oprot thrift.TProtocol) (err...
    method String (line 9447) | func (p *ItemServiceListArgs) String() string {
    method DeepEqual (line 9454) | func (p *ItemServiceListArgs) DeepEqual(ano *ItemServiceListArgs) bool {
    method Field1DeepEqual (line 9466) | func (p *ItemServiceListArgs) Field1DeepEqual(src *ListReq) bool {
  function NewItemServiceListArgs (line 9310) | func NewItemServiceListArgs() *ItemServiceListArgs {
  type ItemServiceListResult (line 9474) | type ItemServiceListResult struct
    method GetSuccess (line 9484) | func (p *ItemServiceListResult) GetSuccess() (v *ListResp) {
    method SetSuccess (line 9490) | func (p *ItemServiceListResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 9498) | func (p *ItemServiceListResult) IsSetSuccess() bool {
    method Read (line 9502) | func (p *ItemServiceListResult) Read(iprot thrift.TProtocol) (err erro...
    method ReadField0 (line 9561) | func (p *ItemServiceListResult) ReadField0(iprot thrift.TProtocol) err...
    method Write (line 9569) | func (p *ItemServiceListResult) Write(oprot thrift.TProtocol) (err err...
    method writeField0 (line 9598) | func (p *ItemServiceListResult) writeField0(oprot thrift.TProtocol) (e...
    method String (line 9617) | func (p *ItemServiceListResult) String() string {
    method DeepEqual (line 9624) | func (p *ItemServiceListResult) DeepEqual(ano *ItemServiceListResult) ...
    method Field0DeepEqual (line 9636) | func (p *ItemServiceListResult) Field0DeepEqual(src *ListResp) bool {
  function NewItemServiceListResult (line 9478) | func NewItemServiceListResult() *ItemServiceListResult {
  type ItemServiceDecrStockArgs (line 9644) | type ItemServiceDecrStockArgs struct
    method GetReq (line 9654) | func (p *ItemServiceDecrStockArgs) GetReq() (v *DecrStockReq) {
    method SetReq (line 9660) | func (p *ItemServiceDecrStockArgs) SetReq(val *DecrStockReq) {
    method IsSetReq (line 9668) | func (p *ItemServiceDecrStockArgs) IsSetReq() bool {
    method Read (line 9672) | func (p *ItemServiceDecrStockArgs) Read(iprot thrift.TProtocol) (err e...
    method ReadField1 (line 9731) | func (p *ItemServiceDecrStockArgs) ReadField1(iprot thrift.TProtocol) ...
    method Write (line 9739) | func (p *ItemServiceDecrStockArgs) Write(oprot thrift.TProtocol) (err ...
    method writeField1 (line 9768) | func (p *ItemServiceDecrStockArgs) writeField1(oprot thrift.TProtocol)...
    method String (line 9785) | func (p *ItemServiceDecrStockArgs) String() string {
    method DeepEqual (line 9792) | func (p *ItemServiceDecrStockArgs) DeepEqual(ano *ItemServiceDecrStock...
    method Field1DeepEqual (line 9804) | func (p *ItemServiceDecrStockArgs) Field1DeepEqual(src *DecrStockReq) ...
  function NewItemServiceDecrStockArgs (line 9648) | func NewItemServiceDecrStockArgs() *ItemServiceDecrStockArgs {
  type ItemServiceDecrStockResult (line 9812) | type ItemServiceDecrStockResult struct
    method GetSuccess (line 9822) | func (p *ItemServiceDecrStockResult) GetSuccess() (v *DecrStockResp) {
    method SetSuccess (line 9828) | func (p *ItemServiceDecrStockResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 9836) | func (p *ItemServiceDecrStockResult) IsSetSuccess() bool {
    method Read (line 9840) | func (p *ItemServiceDecrStockResult) Read(iprot thrift.TProtocol) (err...
    method ReadField0 (line 9899) | func (p *ItemServiceDecrStockResult) ReadField0(iprot thrift.TProtocol...
    method Write (line 9907) | func (p *ItemServiceDecrStockResult) Write(oprot thrift.TProtocol) (er...
    method writeField0 (line 9936) | func (p *ItemServiceDecrStockResult) writeField0(oprot thrift.TProtoco...
    method String (line 9955) | func (p *ItemServiceDecrStockResult) String() string {
    method DeepEqual (line 9962) | func (p *ItemServiceDecrStockResult) DeepEqual(ano *ItemServiceDecrSto...
    method Field0DeepEqual (line 9974) | func (p *ItemServiceDecrStockResult) Field0DeepEqual(src *DecrStockRes...
  function NewItemServiceDecrStockResult (line 9816) | func NewItemServiceDecrStockResult() *ItemServiceDecrStockResult {
  type ItemServiceDecrStockRevertArgs (line 9982) | type ItemServiceDecrStockRevertArgs struct
    method GetReq (line 9992) | func (p *ItemServiceDecrStockRevertArgs) GetReq() (v *DecrStockReq) {
    method SetReq (line 9998) | func (p *ItemServiceDecrStockRevertArgs) SetReq(val *DecrStockReq) {
    method IsSetReq (line 10006) | func (p *ItemServiceDecrStockRevertArgs) IsSetReq() bool {
    method Read (line 10010) | func (p *ItemServiceDecrStockRevertArgs) Read(iprot thrift.TProtocol) ...
    method ReadField1 (line 10069) | func (p *ItemServiceDecrStockRevertArgs) ReadField1(iprot thrift.TProt...
    method Write (line 10077) | func (p *ItemServiceDecrStockRevertArgs) Write(oprot thrift.TProtocol)...
    method writeField1 (line 10106) | func (p *ItemServiceDecrStockRevertArgs) writeField1(oprot thrift.TPro...
    method String (line 10123) | func (p *ItemServiceDecrStockRevertArgs) String() string {
    method DeepEqual (line 10130) | func (p *ItemServiceDecrStockRevertArgs) DeepEqual(ano *ItemServiceDec...
    method Field1DeepEqual (line 10142) | func (p *ItemServiceDecrStockRevertArgs) Field1DeepEqual(src *DecrStoc...
  function NewItemServiceDecrStockRevertArgs (line 9986) | func NewItemServiceDecrStockRevertArgs() *ItemServiceDecrStockRevertArgs {
  type ItemServiceDecrStockRevertResult (line 10150) | type ItemServiceDecrStockRevertResult struct
    method GetSuccess (line 10160) | func (p *ItemServiceDecrStockRevertResult) GetSuccess() (v *DecrStockR...
    method SetSuccess (line 10166) | func (p *ItemServiceDecrStockRevertResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 10174) | func (p *ItemServiceDecrStockRevertResult) IsSetSuccess() bool {
    method Read (line 10178) | func (p *ItemServiceDecrStockRevertResult) Read(iprot thrift.TProtocol...
    method ReadField0 (line 10237) | func (p *ItemServiceDecrStockRevertResult) ReadField0(iprot thrift.TPr...
    method Write (line 10245) | func (p *ItemServiceDecrStockRevertResult) Write(oprot thrift.TProtoco...
    method writeField0 (line 10274) | func (p *ItemServiceDecrStockRevertResult) writeField0(oprot thrift.TP...
    method String (line 10293) | func (p *ItemServiceDecrStockRevertResult) String() string {
    method DeepEqual (line 10300) | func (p *ItemServiceDecrStockRevertResult) DeepEqual(ano *ItemServiceD...
    method Field0DeepEqual (line 10312) | func (p *ItemServiceDecrStockRevertResult) Field0DeepEqual(src *DecrSt...
  function NewItemServiceDecrStockRevertResult (line 10154) | func NewItemServiceDecrStockRevertResult() *ItemServiceDecrStockRevertRe...

FILE: book-shop/kitex_gen/cwg/bookshop/item/itemservice/client.go
  type Client (line 13) | type Client interface
  function NewClient (line 28) | func NewClient(destService string, opts ...client.Option) (Client, error) {
  function MustNewClient (line 44) | func MustNewClient(destService string, opts ...client.Option) Client {
  type kItemServiceClient (line 52) | type kItemServiceClient struct
    method Add (line 56) | func (p *kItemServiceClient) Add(ctx context.Context, req *item.AddReq...
    method Edit (line 61) | func (p *kItemServiceClient) Edit(ctx context.Context, req *item.EditR...
    method Delete (line 66) | func (p *kItemServiceClient) Delete(ctx context.Context, req *item.Del...
    method Online (line 71) | func (p *kItemServiceClient) Online(ctx context.Context, req *item.Onl...
    method Offline (line 76) | func (p *kItemServiceClient) Offline(ctx context.Context, req *item.Of...
    method Get (line 81) | func (p *kItemServiceClient) Get(ctx context.Context, req *item.GetReq...
    method MGet2C (line 86) | func (p *kItemServiceClient) MGet2C(ctx context.Context, req *item.MGe...
    method Search (line 91) | func (p *kItemServiceClient) Search(ctx context.Context, req *item.Sea...
    method List (line 96) | func (p *kItemServiceClient) List(ctx context.Context, req *item.ListR...
    method DecrStock (line 101) | func (p *kItemServiceClient) DecrStock(ctx context.Context, req *item....
    method DecrStockRevert (line 106) | func (p *kItemServiceClient) DecrStockRevert(ctx context.Context, req ...

FILE: book-shop/kitex_gen/cwg/bookshop/item/itemservice/invoker.go
  function NewInvoker (line 11) | func NewInvoker(handler item.ItemService, opts ...server.Option) server....

FILE: book-shop/kitex_gen/cwg/bookshop/item/itemservice/itemservice.go
  function serviceInfo (line 12) | func serviceInfo() *kitex.ServiceInfo {
  function NewServiceInfo (line 18) | func NewServiceInfo() *kitex.ServiceInfo {
  function addHandler (line 48) | func addHandler(ctx context.Context, handler interface{}, arg, result in...
  function newItemServiceAddArgs (line 58) | func newItemServiceAddArgs() interface{} {
  function newItemServiceAddResult (line 62) | func newItemServiceAddResult() interface{} {
  function editHandler (line 66) | func editHandler(ctx context.Context, handler interface{}, arg, result i...
  function newItemServiceEditArgs (line 76) | func newItemServiceEditArgs() interface{} {
  function newItemServiceEditResult (line 80) | func newItemServiceEditResult() interface{} {
  function deleteHandler (line 84) | func deleteHandler(ctx context.Context, handler interface{}, arg, result...
  function newItemServiceDeleteArgs (line 94) | func newItemServiceDeleteArgs() interface{} {
  function newItemServiceDeleteResult (line 98) | func newItemServiceDeleteResult() interface{} {
  function onlineHandler (line 102) | func onlineHandler(ctx context.Context, handler interface{}, arg, result...
  function newItemServiceOnlineArgs (line 112) | func newItemServiceOnlineArgs() interface{} {
  function newItemServiceOnlineResult (line 116) | func newItemServiceOnlineResult() interface{} {
  function offlineHandler (line 120) | func offlineHandler(ctx context.Context, handler interface{}, arg, resul...
  function newItemServiceOfflineArgs (line 130) | func newItemServiceOfflineArgs() interface{} {
  function newItemServiceOfflineResult (line 134) | func newItemServiceOfflineResult() interface{} {
  function getHandler (line 138) | func getHandler(ctx context.Context, handler interface{}, arg, result in...
  function newItemServiceGetArgs (line 148) | func newItemServiceGetArgs() interface{} {
  function newItemServiceGetResult (line 152) | func newItemServiceGetResult() interface{} {
  function mGet2CHandler (line 156) | func mGet2CHandler(ctx context.Context, handler interface{}, arg, result...
  function newItemServiceMGet2CArgs (line 166) | func newItemServiceMGet2CArgs() interface{} {
  function newItemServiceMGet2CResult (line 170) | func newItemServiceMGet2CResult() interface{} {
  function searchHandler (line 174) | func searchHandler(ctx context.Context, handler interface{}, arg, result...
  function newItemServiceSearchArgs (line 184) | func newItemServiceSearchArgs() interface{} {
  function newItemServiceSearchResult (line 188) | func newItemServiceSearchResult() interface{} {
  function listHandler (line 192) | func listHandler(ctx context.Context, handler interface{}, arg, result i...
  function newItemServiceListArgs (line 202) | func newItemServiceListArgs() interface{} {
  function newItemServiceListResult (line 206) | func newItemServiceListResult() interface{} {
  function decrStockHandler (line 210) | func decrStockHandler(ctx context.Context, handler interface{}, arg, res...
  function newItemServiceDecrStockArgs (line 220) | func newItemServiceDecrStockArgs() interface{} {
  function newItemServiceDecrStockResult (line 224) | func newItemServiceDecrStockResult() interface{} {
  function decrStockRevertHandler (line 228) | func decrStockRevertHandler(ctx context.Context, handler interface{}, ar...
  function newItemServiceDecrStockRevertArgs (line 238) | func newItemServiceDecrStockRevertArgs() interface{} {
  function newItemServiceDecrStockRevertResult (line 242) | func newItemServiceDecrStockRevertResult() interface{} {
  type kClient (line 246) | type kClient struct
    method Add (line 256) | func (p *kClient) Add(ctx context.Context, req *item.AddReq) (r *item....
    method Edit (line 266) | func (p *kClient) Edit(ctx context.Context, req *item.EditReq) (r *ite...
    method Delete (line 276) | func (p *kClient) Delete(ctx context.Context, req *item.DeleteReq) (r ...
    method Online (line 286) | func (p *kClient) Online(ctx context.Context, req *item.OnlineReq) (r ...
    method Offline (line 296) | func (p *kClient) Offline(ctx context.Context, req *item.OfflineReq) (...
    method Get (line 306) | func (p *kClient) Get(ctx context.Context, req *item.GetReq) (r *item....
    method MGet2C (line 316) | func (p *kClient) MGet2C(ctx context.Context, req *item.MGet2CReq) (r ...
    method Search (line 326) | func (p *kClient) Search(ctx context.Context, req *item.SearchReq) (r ...
    method List (line 336) | func (p *kClient) List(ctx context.Context, req *item.ListReq) (r *ite...
    method DecrStock (line 346) | func (p *kClient) DecrStock(ctx context.Context, req *item.DecrStockRe...
    method DecrStockRevert (line 356) | func (p *kClient) DecrStockRevert(ctx context.Context, req *item.DecrS...
  function newServiceClient (line 250) | func newServiceClient(c client.Client) *kClient {

FILE: book-shop/kitex_gen/cwg/bookshop/item/itemservice/server.go
  function NewServer (line 10) | func NewServer(handler item.ItemService, opts ...server.Option) server.S...

FILE: book-shop/kitex_gen/cwg/bookshop/item/k-item.go
  method FastRead (line 28) | func (p *BookProperty) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 127) | func (p *BookProperty) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 141) | func (p *BookProperty) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 155) | func (p *BookProperty) FastReadField3(buf []byte) (int, error) {
  method FastWrite (line 170) | func (p *BookProperty) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 174) | func (p *BookProperty) FastWriteNocopy(buf []byte, binaryWriter bthrift....
  method BLength (line 187) | func (p *BookProperty) BLength() int {
  method fastWriteField1 (line 200) | func (p *BookProperty) fastWriteField1(buf []byte, binaryWriter bthrift....
  method fastWriteField2 (line 209) | func (p *BookProperty) fastWriteField2(buf []byte, binaryWriter bthrift....
  method fastWriteField3 (line 218) | func (p *BookProperty) fastWriteField3(buf []byte, binaryWriter bthrift....
  method field1Length (line 227) | func (p *BookProperty) field1Length() int {
  method field2Length (line 236) | func (p *BookProperty) field2Length() int {
  method field3Length (line 245) | func (p *BookProperty) field3Length() int {
  method FastRead (line 254) | func (p *Product) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 423) | func (p *Product) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 437) | func (p *Product) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 451) | func (p *Product) FastReadField3(buf []byte) (int, error) {
  method FastReadField4 (line 465) | func (p *Product) FastReadField4(buf []byte) (int, error) {
  method FastReadField5 (line 479) | func (p *Product) FastReadField5(buf []byte) (int, error) {
  method FastReadField6 (line 492) | func (p *Product) FastReadField6(buf []byte) (int, error) {
  method FastReadField7 (line 506) | func (p *Product) FastReadField7(buf []byte) (int, error) {
  method FastReadField8 (line 520) | func (p *Product) FastReadField8(buf []byte) (int, error) {
  method FastWrite (line 535) | func (p *Product) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 539) | func (p *Product) FastWriteNocopy(buf []byte, binaryWriter bthrift.Binar...
  method BLength (line 557) | func (p *Product) BLength() int {
  method fastWriteField1 (line 575) | func (p *Product) fastWriteField1(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField2 (line 584) | func (p *Product) fastWriteField2(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField3 (line 593) | func (p *Product) fastWriteField3(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField4 (line 602) | func (p *Product) fastWriteField4(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField5 (line 611) | func (p *Product) fastWriteField5(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField6 (line 619) | func (p *Product) fastWriteField6(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField7 (line 628) | func (p *Product) fastWriteField7(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField8 (line 637) | func (p *Product) fastWriteField8(buf []byte, binaryWriter bthrift.Binar...
  method field1Length (line 646) | func (p *Product) field1Length() int {
  method field2Length (line 655) | func (p *Product) field2Length() int {
  method field3Length (line 664) | func (p *Product) field3Length() int {
  method field4Length (line 673) | func (p *Product) field4Length() int {
  method field5Length (line 682) | func (p *Product) field5Length() int {
  method field6Length (line 690) | func (p *Product) field6Length() int {
  method field7Length (line 699) | func (p *Product) field7Length() int {
  method field8Length (line 708) | func (p *Product) field8Length() int {
  method FastRead (line 717) | func (p *AddReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 901) | func (p *AddReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 915) | func (p *AddReq) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 929) | func (p *AddReq) FastReadField3(buf []byte) (int, error) {
  method FastReadField4 (line 943) | func (p *AddReq) FastReadField4(buf []byte) (int, error) {
  method FastReadField5 (line 956) | func (p *AddReq) FastReadField5(buf []byte) (int, error) {
  method FastReadField6 (line 970) | func (p *AddReq) FastReadField6(buf []byte) (int, error) {
  method FastWrite (line 985) | func (p *AddReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 989) | func (p *AddReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Binary...
  method BLength (line 1005) | func (p *AddReq) BLength() int {
  method fastWriteField1 (line 1021) | func (p *AddReq) fastWriteField1(buf []byte, binaryWriter bthrift.Binary...
  method fastWriteField2 (line 1030) | func (p *AddReq) fastWriteField2(buf []byte, binaryWriter bthrift.Binary...
  method fastWriteField3 (line 1039) | func (p *AddReq) fastWriteField3(buf []byte, binaryWriter bthrift.Binary...
  method fastWriteField4 (line 1048) | func (p *AddReq) fastWriteField4(buf []byte, binaryWriter bthrift.Binary...
  method fastWriteField5 (line 1056) | func (p *AddReq) fastWriteField5(buf []byte, binaryWriter bthrift.Binary...
  method fastWriteField6 (line 1065) | func (p *AddReq) fastWriteField6(buf []byte, binaryWriter bthrift.Binary...
  method field1Length (line 1074) | func (p *AddReq) field1Length() int {
  method field2Length (line 1083) | func (p *AddReq) field2Length() int {
  method field3Length (line 1092) | func (p *AddReq) field3Length() int {
  method field4Length (line 1101) | func (p *AddReq) field4Length() int {
  method field5Length (line 1109) | func (p *AddReq) field5Length() int {
  method field6Length (line 1118) | func (p *AddReq) field6Length() int {
  method FastRead (line 1127) | func (p *AddResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1212) | func (p *AddResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 1226) | func (p *AddResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 1240) | func (p *AddResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1244) | func (p *AddResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Binar...
  method BLength (line 1256) | func (p *AddResp) BLength() int {
  method fastWriteField1 (line 1268) | func (p *AddResp) fastWriteField1(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField255 (line 1277) | func (p *AddResp) fastWriteField255(buf []byte, binaryWriter bthrift.Bin...
  method field1Length (line 1285) | func (p *AddResp) field1Length() int {
  method field255Length (line 1294) | func (p *AddResp) field255Length() int {
  method FastRead (line 1302) | func (p *EditReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1465) | func (p *EditReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 1479) | func (p *EditReq) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 1492) | func (p *EditReq) FastReadField3(buf []byte) (int, error) {
  method FastReadField4 (line 1505) | func (p *EditReq) FastReadField4(buf []byte) (int, error) {
  method FastReadField5 (line 1518) | func (p *EditReq) FastReadField5(buf []byte) (int, error) {
  method FastReadField6 (line 1531) | func (p *EditReq) FastReadField6(buf []byte) (int, error) {
  method FastReadField7 (line 1544) | func (p *EditReq) FastReadField7(buf []byte) (int, error) {
  method FastWrite (line 1558) | func (p *EditReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1562) | func (p *EditReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Binar...
  method BLength (line 1579) | func (p *EditReq) BLength() int {
  method fastWriteField1 (line 1596) | func (p *EditReq) fastWriteField1(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField2 (line 1605) | func (p *EditReq) fastWriteField2(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField3 (line 1616) | func (p *EditReq) fastWriteField3(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField4 (line 1627) | func (p *EditReq) fastWriteField4(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField5 (line 1638) | func (p *EditReq) fastWriteField5(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField6 (line 1648) | func (p *EditReq) fastWriteField6(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField7 (line 1659) | func (p *EditReq) fastWriteField7(buf []byte, binaryWriter bthrift.Binar...
  method field1Length (line 1670) | func (p *EditReq) field1Length() int {
  method field2Length (line 1679) | func (p *EditReq) field2Length() int {
  method field3Length (line 1690) | func (p *EditReq) field3Length() int {
  method field4Length (line 1701) | func (p *EditReq) field4Length() int {
  method field5Length (line 1712) | func (p *EditReq) field5Length() int {
  method field6Length (line 1722) | func (p *EditReq) field6Length() int {
  method field7Length (line 1733) | func (p *EditReq) field7Length() int {
  method FastRead (line 1744) | func (p *EditResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 1815) | func (p *EditResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 1829) | func (p *EditResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1833) | func (p *EditResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bina...
  method BLength (line 1844) | func (p *EditResp) BLength() int {
  method fastWriteField255 (line 1855) | func (p *EditResp) fastWriteField255(buf []byte, binaryWriter bthrift.Bi...
  method field255Length (line 1863) | func (p *EditResp) field255Length() int {
  method FastRead (line 1871) | func (p *DeleteReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1950) | func (p *DeleteReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 1965) | func (p *DeleteReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1969) | func (p *DeleteReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bin...
  method BLength (line 1980) | func (p *DeleteReq) BLength() int {
  method fastWriteField1 (line 1991) | func (p *DeleteReq) fastWriteField1(buf []byte, binaryWriter bthrift.Bin...
  method field1Length (line 2000) | func (p *DeleteReq) field1Length() int {
  method FastRead (line 2009) | func (p *DeleteResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 2080) | func (p *DeleteResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 2094) | func (p *DeleteResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2098) | func (p *DeleteResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bi...
  method BLength (line 2109) | func (p *DeleteResp) BLength() int {
  method fastWriteField255 (line 2120) | func (p *DeleteResp) fastWriteField255(buf []byte, binaryWriter bthrift....
  method field255Length (line 2128) | func (p *DeleteResp) field255Length() int {
  method FastRead (line 2136) | func (p *OnlineReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2215) | func (p *OnlineReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 2230) | func (p *OnlineReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2234) | func (p *OnlineReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bin...
  method BLength (line 2245) | func (p *OnlineReq) BLength() int {
  method fastWriteField1 (line 2256) | func (p *OnlineReq) fastWriteField1(buf []byte, binaryWriter bthrift.Bin...
  method field1Length (line 2265) | func (p *OnlineReq) field1Length() int {
  method FastRead (line 2274) | func (p *OnlineResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 2345) | func (p *OnlineResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 2359) | func (p *OnlineResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2363) | func (p *OnlineResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bi...
  method BLength (line 2374) | func (p *OnlineResp) BLength() int {
  method fastWriteField255 (line 2385) | func (p *OnlineResp) fastWriteField255(buf []byte, binaryWriter bthrift....
  method field255Length (line 2393) | func (p *OnlineResp) field255Length() int {
  method FastRead (line 2401) | func (p *OfflineReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2480) | func (p *OfflineReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 2495) | func (p *OfflineReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2499) | func (p *OfflineReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bi...
  method BLength (line 2510) | func (p *OfflineReq) BLength() int {
  method fastWriteField1 (line 2521) | func (p *OfflineReq) fastWriteField1(buf []byte, binaryWriter bthrift.Bi...
  method field1Length (line 2530) | func (p *OfflineReq) field1Length() int {
  method FastRead (line 2539) | func (p *OfflineResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 2610) | func (p *OfflineResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 2624) | func (p *OfflineResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2628) | func (p *OfflineResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.B...
  method BLength (line 2639) | func (p *OfflineResp) BLength() int {
  method fastWriteField255 (line 2650) | func (p *OfflineResp) fastWriteField255(buf []byte, binaryWriter bthrift...
  method field255Length (line 2658) | func (p *OfflineResp) field255Length() int {
  method FastRead (line 2666) | func (p *GetReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2745) | func (p *GetReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 2760) | func (p *GetReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2764) | func (p *GetReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Binary...
  method BLength (line 2775) | func (p *GetReq) BLength() int {
  method fastWriteField1 (line 2786) | func (p *GetReq) fastWriteField1(buf []byte, binaryWriter bthrift.Binary...
  method field1Length (line 2795) | func (p *GetReq) field1Length() int {
  method FastRead (line 2804) | func (p *GetResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2889) | func (p *GetResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 2902) | func (p *GetResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 2916) | func (p *GetResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2920) | func (p *GetResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Binar...
  method BLength (line 2932) | func (p *GetResp) BLength() int {
  method fastWriteField1 (line 2944) | func (p *GetResp) fastWriteField1(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField255 (line 2952) | func (p *GetResp) fastWriteField255(buf []byte, binaryWriter bthrift.Bin...
  method field1Length (line 2960) | func (p *GetResp) field1Length() int {
  method field255Length (line 2968) | func (p *GetResp) field255Length() int {
  method FastRead (line 2976) | func (p *MGet2CReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 3055) | func (p *MGet2CReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 3086) | func (p *MGet2CReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 3090) | func (p *MGet2CReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bin...
  method BLength (line 3101) | func (p *MGet2CReq) BLength() int {
  method fastWriteField1 (line 3112) | func (p *MGet2CReq) fastWriteField1(buf []byte, binaryWriter bthrift.Bin...
  method field1Length (line 3129) | func (p *MGet2CReq) field1Length() int {
  method FastRead (line 3140) | func (p *MGet2CResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 3225) | func (p *MGet2CResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 3261) | func (p *MGet2CResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 3275) | func (p *MGet2CResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 3279) | func (p *MGet2CResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bi...
  method BLength (line 3291) | func (p *MGet2CResp) BLength() int {
  method fastWriteField1 (line 3303) | func (p *MGet2CResp) fastWriteField1(buf []byte, binaryWriter bthrift.Bi...
  method fastWriteField255 (line 3322) | func (p *MGet2CResp) fastWriteField255(buf []byte, binaryWriter bthrift....
  method field1Length (line 3330) | func (p *MGet2CResp) field1Length() int {
  method field255Length (line 3345) | func (p *MGet2CResp) field255Length() int {
  method FastRead (line 3353) | func (p *SearchReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 3452) | func (p *SearchReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 3465) | func (p *SearchReq) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 3478) | func (p *SearchReq) FastReadField3(buf []byte) (int, error) {
  method FastWrite (line 3492) | func (p *SearchReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 3496) | func (p *SearchReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bin...
  method BLength (line 3509) | func (p *SearchReq) BLength() int {
  method fastWriteField1 (line 3522) | func (p *SearchReq) fastWriteField1(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField2 (line 3533) | func (p *SearchReq) fastWriteField2(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField3 (line 3544) | func (p *SearchReq) fastWriteField3(buf []byte, binaryWriter bthrift.Bin...
  method field1Length (line 3555) | func (p *SearchReq) field1Length() int {
  method field2Length (line 3566) | func (p *SearchReq) field2Length() int {
  method field3Length (line 3577) | func (p *SearchReq) field3Length() int {
  method FastRead (line 3588) | func (p *SearchResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 3673) | func (p *SearchResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 3700) | func (p *SearchResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 3714) | func (p *SearchResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 3718) | func (p *SearchResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bi...
  method BLength (line 3730) | func (p *SearchResp) BLength() int {
  method fastWriteField1 (line 3742) | func (p *SearchResp) fastWriteField1(buf []byte, binaryWriter bthrift.Bi...
  method fastWriteField255 (line 3758) | func (p *SearchResp) fastWriteField255(buf []byte, binaryWriter bthrift....
  method field1Length (line 3766) | func (p *SearchResp) field1Length() int {
  method field255Length (line 3778) | func (p *SearchResp) field255Length() int {
  method FastRead (line 3786) | func (p *ListReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 3885) | func (p *ListReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 3898) | func (p *ListReq) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 3911) | func (p *ListReq) FastReadField3(buf []byte) (int, error) {
  method FastWrite (line 3927) | func (p *ListReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 3931) | func (p *ListReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.Binar...
  method BLength (line 3944) | func (p *ListReq) BLength() int {
  method fastWriteField1 (line 3957) | func (p *ListReq) fastWriteField1(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField2 (line 3968) | func (p *ListReq) fastWriteField2(buf []byte, binaryWriter bthrift.Binar...
  method fastWriteField3 (line 3979) | func (p *ListReq) fastWriteField3(buf []byte, binaryWriter bthrift.Binar...
  method field1Length (line 3990) | func (p *ListReq) field1Length() int {
  method field2Length (line 4001) | func (p *ListReq) field2Length() int {
  method field3Length (line 4012) | func (p *ListReq) field3Length() int {
  method FastRead (line 4023) | func (p *ListResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 4108) | func (p *ListResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 4135) | func (p *ListResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 4149) | func (p *ListResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 4153) | func (p *ListResp) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bina...
  method BLength (line 4165) | func (p *ListResp) BLength() int {
  method fastWriteField1 (line 4177) | func (p *ListResp) fastWriteField1(buf []byte, binaryWriter bthrift.Bina...
  method fastWriteField255 (line 4193) | func (p *ListResp) fastWriteField255(buf []byte, binaryWriter bthrift.Bi...
  method field1Length (line 4201) | func (p *ListResp) field1Length() int {
  method field255Length (line 4213) | func (p *ListResp) field255Length() int {
  method FastRead (line 4221) | func (p *DecrStockReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 4321) | func (p *DecrStockReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 4335) | func (p *DecrStockReq) FastReadField2(buf []byte) (int, error) {
  method FastWrite (line 4350) | func (p *DecrStockReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 4354) | func (p *DecrStockReq) FastWriteNocopy(buf []byte, binaryWriter bthrift....
  method BLength (line 4366) | func (p *DecrStockReq) BLength() int {
  method fastWriteField1 (line 4378) | func (p *DecrStockReq) fastWriteField1(buf []byte, binaryWriter bthrift....
  method fastWriteField2 (line 4387) | func (p *DecrStockReq) fastWriteField2(buf []byte, binaryWriter bthrift....
  method field1Length (line 4396) | func (p *DecrStockReq) field1Length() int {
  method field2Length (line 4405) | func (p *DecrStockReq) field2Length() int {
  method FastRead (line 4414) | func (p *DecrStockResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 4485) | func (p *DecrStockResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 4499) | func (p *DecrStockResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 4503) | func (p *DecrStockResp) FastWriteNocopy(buf []byte, binaryWriter bthrift...
  method BLength (line 4514) | func (p *DecrStockResp) BLength() int {
  method fastWriteField255 (line 4525) | func (p *DecrStockResp) fastWriteField255(buf []byte, binaryWriter bthri...
  method field255Length (line 4533) | func (p *DecrStockResp) field255Length() int {
  method FastRead (line 4541) | func (p *ItemServiceAddArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 4612) | func (p *ItemServiceAddArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 4626) | func (p *ItemServiceAddArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 4630) | func (p *ItemServiceAddArgs) FastWriteNocopy(buf []byte, binaryWriter bt...
  method BLength (line 4641) | func (p *ItemServiceAddArgs) BLength() int {
  method fastWriteField1 (line 4652) | func (p *ItemServiceAddArgs) fastWriteField1(buf []byte, binaryWriter bt...
  method field1Length (line 4660) | func (p *ItemServiceAddArgs) field1Length() int {
  method FastRead (line 4668) | func (p *ItemServiceAddResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 4739) | func (p *ItemServiceAddResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 4753) | func (p *ItemServiceAddResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 4757) | func (p *ItemServiceAddResult) FastWriteNocopy(buf []byte, binaryWriter ...
  method BLength (line 4768) | func (p *ItemServiceAddResult) BLength() int {
  method fastWriteField0 (line 4779) | func (p *ItemServiceAddResult) fastWriteField0(buf []byte, binaryWriter ...
  method field0Length (line 4789) | func (p *ItemServiceAddResult) field0Length() int {
  method FastRead (line 4799) | func (p *ItemServiceEditArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 4870) | func (p *ItemServiceEditArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 4884) | func (p *ItemServiceEditArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 4888) | func (p *ItemServiceEditArgs) FastWriteNocopy(buf []byte, binaryWriter b...
  method BLength (line 4899) | func (p *ItemServiceEditArgs) BLength() int {
  method fastWriteField1 (line 4910) | func (p *ItemServiceEditArgs) fastWriteField1(buf []byte, binaryWriter b...
  method field1Length (line 4918) | func (p *ItemServiceEditArgs) field1Length() int {
  method FastRead (line 4926) | func (p *ItemServiceEditResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 4997) | func (p *ItemServiceEditResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 5011) | func (p *ItemServiceEditResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5015) | func (p *ItemServiceEditResult) FastWriteNocopy(buf []byte, binaryWriter...
  method BLength (line 5026) | func (p *ItemServiceEditResult) BLength() int {
  method fastWriteField0 (line 5037) | func (p *ItemServiceEditResult) fastWriteField0(buf []byte, binaryWriter...
  method field0Length (line 5047) | func (p *ItemServiceEditResult) field0Length() int {
  method FastRead (line 5057) | func (p *ItemServiceDeleteArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 5128) | func (p *ItemServiceDeleteArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 5142) | func (p *ItemServiceDeleteArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5146) | func (p *ItemServiceDeleteArgs) FastWriteNocopy(buf []byte, binaryWriter...
  method BLength (line 5157) | func (p *ItemServiceDeleteArgs) BLength() int {
  method fastWriteField1 (line 5168) | func (p *ItemServiceDeleteArgs) fastWriteField1(buf []byte, binaryWriter...
  method field1Length (line 5176) | func (p *ItemServiceDeleteArgs) field1Length() int {
  method FastRead (line 5184) | func (p *ItemServiceDeleteResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 5255) | func (p *ItemServiceDeleteResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 5269) | func (p *ItemServiceDeleteResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5273) | func (p *ItemServiceDeleteResult) FastWriteNocopy(buf []byte, binaryWrit...
  method BLength (line 5284) | func (p *ItemServiceDeleteResult) BLength() int {
  method fastWriteField0 (line 5295) | func (p *ItemServiceDeleteResult) fastWriteField0(buf []byte, binaryWrit...
  method field0Length (line 5305) | func (p *ItemServiceDeleteResult) field0Length() int {
  method FastRead (line 5315) | func (p *ItemServiceOnlineArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 5386) | func (p *ItemServiceOnlineArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 5400) | func (p *ItemServiceOnlineArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5404) | func (p *ItemServiceOnlineArgs) FastWriteNocopy(buf []byte, binaryWriter...
  method BLength (line 5415) | func (p *ItemServiceOnlineArgs) BLength() int {
  method fastWriteField1 (line 5426) | func (p *ItemServiceOnlineArgs) fastWriteField1(buf []byte, binaryWriter...
  method field1Length (line 5434) | func (p *ItemServiceOnlineArgs) field1Length() int {
  method FastRead (line 5442) | func (p *ItemServiceOnlineResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 5513) | func (p *ItemServiceOnlineResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 5527) | func (p *ItemServiceOnlineResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5531) | func (p *ItemServiceOnlineResult) FastWriteNocopy(buf []byte, binaryWrit...
  method BLength (line 5542) | func (p *ItemServiceOnlineResult) BLength() int {
  method fastWriteField0 (line 5553) | func (p *ItemServiceOnlineResult) fastWriteField0(buf []byte, binaryWrit...
  method field0Length (line 5563) | func (p *ItemServiceOnlineResult) field0Length() int {
  method FastRead (line 5573) | func (p *ItemServiceOfflineArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 5644) | func (p *ItemServiceOfflineArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 5658) | func (p *ItemServiceOfflineArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5662) | func (p *ItemServiceOfflineArgs) FastWriteNocopy(buf []byte, binaryWrite...
  method BLength (line 5673) | func (p *ItemServiceOfflineArgs) BLength() int {
  method fastWriteField1 (line 5684) | func (p *ItemServiceOfflineArgs) fastWriteField1(buf []byte, binaryWrite...
  method field1Length (line 5692) | func (p *ItemServiceOfflineArgs) field1Length() int {
  method FastRead (line 5700) | func (p *ItemServiceOfflineResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 5771) | func (p *ItemServiceOfflineResult) FastReadField0(buf []byte) (int, erro...
  method FastWrite (line 5785) | func (p *ItemServiceOfflineResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5789) | func (p *ItemServiceOfflineResult) FastWriteNocopy(buf []byte, binaryWri...
  method BLength (line 5800) | func (p *ItemServiceOfflineResult) BLength() int {
  method fastWriteField0 (line 5811) | func (p *ItemServiceOfflineResult) fastWriteField0(buf []byte, binaryWri...
  method field0Length (line 5821) | func (p *ItemServiceOfflineResult) field0Length() int {
  method FastRead (line 5831) | func (p *ItemServiceGetArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 5902) | func (p *ItemServiceGetArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 5916) | func (p *ItemServiceGetArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 5920) | func (p *ItemServiceGetArgs) FastWriteNocopy(buf []byte, binaryWriter bt...
  method BLength (line 5931) | func (p *ItemServiceGetArgs) BLength() int {
  method fastWriteField1 (line 5942) | func (p *ItemServiceGetArgs) fastWriteField1(buf []byte, binaryWriter bt...
  method field1Length (line 5950) | func (p *ItemServiceGetArgs) field1Length() int {
  method FastRead (line 5958) | func (p *ItemServiceGetResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 6029) | func (p *ItemServiceGetResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 6043) | func (p *ItemServiceGetResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6047) | func (p *ItemServiceGetResult) FastWriteNocopy(buf []byte, binaryWriter ...
  method BLength (line 6058) | func (p *ItemServiceGetResult) BLength() int {
  method fastWriteField0 (line 6069) | func (p *ItemServiceGetResult) fastWriteField0(buf []byte, binaryWriter ...
  method field0Length (line 6079) | func (p *ItemServiceGetResult) field0Length() int {
  method FastRead (line 6089) | func (p *ItemServiceMGet2CArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 6160) | func (p *ItemServiceMGet2CArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 6174) | func (p *ItemServiceMGet2CArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6178) | func (p *ItemServiceMGet2CArgs) FastWriteNocopy(buf []byte, binaryWriter...
  method BLength (line 6189) | func (p *ItemServiceMGet2CArgs) BLength() int {
  method fastWriteField1 (line 6200) | func (p *ItemServiceMGet2CArgs) fastWriteField1(buf []byte, binaryWriter...
  method field1Length (line 6208) | func (p *ItemServiceMGet2CArgs) field1Length() int {
  method FastRead (line 6216) | func (p *ItemServiceMGet2CResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 6287) | func (p *ItemServiceMGet2CResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 6301) | func (p *ItemServiceMGet2CResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6305) | func (p *ItemServiceMGet2CResult) FastWriteNocopy(buf []byte, binaryWrit...
  method BLength (line 6316) | func (p *ItemServiceMGet2CResult) BLength() int {
  method fastWriteField0 (line 6327) | func (p *ItemServiceMGet2CResult) fastWriteField0(buf []byte, binaryWrit...
  method field0Length (line 6337) | func (p *ItemServiceMGet2CResult) field0Length() int {
  method FastRead (line 6347) | func (p *ItemServiceSearchArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 6418) | func (p *ItemServiceSearchArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 6432) | func (p *ItemServiceSearchArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6436) | func (p *ItemServiceSearchArgs) FastWriteNocopy(buf []byte, binaryWriter...
  method BLength (line 6447) | func (p *ItemServiceSearchArgs) BLength() int {
  method fastWriteField1 (line 6458) | func (p *ItemServiceSearchArgs) fastWriteField1(buf []byte, binaryWriter...
  method field1Length (line 6466) | func (p *ItemServiceSearchArgs) field1Length() int {
  method FastRead (line 6474) | func (p *ItemServiceSearchResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 6545) | func (p *ItemServiceSearchResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 6559) | func (p *ItemServiceSearchResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6563) | func (p *ItemServiceSearchResult) FastWriteNocopy(buf []byte, binaryWrit...
  method BLength (line 6574) | func (p *ItemServiceSearchResult) BLength() int {
  method fastWriteField0 (line 6585) | func (p *ItemServiceSearchResult) fastWriteField0(buf []byte, binaryWrit...
  method field0Length (line 6595) | func (p *ItemServiceSearchResult) field0Length() int {
  method FastRead (line 6605) | func (p *ItemServiceListArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 6676) | func (p *ItemServiceListArgs) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 6690) | func (p *ItemServiceListArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6694) | func (p *ItemServiceListArgs) FastWriteNocopy(buf []byte, binaryWriter b...
  method BLength (line 6705) | func (p *ItemServiceListArgs) BLength() int {
  method fastWriteField1 (line 6716) | func (p *ItemServiceListArgs) fastWriteField1(buf []byte, binaryWriter b...
  method field1Length (line 6724) | func (p *ItemServiceListArgs) field1Length() int {
  method FastRead (line 6732) | func (p *ItemServiceListResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 6803) | func (p *ItemServiceListResult) FastReadField0(buf []byte) (int, error) {
  method FastWrite (line 6817) | func (p *ItemServiceListResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6821) | func (p *ItemServiceListResult) FastWriteNocopy(buf []byte, binaryWriter...
  method BLength (line 6832) | func (p *ItemServiceListResult) BLength() int {
  method fastWriteField0 (line 6843) | func (p *ItemServiceListResult) fastWriteField0(buf []byte, binaryWriter...
  method field0Length (line 6853) | func (p *ItemServiceListResult) field0Length() int {
  method FastRead (line 6863) | func (p *ItemServiceDecrStockArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 6934) | func (p *ItemServiceDecrStockArgs) FastReadField1(buf []byte) (int, erro...
  method FastWrite (line 6948) | func (p *ItemServiceDecrStockArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 6952) | func (p *ItemServiceDecrStockArgs) FastWriteNocopy(buf []byte, binaryWri...
  method BLength (line 6963) | func (p *ItemServiceDecrStockArgs) BLength() int {
  method fastWriteField1 (line 6974) | func (p *ItemServiceDecrStockArgs) fastWriteField1(buf []byte, binaryWri...
  method field1Length (line 6982) | func (p *ItemServiceDecrStockArgs) field1Length() int {
  method FastRead (line 6990) | func (p *ItemServiceDecrStockResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 7061) | func (p *ItemServiceDecrStockResult) FastReadField0(buf []byte) (int, er...
  method FastWrite (line 7075) | func (p *ItemServiceDecrStockResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 7079) | func (p *ItemServiceDecrStockResult) FastWriteNocopy(buf []byte, binaryW...
  method BLength (line 7090) | func (p *ItemServiceDecrStockResult) BLength() int {
  method fastWriteField0 (line 7101) | func (p *ItemServiceDecrStockResult) fastWriteField0(buf []byte, binaryW...
  method field0Length (line 7111) | func (p *ItemServiceDecrStockResult) field0Length() int {
  method FastRead (line 7121) | func (p *ItemServiceDecrStockRevertArgs) FastRead(buf []byte) (int, erro...
  method FastReadField1 (line 7192) | func (p *ItemServiceDecrStockRevertArgs) FastReadField1(buf []byte) (int...
  method FastWrite (line 7206) | func (p *ItemServiceDecrStockRevertArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 7210) | func (p *ItemServiceDecrStockRevertArgs) FastWriteNocopy(buf []byte, bin...
  method BLength (line 7221) | func (p *ItemServiceDecrStockRevertArgs) BLength() int {
  method fastWriteField1 (line 7232) | func (p *ItemServiceDecrStockRevertArgs) fastWriteField1(buf []byte, bin...
  method field1Length (line 7240) | func (p *ItemServiceDecrStockRevertArgs) field1Length() int {
  method FastRead (line 7248) | func (p *ItemServiceDecrStockRevertResult) FastRead(buf []byte) (int, er...
  method FastReadField0 (line 7319) | func (p *ItemServiceDecrStockRevertResult) FastReadField0(buf []byte) (i...
  method FastWrite (line 7333) | func (p *ItemServiceDecrStockRevertResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 7337) | func (p *ItemServiceDecrStockRevertResult) FastWriteNocopy(buf []byte, b...
  method BLength (line 7348) | func (p *ItemServiceDecrStockRevertResult) BLength() int {
  method fastWriteField0 (line 7359) | func (p *ItemServiceDecrStockRevertResult) fastWriteField0(buf []byte, b...
  method field0Length (line 7369) | func (p *ItemServiceDecrStockRevertResult) field0Length() int {
  method GetFirstArgument (line 7379) | func (p *ItemServiceAddArgs) GetFirstArgument() interface{} {
  method GetResult (line 7383) | func (p *ItemServiceAddResult) GetResult() interface{} {
  method GetFirstArgument (line 7387) | func (p *ItemServiceEditArgs) GetFirstArgument() interface{} {
  method GetResult (line 7391) | func (p *ItemServiceEditResult) GetResult() interface{} {
  method GetFirstArgument (line 7395) | func (p *ItemServiceDeleteArgs) GetFirstArgument() interface{} {
  method GetResult (line 7399) | func (p *ItemServiceDeleteResult) GetResult() interface{} {
  method GetFirstArgument (line 7403) | func (p *ItemServiceOnlineArgs) GetFirstArgument() interface{} {
  method GetResult (line 7407) | func (p *ItemServiceOnlineResult) GetResult() interface{} {
  method GetFirstArgument (line 7411) | func (p *ItemServiceOfflineArgs) GetFirstArgument() interface{} {
  method GetResult (line 7415) | func (p *ItemServiceOfflineResult) GetResult() interface{} {
  method GetFirstArgument (line 7419) | func (p *ItemServiceGetArgs) GetFirstArgument() interface{} {
  method GetResult (line 7423) | func (p *ItemServiceGetResult) GetResult() interface{} {
  method GetFirstArgument (line 7427) | func (p *ItemServiceMGet2CArgs) GetFirstArgument() interface{} {
  method GetResult (line 7431) | func (p *ItemServiceMGet2CResult) GetResult() interface{} {
  method GetFirstArgument (line 7435) | func (p *ItemServiceSearchArgs) GetFirstArgument() interface{} {
  method GetResult (line 7439) | func (p *ItemServiceSearchResult) GetResult() interface{} {
  method GetFirstArgument (line 7443) | func (p *ItemServiceListArgs) GetFirstArgument() interface{} {
  method GetResult (line 7447) | func (p *ItemServiceListResult) GetResult() interface{} {
  method GetFirstArgument (line 7451) | func (p *ItemServiceDecrStockArgs) GetFirstArgument() interface{} {
  method GetResult (line 7455) | func (p *ItemServiceDecrStockResult) GetResult() interface{} {
  method GetFirstArgument (line 7459) | func (p *ItemServiceDecrStockRevertArgs) GetFirstArgument() interface{} {
  method GetResult (line 7463) | func (p *ItemServiceDecrStockRevertResult) GetResult() interface{} {

FILE: book-shop/kitex_gen/cwg/bookshop/order/k-order.go
  method FastRead (line 28) | func (p *OrderItem) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 225) | func (p *OrderItem) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 239) | func (p *OrderItem) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 253) | func (p *OrderItem) FastReadField3(buf []byte) (int, error) {
  method FastReadField4 (line 267) | func (p *OrderItem) FastReadField4(buf []byte) (int, error) {
  method FastReadField5 (line 281) | func (p *OrderItem) FastReadField5(buf []byte) (int, error) {
  method FastReadField6 (line 295) | func (p *OrderItem) FastReadField6(buf []byte) (int, error) {
  method FastReadField7 (line 309) | func (p *OrderItem) FastReadField7(buf []byte) (int, error) {
  method FastReadField8 (line 323) | func (p *OrderItem) FastReadField8(buf []byte) (int, error) {
  method FastReadField9 (line 337) | func (p *OrderItem) FastReadField9(buf []byte) (int, error) {
  method FastReadField10 (line 351) | func (p *OrderItem) FastReadField10(buf []byte) (int, error) {
  method FastWrite (line 366) | func (p *OrderItem) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 370) | func (p *OrderItem) FastWriteNocopy(buf []byte, binaryWriter bthrift.Bin...
  method BLength (line 390) | func (p *OrderItem) BLength() int {
  method fastWriteField1 (line 410) | func (p *OrderItem) fastWriteField1(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField2 (line 419) | func (p *OrderItem) fastWriteField2(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField3 (line 428) | func (p *OrderItem) fastWriteField3(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField4 (line 437) | func (p *OrderItem) fastWriteField4(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField5 (line 446) | func (p *OrderItem) fastWriteField5(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField6 (line 455) | func (p *OrderItem) fastWriteField6(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField7 (line 464) | func (p *OrderItem) fastWriteField7(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField8 (line 473) | func (p *OrderItem) fastWriteField8(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField9 (line 482) | func (p *OrderItem) fastWriteField9(buf []byte, binaryWriter bthrift.Bin...
  method fastWriteField10 (line 491) | func (p *OrderItem) fastWriteField10(buf []byte, binaryWriter bthrift.Bi...
  method field1Length (line 500) | func (p *OrderItem) field1Length() int {
  method field2Length (line 509) | func (p *OrderItem) field2Length() int {
  method field3Length (line 518) | func (p *OrderItem) field3Length() int {
  method field4Length (line 527) | func (p *OrderItem) field4Length() int {
  method field5Length (line 536) | func (p *OrderItem) field5Length() int {
  method field6Length (line 545) | func (p *OrderItem) field6Length() int {
  method field7Length (line 554) | func (p *OrderItem) field7Length() int {
  method field8Length (line 563) | func (p *OrderItem) field8Length() int {
  method field9Length (line 572) | func (p *OrderItem) field9Length() int {
  method field10Length (line 581) | func (p *OrderItem) field10Length() int {
  method FastRead (line 590) | func (p *CreateOrderReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 732) | func (p *CreateOrderReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 746) | func (p *CreateOrderReq) FastReadField2(buf []byte) (int, error) {
  method FastReadField3 (line 760) | func (p *CreateOrderReq) FastReadField3(buf []byte) (int, error) {
  method FastReadField4 (line 774) | func (p *CreateOrderReq) FastReadField4(buf []byte) (int, error) {
  method FastWrite (line 789) | func (p *CreateOrderReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 793) | func (p *CreateOrderReq) FastWriteNocopy(buf []byte, binaryWriter bthrif...
  method BLength (line 807) | func (p *CreateOrderReq) BLength() int {
  method fastWriteField1 (line 821) | func (p *CreateOrderReq) fastWriteField1(buf []byte, binaryWriter bthrif...
  method fastWriteField2 (line 830) | func (p *CreateOrderReq) fastWriteField2(buf []byte, binaryWriter bthrif...
  method fastWriteField3 (line 839) | func (p *CreateOrderReq) fastWriteField3(buf []byte, binaryWriter bthrif...
  method fastWriteField4 (line 848) | func (p *CreateOrderReq) fastWriteField4(buf []byte, binaryWriter bthrif...
  method field1Length (line 857) | func (p *CreateOrderReq) field1Length() int {
  method field2Length (line 866) | func (p *CreateOrderReq) field2Length() int {
  method field3Length (line 875) | func (p *CreateOrderReq) field3Length() int {
  method field4Length (line 884) | func (p *CreateOrderReq) field4Length() int {
  method FastRead (line 893) | func (p *CreateOrderResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 964) | func (p *CreateOrderResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 978) | func (p *CreateOrderResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 982) | func (p *CreateOrderResp) FastWriteNocopy(buf []byte, binaryWriter bthri...
  method BLength (line 993) | func (p *CreateOrderResp) BLength() int {
  method fastWriteField255 (line 1004) | func (p *CreateOrderResp) fastWriteField255(buf []byte, binaryWriter bth...
  method field255Length (line 1012) | func (p *CreateOrderResp) field255Length() int {
  method FastRead (line 1020) | func (p *CancelOrderReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1099) | func (p *CancelOrderReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 1114) | func (p *CancelOrderReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1118) | func (p *CancelOrderReq) FastWriteNocopy(buf []byte, binaryWriter bthrif...
  method BLength (line 1129) | func (p *CancelOrderReq) BLength() int {
  method fastWriteField1 (line 1140) | func (p *CancelOrderReq) fastWriteField1(buf []byte, binaryWriter bthrif...
  method field1Length (line 1149) | func (p *CancelOrderReq) field1Length() int {
  method FastRead (line 1158) | func (p *CancelOrderResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 1229) | func (p *CancelOrderResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 1243) | func (p *CancelOrderResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1247) | func (p *CancelOrderResp) FastWriteNocopy(buf []byte, binaryWriter bthri...
  method BLength (line 1258) | func (p *CancelOrderResp) BLength() int {
  method fastWriteField255 (line 1269) | func (p *CancelOrderResp) fastWriteField255(buf []byte, binaryWriter bth...
  method field255Length (line 1277) | func (p *CancelOrderResp) field255Length() int {
  method FastRead (line 1285) | func (p *ListOrderReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1378) | func (p *ListOrderReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 1392) | func (p *ListOrderReq) FastReadField2(buf []byte) (int, error) {
  method FastWrite (line 1408) | func (p *ListOrderReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1412) | func (p *ListOrderReq) FastWriteNocopy(buf []byte, binaryWriter bthrift....
  method BLength (line 1424) | func (p *ListOrderReq) BLength() int {
  method fastWriteField1 (line 1436) | func (p *ListOrderReq) fastWriteField1(buf []byte, binaryWriter bthrift....
  method fastWriteField2 (line 1445) | func (p *ListOrderReq) fastWriteField2(buf []byte, binaryWriter bthrift....
  method field1Length (line 1456) | func (p *ListOrderReq) field1Length() int {
  method field2Length (line 1465) | func (p *ListOrderReq) field2Length() int {
  method FastRead (line 1476) | func (p *ListOrderResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1561) | func (p *ListOrderResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 1588) | func (p *ListOrderResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 1602) | func (p *ListOrderResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1606) | func (p *ListOrderResp) FastWriteNocopy(buf []byte, binaryWriter bthrift...
  method BLength (line 1618) | func (p *ListOrderResp) BLength() int {
  method fastWriteField1 (line 1630) | func (p *ListOrderResp) fastWriteField1(buf []byte, binaryWriter bthrift...
  method fastWriteField255 (line 1646) | func (p *ListOrderResp) fastWriteField255(buf []byte, binaryWriter bthri...
  method field1Length (line 1654) | func (p *ListOrderResp) field1Length() int {
  method field255Length (line 1666) | func (p *ListOrderResp) field255Length() int {
  method FastRead (line 1674) | func (p *GetOrderByIdReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1753) | func (p *GetOrderByIdReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 1768) | func (p *GetOrderByIdReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1772) | func (p *GetOrderByIdReq) FastWriteNocopy(buf []byte, binaryWriter bthri...
  method BLength (line 1783) | func (p *GetOrderByIdReq) BLength() int {
  method fastWriteField1 (line 1794) | func (p *GetOrderByIdReq) fastWriteField1(buf []byte, binaryWriter bthri...
  method field1Length (line 1803) | func (p *GetOrderByIdReq) field1Length() int {
  method FastRead (line 1812) | func (p *GetOrderByIdResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1897) | func (p *GetOrderByIdResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 1910) | func (p *GetOrderByIdResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 1924) | func (p *GetOrderByIdResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 1928) | func (p *GetOrderByIdResp) FastWriteNocopy(buf []byte, binaryWriter bthr...
  method BLength (line 1940) | func (p *GetOrderByIdResp) BLength() int {
  method fastWriteField1 (line 1952) | func (p *GetOrderByIdResp) fastWriteField1(buf []byte, binaryWriter bthr...
  method fastWriteField255 (line 1960) | func (p *GetOrderByIdResp) fastWriteField255(buf []byte, binaryWriter bt...
  method field1Length (line 1968) | func (p *GetOrderByIdResp) field1Length() int {
  method field255Length (line 1976) | func (p *GetOrderByIdResp) field255Length() int {
  method FastRead (line 1984) | func (p *OrderServiceCreateOrderArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2055) | func (p *OrderServiceCreateOrderArgs) FastReadField1(buf []byte) (int, e...
  method FastWrite (line 2069) | func (p *OrderServiceCreateOrderArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2073) | func (p *OrderServiceCreateOrderArgs) FastWriteNocopy(buf []byte, binary...
  method BLength (line 2084) | func (p *OrderServiceCreateOrderArgs) BLength() int {
  method fastWriteField1 (line 2095) | func (p *OrderServiceCreateOrderArgs) fastWriteField1(buf []byte, binary...
  method field1Length (line 2103) | func (p *OrderServiceCreateOrderArgs) field1Length() int {
  method FastRead (line 2111) | func (p *OrderServiceCreateOrderResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 2182) | func (p *OrderServiceCreateOrderResult) FastReadField0(buf []byte) (int,...
  method FastWrite (line 2196) | func (p *OrderServiceCreateOrderResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2200) | func (p *OrderServiceCreateOrderResult) FastWriteNocopy(buf []byte, bina...
  method BLength (line 2211) | func (p *OrderServiceCreateOrderResult) BLength() int {
  method fastWriteField0 (line 2222) | func (p *OrderServiceCreateOrderResult) fastWriteField0(buf []byte, bina...
  method field0Length (line 2232) | func (p *OrderServiceCreateOrderResult) field0Length() int {
  method FastRead (line 2242) | func (p *OrderServiceCancelOrderArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2313) | func (p *OrderServiceCancelOrderArgs) FastReadField1(buf []byte) (int, e...
  method FastWrite (line 2327) | func (p *OrderServiceCancelOrderArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2331) | func (p *OrderServiceCancelOrderArgs) FastWriteNocopy(buf []byte, binary...
  method BLength (line 2342) | func (p *OrderServiceCancelOrderArgs) BLength() int {
  method fastWriteField1 (line 2353) | func (p *OrderServiceCancelOrderArgs) fastWriteField1(buf []byte, binary...
  method field1Length (line 2361) | func (p *OrderServiceCancelOrderArgs) field1Length() int {
  method FastRead (line 2369) | func (p *OrderServiceCancelOrderResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 2440) | func (p *OrderServiceCancelOrderResult) FastReadField0(buf []byte) (int,...
  method FastWrite (line 2454) | func (p *OrderServiceCancelOrderResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2458) | func (p *OrderServiceCancelOrderResult) FastWriteNocopy(buf []byte, bina...
  method BLength (line 2469) | func (p *OrderServiceCancelOrderResult) BLength() int {
  method fastWriteField0 (line 2480) | func (p *OrderServiceCancelOrderResult) fastWriteField0(buf []byte, bina...
  method field0Length (line 2490) | func (p *OrderServiceCancelOrderResult) field0Length() int {
  method FastRead (line 2500) | func (p *OrderServiceListOrderArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2571) | func (p *OrderServiceListOrderArgs) FastReadField1(buf []byte) (int, err...
  method FastWrite (line 2585) | func (p *OrderServiceListOrderArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2589) | func (p *OrderServiceListOrderArgs) FastWriteNocopy(buf []byte, binaryWr...
  method BLength (line 2600) | func (p *OrderServiceListOrderArgs) BLength() int {
  method fastWriteField1 (line 2611) | func (p *OrderServiceListOrderArgs) fastWriteField1(buf []byte, binaryWr...
  method field1Length (line 2619) | func (p *OrderServiceListOrderArgs) field1Length() int {
  method FastRead (line 2627) | func (p *OrderServiceListOrderResult) FastRead(buf []byte) (int, error) {
  method FastReadField0 (line 2698) | func (p *OrderServiceListOrderResult) FastReadField0(buf []byte) (int, e...
  method FastWrite (line 2712) | func (p *OrderServiceListOrderResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2716) | func (p *OrderServiceListOrderResult) FastWriteNocopy(buf []byte, binary...
  method BLength (line 2727) | func (p *OrderServiceListOrderResult) BLength() int {
  method fastWriteField0 (line 2738) | func (p *OrderServiceListOrderResult) fastWriteField0(buf []byte, binary...
  method field0Length (line 2748) | func (p *OrderServiceListOrderResult) field0Length() int {
  method FastRead (line 2758) | func (p *OrderServiceGetOrderByIdArgs) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 2829) | func (p *OrderServiceGetOrderByIdArgs) FastReadField1(buf []byte) (int, ...
  method FastWrite (line 2843) | func (p *OrderServiceGetOrderByIdArgs) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2847) | func (p *OrderServiceGetOrderByIdArgs) FastWriteNocopy(buf []byte, binar...
  method BLength (line 2858) | func (p *OrderServiceGetOrderByIdArgs) BLength() int {
  method fastWriteField1 (line 2869) | func (p *OrderServiceGetOrderByIdArgs) fastWriteField1(buf []byte, binar...
  method field1Length (line 2877) | func (p *OrderServiceGetOrderByIdArgs) field1Length() int {
  method FastRead (line 2885) | func (p *OrderServiceGetOrderByIdResult) FastRead(buf []byte) (int, erro...
  method FastReadField0 (line 2956) | func (p *OrderServiceGetOrderByIdResult) FastReadField0(buf []byte) (int...
  method FastWrite (line 2970) | func (p *OrderServiceGetOrderByIdResult) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 2974) | func (p *OrderServiceGetOrderByIdResult) FastWriteNocopy(buf []byte, bin...
  method BLength (line 2985) | func (p *OrderServiceGetOrderByIdResult) BLength() int {
  method fastWriteField0 (line 2996) | func (p *OrderServiceGetOrderByIdResult) fastWriteField0(buf []byte, bin...
  method field0Length (line 3006) | func (p *OrderServiceGetOrderByIdResult) field0Length() int {
  method GetFirstArgument (line 3016) | func (p *OrderServiceCreateOrderArgs) GetFirstArgument() interface{} {
  method GetResult (line 3020) | func (p *OrderServiceCreateOrderResult) GetResult() interface{} {
  method GetFirstArgument (line 3024) | func (p *OrderServiceCancelOrderArgs) GetFirstArgument() interface{} {
  method GetResult (line 3028) | func (p *OrderServiceCancelOrderResult) GetResult() interface{} {
  method GetFirstArgument (line 3032) | func (p *OrderServiceListOrderArgs) GetFirstArgument() interface{} {
  method GetResult (line 3036) | func (p *OrderServiceListOrderResult) GetResult() interface{} {
  method GetFirstArgument (line 3040) | func (p *OrderServiceGetOrderByIdArgs) GetFirstArgument() interface{} {
  method GetResult (line 3044) | func (p *OrderServiceGetOrderByIdResult) GetResult() interface{} {

FILE: book-shop/kitex_gen/cwg/bookshop/order/order.go
  type Status (line 15) | type Status
    method String (line 23) | func (p Status) String() string {
    method Scan (line 49) | func (p *Status) Scan(value interface{}) (err error) {
    method Value (line 56) | func (p *Status) Value() (driver.Value, error) {
  constant Status_Finish (line 18) | Status_Finish  Status = 0
  constant Status_Cancel (line 19) | Status_Cancel  Status = 1
  constant Status_Pending (line 20) | Status_Pending Status = 2
  function StatusFromString (line 35) | func StatusFromString(s string) (Status, error) {
  function StatusPtr (line 47) | func StatusPtr(v Status) *Status { return &v }
  type OrderItem (line 63) | type OrderItem struct
    method GetOrderId (line 80) | func (p *OrderItem) GetOrderId() (v int64) {
    method GetUserId (line 84) | func (p *OrderItem) GetUserId() (v int64) {
    method GetUserName (line 88) | func (p *OrderItem) GetUserName() (v string) {
    method GetAddress (line 92) | func (p *OrderItem) GetAddress() (v string) {
    method GetProductId (line 96) | func (p *OrderItem) GetProductId() (v int64) {
    method GetStockNum (line 100) | func (p *OrderItem) GetStockNum() (v int64) {
    method GetProductSnapshot (line 104) | func (p *OrderItem) GetProductSnapshot() (v string) {
    method GetStatus (line 108) | func (p *OrderItem) GetStatus() (v Status) {
    method GetCreateTime (line 112) | func (p *OrderItem) GetCreateTime() (v int64) {
    method GetUpdateTime (line 116) | func (p *OrderItem) GetUpdateTime() (v int64) {
    method SetOrderId (line 119) | func (p *OrderItem) SetOrderId(val int64) {
    method SetUserId (line 122) | func (p *OrderItem) SetUserId(val int64) {
    method SetUserName (line 125) | func (p *OrderItem) SetUserName(val string) {
    method SetAddress (line 128) | func (p *OrderItem) SetAddress(val string) {
    method SetProductId (line 131) | func (p *OrderItem) SetProductId(val int64) {
    method SetStockNum (line 134) | func (p *OrderItem) SetStockNum(val int64) {
    method SetProductSnapshot (line 137) | func (p *OrderItem) SetProductSnapshot(val string) {
    method SetStatus (line 140) | func (p *OrderItem) SetStatus(val Status) {
    method SetCreateTime (line 143) | func (p *OrderItem) SetCreateTime(val int64) {
    method SetUpdateTime (line 146) | func (p *OrderItem) SetUpdateTime(val int64) {
    method Read (line 163) | func (p *OrderItem) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 312) | func (p *OrderItem) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 321) | func (p *OrderItem) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 330) | func (p *OrderItem) ReadField3(iprot thrift.TProtocol) error {
    method ReadField4 (line 339) | func (p *OrderItem) ReadField4(iprot thrift.TProtocol) error {
    method ReadField5 (line 348) | func (p *OrderItem) ReadField5(iprot thrift.TProtocol) error {
    method ReadField6 (line 357) | func (p *OrderItem) ReadField6(iprot thrift.TProtocol) error {
    method ReadField7 (line 366) | func (p *OrderItem) ReadField7(iprot thrift.TProtocol) error {
    method ReadField8 (line 375) | func (p *OrderItem) ReadField8(iprot thrift.TProtocol) error {
    method ReadField9 (line 384) | func (p *OrderItem) ReadField9(iprot thrift.TProtocol) error {
    method ReadField10 (line 393) | func (p *OrderItem) ReadField10(iprot thrift.TProtocol) error {
    method Write (line 402) | func (p *OrderItem) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 467) | func (p *OrderItem) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 484) | func (p *OrderItem) writeField2(oprot thrift.TProtocol) (err error) {
    method writeField3 (line 501) | func (p *OrderItem) writeField3(oprot thrift.TProtocol) (err error) {
    method writeField4 (line 518) | func (p *OrderItem) writeField4(oprot thrift.TProtocol) (err error) {
    method writeField5 (line 535) | func (p *OrderItem) writeField5(oprot thrift.TProtocol) (err error) {
    method writeField6 (line 552) | func (p *OrderItem) writeField6(oprot thrift.TProtocol) (err error) {
    method writeField7 (line 569) | func (p *OrderItem) writeField7(oprot thrift.TProtocol) (err error) {
    method writeField8 (line 586) | func (p *OrderItem) writeField8(oprot thrift.TProtocol) (err error) {
    method writeField9 (line 603) | func (p *OrderItem) writeField9(oprot thrift.TProtocol) (err error) {
    method writeField10 (line 620) | func (p *OrderItem) writeField10(oprot thrift.TProtocol) (err error) {
    method String (line 637) | func (p *OrderItem) String() string {
    method DeepEqual (line 644) | func (p *OrderItem) DeepEqual(ano *OrderItem) bool {
    method Field1DeepEqual (line 683) | func (p *OrderItem) Field1DeepEqual(src int64) bool {
    method Field2DeepEqual (line 690) | func (p *OrderItem) Field2DeepEqual(src int64) bool {
    method Field3DeepEqual (line 697) | func (p *OrderItem) Field3DeepEqual(src string) bool {
    method Field4DeepEqual (line 704) | func (p *OrderItem) Field4DeepEqual(src string) bool {
    method Field5DeepEqual (line 711) | func (p *OrderItem) Field5DeepEqual(src int64) bool {
    method Field6DeepEqual (line 718) | func (p *OrderItem) Field6DeepEqual(src int64) bool {
    method Field7DeepEqual (line 725) | func (p *OrderItem) Field7DeepEqual(src string) bool {
    method Field8DeepEqual (line 732) | func (p *OrderItem) Field8DeepEqual(src Status) bool {
    method Field9DeepEqual (line 739) | func (p *OrderItem) Field9DeepEqual(src int64) bool {
    method Field10DeepEqual (line 746) | func (p *OrderItem) Field10DeepEqual(src int64) bool {
  function NewOrderItem (line 76) | func NewOrderItem() *OrderItem {
  type CreateOrderReq (line 754) | type CreateOrderReq struct
    method GetUserId (line 765) | func (p *CreateOrderReq) GetUserId() (v int64) {
    method GetAddress (line 769) | func (p *CreateOrderReq) GetAddress() (v string) {
    method GetProductId (line 773) | func (p *CreateOrderReq) GetProductId() (v int64) {
    method GetStockNum (line 777) | func (p *CreateOrderReq) GetStockNum() (v int64) {
    method SetUserId (line 780) | func (p *CreateOrderReq) SetUserId(val int64) {
    method SetAddress (line 783) | func (p *CreateOrderReq) SetAddress(val string) {
    method SetProductId (line 786) | func (p *CreateOrderReq) SetProductId(val int64) {
    method SetStockNum (line 789) | func (p *CreateOrderReq) SetStockNum(val int64) {
    method Read (line 800) | func (p *CreateOrderReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 918) | func (p *CreateOrderReq) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 927) | func (p *CreateOrderReq) ReadField2(iprot thrift.TProtocol) error {
    method ReadField3 (line 936) | func (p *CreateOrderReq) ReadField3(iprot thrift.TProtocol) error {
    method ReadField4 (line 945) | func (p *CreateOrderReq) ReadField4(iprot thrift.TProtocol) error {
    method Write (line 954) | func (p *CreateOrderReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 995) | func (p *CreateOrderReq) writeField1(oprot thrift.TProtocol) (err erro...
    method writeField2 (line 1012) | func (p *CreateOrderReq) writeField2(oprot thrift.TProtocol) (err erro...
    method writeField3 (line 1029) | func (p *CreateOrderReq) writeField3(oprot thrift.TProtocol) (err erro...
    method writeField4 (line 1046) | func (p *CreateOrderReq) writeField4(oprot thrift.TProtocol) (err erro...
    method String (line 1063) | func (p *CreateOrderReq) String() string {
    method DeepEqual (line 1070) | func (p *CreateOrderReq) DeepEqual(ano *CreateOrderReq) bool {
    method Field1DeepEqual (line 1091) | func (p *CreateOrderReq) Field1DeepEqual(src int64) bool {
    method Field2DeepEqual (line 1098) | func (p *CreateOrderReq) Field2DeepEqual(src string) bool {
    method Field3DeepEqual (line 1105) | func (p *CreateOrderReq) Field3DeepEqual(src int64) bool {
    method Field4DeepEqual (line 1112) | func (p *CreateOrderReq) Field4DeepEqual(src int64) bool {
  function NewCreateOrderReq (line 761) | func NewCreateOrderReq() *CreateOrderReq {
  type CreateOrderResp (line 1120) | type CreateOrderResp struct
    method GetBaseResp (line 1130) | func (p *CreateOrderResp) GetBaseResp() (v *base.BaseResp) {
    method SetBaseResp (line 1136) | func (p *CreateOrderResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 1144) | func (p *CreateOrderResp) IsSetBaseResp() bool {
    method Read (line 1148) | func (p *CreateOrderResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField255 (line 1207) | func (p *CreateOrderResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 1215) | func (p *CreateOrderResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 1244) | func (p *CreateOrderResp) writeField255(oprot thrift.TProtocol) (err e...
    method String (line 1261) | func (p *CreateOrderResp) String() string {
    method DeepEqual (line 1268) | func (p *CreateOrderResp) DeepEqual(ano *CreateOrderResp) bool {
    method Field255DeepEqual (line 1280) | func (p *CreateOrderResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewCreateOrderResp (line 1124) | func NewCreateOrderResp() *CreateOrderResp {
  type CancelOrderReq (line 1288) | type CancelOrderReq struct
    method GetOrderId (line 1296) | func (p *CancelOrderReq) GetOrderId() (v int64) {
    method SetOrderId (line 1299) | func (p *CancelOrderReq) SetOrderId(val int64) {
    method Read (line 1307) | func (p *CancelOrderReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 1374) | func (p *CancelOrderReq) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 1383) | func (p *CancelOrderReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 1412) | func (p *CancelOrderReq) writeField1(oprot thrift.TProtocol) (err erro...
    method String (line 1429) | func (p *CancelOrderReq) String() string {
    method DeepEqual (line 1436) | func (p *CancelOrderReq) DeepEqual(ano *CancelOrderReq) bool {
    method Field1DeepEqual (line 1448) | func (p *CancelOrderReq) Field1DeepEqual(src int64) bool {
  function NewCancelOrderReq (line 1292) | func NewCancelOrderReq() *CancelOrderReq {
  type CancelOrderResp (line 1456) | type CancelOrderResp struct
    method GetBaseResp (line 1466) | func (p *CancelOrderResp) GetBaseResp() (v *base.BaseResp) {
    method SetBaseResp (line 1472) | func (p *CancelOrderResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 1480) | func (p *CancelOrderResp) IsSetBaseResp() bool {
    method Read (line 1484) | func (p *CancelOrderResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField255 (line 1543) | func (p *CancelOrderResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 1551) | func (p *CancelOrderResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 1580) | func (p *CancelOrderResp) writeField255(oprot thrift.TProtocol) (err e...
    method String (line 1597) | func (p *CancelOrderResp) String() string {
    method DeepEqual (line 1604) | func (p *CancelOrderResp) DeepEqual(ano *CancelOrderResp) bool {
    method Field255DeepEqual (line 1616) | func (p *CancelOrderResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewCancelOrderResp (line 1460) | func NewCancelOrderResp() *CancelOrderResp {
  type ListOrderReq (line 1624) | type ListOrderReq struct
    method GetUserId (line 1633) | func (p *ListOrderReq) GetUserId() (v int64) {
    method GetStatus (line 1639) | func (p *ListOrderReq) GetStatus() (v Status) {
    method SetUserId (line 1645) | func (p *ListOrderReq) SetUserId(val int64) {
    method SetStatus (line 1648) | func (p *ListOrderReq) SetStatus(val *Status) {
    method IsSetStatus (line 1657) | func (p *ListOrderReq) IsSetStatus() bool {
    method Read (line 1661) | func (p *ListOrderReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 1738) | func (p *ListOrderReq) ReadField1(iprot thrift.TProtocol) error {
    method ReadField2 (line 1747) | func (p *ListOrderReq) ReadField2(iprot thrift.TProtocol) error {
    method Write (line 1757) | func (p *ListOrderReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 1790) | func (p *ListOrderReq) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField2 (line 1807) | func (p *ListOrderReq) writeField2(oprot thrift.TProtocol) (err error) {
    method String (line 1826) | func (p *ListOrderReq) String() string {
    method DeepEqual (line 1833) | func (p *ListOrderReq) DeepEqual(ano *ListOrderReq) bool {
    method Field1DeepEqual (line 1848) | func (p *ListOrderReq) Field1DeepEqual(src int64) bool {
    method Field2DeepEqual (line 1855) | func (p *ListOrderReq) Field2DeepEqual(src *Status) bool {
  function NewListOrderReq (line 1629) | func NewListOrderReq() *ListOrderReq {
  type ListOrderResp (line 1868) | type ListOrderResp struct
    method GetOrders (line 1877) | func (p *ListOrderResp) GetOrders() (v []*OrderItem) {
    method GetBaseResp (line 1883) | func (p *ListOrderResp) GetBaseResp() (v *base.BaseResp) {
    method SetOrders (line 1889) | func (p *ListOrderResp) SetOrders(val []*OrderItem) {
    method SetBaseResp (line 1892) | func (p *ListOrderResp) SetBaseResp(val *base.BaseResp) {
    method IsSetBaseResp (line 1901) | func (p *ListOrderResp) IsSetBaseResp() bool {
    method Read (line 1905) | func (p *ListOrderResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 1974) | func (p *ListOrderResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField255 (line 1994) | func (p *ListOrderResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 2002) | func (p *ListOrderResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 2035) | func (p *ListOrderResp) writeField1(oprot thrift.TProtocol) (err error) {
    method writeField255 (line 2060) | func (p *ListOrderResp) writeField255(oprot thrift.TProtocol) (err err...
    method String (line 2077) | func (p *ListOrderResp) String() string {
    method DeepEqual (line 2084) | func (p *ListOrderResp) DeepEqual(ano *ListOrderResp) bool {
    method Field1DeepEqual (line 2099) | func (p *ListOrderResp) Field1DeepEqual(src []*OrderItem) bool {
    method Field255DeepEqual (line 2112) | func (p *ListOrderResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewListOrderResp (line 1873) | func NewListOrderResp() *ListOrderResp {
  type GetOrderByIdReq (line 2120) | type GetOrderByIdReq struct
    method GetOrderId (line 2128) | func (p *GetOrderByIdReq) GetOrderId() (v int64) {
    method SetOrderId (line 2131) | func (p *GetOrderByIdReq) SetOrderId(val int64) {
    method Read (line 2139) | func (p *GetOrderByIdReq) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 2206) | func (p *GetOrderByIdReq) ReadField1(iprot thrift.TProtocol) error {
    method Write (line 2215) | func (p *GetOrderByIdReq) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 2244) | func (p *GetOrderByIdReq) writeField1(oprot thrift.TProtocol) (err err...
    method String (line 2261) | func (p *GetOrderByIdReq) String() string {
    method DeepEqual (line 2268) | func (p *GetOrderByIdReq) DeepEqual(ano *GetOrderByIdReq) bool {
    method Field1DeepEqual (line 2280) | func (p *GetOrderByIdReq) Field1DeepEqual(src int64) bool {
  function NewGetOrderByIdReq (line 2124) | func NewGetOrderByIdReq() *GetOrderByIdReq {
  type GetOrderByIdResp (line 2288) | type GetOrderByIdResp struct
    method GetOrder (line 2299) | func (p *GetOrderByIdResp) GetOrder() (v *OrderItem) {
    method GetBaseResp (line 2308) | func (p *GetOrderByIdResp) GetBaseResp() (v *base.BaseResp) {
    method SetOrder (line 2314) | func (p *GetOrderByIdResp) SetOrder(val *OrderItem) {
    method SetBaseResp (line 2317) | func (p *GetOrderByIdResp) SetBaseResp(val *base.BaseResp) {
    method IsSetOrder (line 2326) | func (p *GetOrderByIdResp) IsSetOrder() bool {
    method IsSetBaseResp (line 2330) | func (p *GetOrderByIdResp) IsSetBaseResp() bool {
    method Read (line 2334) | func (p *GetOrderByIdResp) Read(iprot thrift.TProtocol) (err error) {
    method ReadField1 (line 2403) | func (p *GetOrderByIdResp) ReadField1(iprot thrift.TProtocol) error {
    method ReadField255 (line 2411) | func (p *GetOrderByIdResp) ReadField255(iprot thrift.TProtocol) error {
    method Write (line 2419) | func (p *GetOrderByIdResp) Write(oprot thrift.TProtocol) (err error) {
    method writeField1 (line 2452) | func (p *GetOrderByIdResp) writeField1(oprot thrift.TProtocol) (err er...
    method writeField255 (line 2469) | func (p *GetOrderByIdResp) writeField255(oprot thrift.TProtocol) (err ...
    method String (line 2486) | func (p *GetOrderByIdResp) String() string {
    method DeepEqual (line 2493) | func (p *GetOrderByIdResp) DeepEqual(ano *GetOrderByIdResp) bool {
    method Field1DeepEqual (line 2508) | func (p *GetOrderByIdResp) Field1DeepEqual(src *OrderItem) bool {
    method Field255DeepEqual (line 2515) | func (p *GetOrderByIdResp) Field255DeepEqual(src *base.BaseResp) bool {
  function NewGetOrderByIdResp (line 2293) | func NewGetOrderByIdResp() *GetOrderByIdResp {
  type OrderService (line 2523) | type OrderService interface
  type OrderServiceClient (line 2533) | type OrderServiceClient struct
    method Client_ (line 2555) | func (p *OrderServiceClient) Client_() thrift.TClient {
    method CreateOrder (line 2559) | func (p *OrderServiceClient) CreateOrder(ctx context.Context, req *Cre...
    method CancelOrder (line 2569) | func (p *OrderServiceClient) CancelOrder(ctx context.Context, req *Can...
    method ListOrder (line 2579) | func (p *OrderServiceClient) ListOrder(ctx context.Context, req *ListO...
    method GetOrderById (line 2589) | func (p *OrderServiceClient) GetOrderById(ctx context.Context, req *Ge...
  function NewOrderServiceClientFactory (line 2537) | func NewOrderServiceClientFactory(t thrift.TTransport, f thrift.TProtoco...
  function NewOrderServiceClientProtocol (line 2543) | func NewOrderServiceClientProtocol(t thrift.TTransport, iprot thrift.TPr...
  function NewOrderServiceClient (line 2549) | func NewOrderServiceClient(c thrift.TClient) *OrderServiceClient {
  type OrderServiceProcessor (line 2599) | type OrderServiceProcessor struct
    method AddToProcessorMap (line 2604) | func (p *OrderServiceProcessor) AddToProcessorMap(key string, processo...
    method GetProcessorFunction (line 2608) | func (p *OrderServiceProcessor) GetProcessorFunction(key string) (proc...
    method ProcessorMap (line 2613) | func (p *OrderServiceProcessor) ProcessorMap() map[string]thrift.TProc...
    method Process (line 2625) | func (p *OrderServiceProcessor) Process(ctx context.Context, iprot, op...
  function NewOrderServiceProcessor (line 2617) | func NewOrderServiceProcessor(handler OrderService) *OrderServiceProcess...
  type orderServiceProcessorCreateOrder (line 2643) | type orderServiceProcessorCreateOrder struct
    method Process (line 2647) | func (p *orderServiceProcessorCreateOrder) Process(ctx context.Context...
  type orderServiceProcessorCancelOrder (line 2691) | type orderServiceProcessorCancelOrder struct
    method Process (line 2695) | func (p *orderServiceProcessorCancelOrder) Process(ctx context.Context...
  type orderServiceProcessorListOrder (line 2739) | type orderServiceProcessorListOrder struct
    method Process (line 2743) | func (p *orderServiceProcessorListOrder) Process(ctx context.Context, ...
  type orderServiceProcessorGetOrderById (line 2787) | type orderServiceProcessorGetOrderById struct
    method Process (line 2791) | func (p *orderServiceProcessorGetOrderById) Process(ctx context.Contex...
  type OrderServiceCreateOrderArgs (line 2835) | type OrderServiceCreateOrderArgs struct
    method GetReq (line 2845) | func (p *OrderServiceCreateOrderArgs) GetReq() (v *CreateOrderReq) {
    method SetReq (line 2851) | func (p *OrderServiceCreateOrderArgs) SetReq(val *CreateOrderReq) {
    method IsSetReq (line 2859) | func (p *OrderServiceCreateOrderArgs) IsSetReq() bool {
    method Read (line 2863) | func (p *OrderServiceCreateOrderArgs) Read(iprot thrift.TProtocol) (er...
    method ReadField1 (line 2922) | func (p *OrderServiceCreateOrderArgs) ReadField1(iprot thrift.TProtoco...
    method Write (line 2930) | func (p *OrderServiceCreateOrderArgs) Write(oprot thrift.TProtocol) (e...
    method writeField1 (line 2959) | func (p *OrderServiceCreateOrderArgs) writeField1(oprot thrift.TProtoc...
    method String (line 2976) | func (p *OrderServiceCreateOrderArgs) String() string {
    method DeepEqual (line 2983) | func (p *OrderServiceCreateOrderArgs) DeepEqual(ano *OrderServiceCreat...
    method Field1DeepEqual (line 2995) | func (p *OrderServiceCreateOrderArgs) Field1DeepEqual(src *CreateOrder...
  function NewOrderServiceCreateOrderArgs (line 2839) | func NewOrderServiceCreateOrderArgs() *OrderServiceCreateOrderArgs {
  type OrderServiceCreateOrderResult (line 3003) | type OrderServiceCreateOrderResult struct
    method GetSuccess (line 3013) | func (p *OrderServiceCreateOrderResult) GetSuccess() (v *CreateOrderRe...
    method SetSuccess (line 3019) | func (p *OrderServiceCreateOrderResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 3027) | func (p *OrderServiceCreateOrderResult) IsSetSuccess() bool {
    method Read (line 3031) | func (p *OrderServiceCreateOrderResult) Read(iprot thrift.TProtocol) (...
    method ReadField0 (line 3090) | func (p *OrderServiceCreateOrderResult) ReadField0(iprot thrift.TProto...
    method Write (line 3098) | func (p *OrderServiceCreateOrderResult) Write(oprot thrift.TProtocol) ...
    method writeField0 (line 3127) | func (p *OrderServiceCreateOrderResult) writeField0(oprot thrift.TProt...
    method String (line 3146) | func (p *OrderServiceCreateOrderResult) String() string {
    method DeepEqual (line 3153) | func (p *OrderServiceCreateOrderResult) DeepEqual(ano *OrderServiceCre...
    method Field0DeepEqual (line 3165) | func (p *OrderServiceCreateOrderResult) Field0DeepEqual(src *CreateOrd...
  function NewOrderServiceCreateOrderResult (line 3007) | func NewOrderServiceCreateOrderResult() *OrderServiceCreateOrderResult {
  type OrderServiceCancelOrderArgs (line 3173) | type OrderServiceCancelOrderArgs struct
    method GetReq (line 3183) | func (p *OrderServiceCancelOrderArgs) GetReq() (v *CancelOrderReq) {
    method SetReq (line 3189) | func (p *OrderServiceCancelOrderArgs) SetReq(val *CancelOrderReq) {
    method IsSetReq (line 3197) | func (p *OrderServiceCancelOrderArgs) IsSetReq() bool {
    method Read (line 3201) | func (p *OrderServiceCancelOrderArgs) Read(iprot thrift.TProtocol) (er...
    method ReadField1 (line 3260) | func (p *OrderServiceCancelOrderArgs) ReadField1(iprot thrift.TProtoco...
    method Write (line 3268) | func (p *OrderServiceCancelOrderArgs) Write(oprot thrift.TProtocol) (e...
    method writeField1 (line 3297) | func (p *OrderServiceCancelOrderArgs) writeField1(oprot thrift.TProtoc...
    method String (line 3314) | func (p *OrderServiceCancelOrderArgs) String() string {
    method DeepEqual (line 3321) | func (p *OrderServiceCancelOrderArgs) DeepEqual(ano *OrderServiceCance...
    method Field1DeepEqual (line 3333) | func (p *OrderServiceCancelOrderArgs) Field1DeepEqual(src *CancelOrder...
  function NewOrderServiceCancelOrderArgs (line 3177) | func NewOrderServiceCancelOrderArgs() *OrderServiceCancelOrderArgs {
  type OrderServiceCancelOrderResult (line 3341) | type OrderServiceCancelOrderResult struct
    method GetSuccess (line 3351) | func (p *OrderServiceCancelOrderResult) GetSuccess() (v *CancelOrderRe...
    method SetSuccess (line 3357) | func (p *OrderServiceCancelOrderResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 3365) | func (p *OrderServiceCancelOrderResult) IsSetSuccess() bool {
    method Read (line 3369) | func (p *OrderServiceCancelOrderResult) Read(iprot thrift.TProtocol) (...
    method ReadField0 (line 3428) | func (p *OrderServiceCancelOrderResult) ReadField0(iprot thrift.TProto...
    method Write (line 3436) | func (p *OrderServiceCancelOrderResult) Write(oprot thrift.TProtocol) ...
    method writeField0 (line 3465) | func (p *OrderServiceCancelOrderResult) writeField0(oprot thrift.TProt...
    method String (line 3484) | func (p *OrderServiceCancelOrderResult) String() string {
    method DeepEqual (line 3491) | func (p *OrderServiceCancelOrderResult) DeepEqual(ano *OrderServiceCan...
    method Field0DeepEqual (line 3503) | func (p *OrderServiceCancelOrderResult) Field0DeepEqual(src *CancelOrd...
  function NewOrderServiceCancelOrderResult (line 3345) | func NewOrderServiceCancelOrderResult() *OrderServiceCancelOrderResult {
  type OrderServiceListOrderArgs (line 3511) | type OrderServiceListOrderArgs struct
    method GetReq (line 3521) | func (p *OrderServiceListOrderArgs) GetReq() (v *ListOrderReq) {
    method SetReq (line 3527) | func (p *OrderServiceListOrderArgs) SetReq(val *ListOrderReq) {
    method IsSetReq (line 3535) | func (p *OrderServiceListOrderArgs) IsSetReq() bool {
    method Read (line 3539) | func (p *OrderServiceListOrderArgs) Read(iprot thrift.TProtocol) (err ...
    method ReadField1 (line 3598) | func (p *OrderServiceListOrderArgs) ReadField1(iprot thrift.TProtocol)...
    method Write (line 3606) | func (p *OrderServiceListOrderArgs) Write(oprot thrift.TProtocol) (err...
    method writeField1 (line 3635) | func (p *OrderServiceListOrderArgs) writeField1(oprot thrift.TProtocol...
    method String (line 3652) | func (p *OrderServiceListOrderArgs) String() string {
    method DeepEqual (line 3659) | func (p *OrderServiceListOrderArgs) DeepEqual(ano *OrderServiceListOrd...
    method Field1DeepEqual (line 3671) | func (p *OrderServiceListOrderArgs) Field1DeepEqual(src *ListOrderReq)...
  function NewOrderServiceListOrderArgs (line 3515) | func NewOrderServiceListOrderArgs() *OrderServiceListOrderArgs {
  type OrderServiceListOrderResult (line 3679) | type OrderServiceListOrderResult struct
    method GetSuccess (line 3689) | func (p *OrderServiceListOrderResult) GetSuccess() (v *ListOrderResp) {
    method SetSuccess (line 3695) | func (p *OrderServiceListOrderResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 3703) | func (p *OrderServiceListOrderResult) IsSetSuccess() bool {
    method Read (line 3707) | func (p *OrderServiceListOrderResult) Read(iprot thrift.TProtocol) (er...
    method ReadField0 (line 3766) | func (p *OrderServiceListOrderResult) ReadField0(iprot thrift.TProtoco...
    method Write (line 3774) | func (p *OrderServiceListOrderResult) Write(oprot thrift.TProtocol) (e...
    method writeField0 (line 3803) | func (p *OrderServiceListOrderResult) writeField0(oprot thrift.TProtoc...
    method String (line 3822) | func (p *OrderServiceListOrderResult) String() string {
    method DeepEqual (line 3829) | func (p *OrderServiceListOrderResult) DeepEqual(ano *OrderServiceListO...
    method Field0DeepEqual (line 3841) | func (p *OrderServiceListOrderResult) Field0DeepEqual(src *ListOrderRe...
  function NewOrderServiceListOrderResult (line 3683) | func NewOrderServiceListOrderResult() *OrderServiceListOrderResult {
  type OrderServiceGetOrderByIdArgs (line 3849) | type OrderServiceGetOrderByIdArgs struct
    method GetReq (line 3859) | func (p *OrderServiceGetOrderByIdArgs) GetReq() (v *GetOrderByIdReq) {
    method SetReq (line 3865) | func (p *OrderServiceGetOrderByIdArgs) SetReq(val *GetOrderByIdReq) {
    method IsSetReq (line 3873) | func (p *OrderServiceGetOrderByIdArgs) IsSetReq() bool {
    method Read (line 3877) | func (p *OrderServiceGetOrderByIdArgs) Read(iprot thrift.TProtocol) (e...
    method ReadField1 (line 3936) | func (p *OrderServiceGetOrderByIdArgs) ReadField1(iprot thrift.TProtoc...
    method Write (line 3944) | func (p *OrderServiceGetOrderByIdArgs) Write(oprot thrift.TProtocol) (...
    method writeField1 (line 3973) | func (p *OrderServiceGetOrderByIdArgs) writeField1(oprot thrift.TProto...
    method String (line 3990) | func (p *OrderServiceGetOrderByIdArgs) String() string {
    method DeepEqual (line 3997) | func (p *OrderServiceGetOrderByIdArgs) DeepEqual(ano *OrderServiceGetO...
    method Field1DeepEqual (line 4009) | func (p *OrderServiceGetOrderByIdArgs) Field1DeepEqual(src *GetOrderBy...
  function NewOrderServiceGetOrderByIdArgs (line 3853) | func NewOrderServiceGetOrderByIdArgs() *OrderServiceGetOrderByIdArgs {
  type OrderServiceGetOrderByIdResult (line 4017) | type OrderServiceGetOrderByIdResult struct
    method GetSuccess (line 4027) | func (p *OrderServiceGetOrderByIdResult) GetSuccess() (v *GetOrderById...
    method SetSuccess (line 4033) | func (p *OrderServiceGetOrderByIdResult) SetSuccess(x interface{}) {
    method IsSetSuccess (line 4041) | func (p *OrderServiceGetOrderByIdResult) IsSetSuccess() bool {
    method Read (line 4045) | func (p *OrderServiceGetOrderByIdResult) Read(iprot thrift.TProtocol) ...
    method ReadField0 (line 4104) | func (p *OrderServiceGetOrderByIdResult) ReadField0(iprot thrift.TProt...
    method Write (line 4112) | func (p *OrderServiceGetOrderByIdResult) Write(oprot thrift.TProtocol)...
    method writeField0 (line 4141) | func (p *OrderServiceGetOrderByIdResult) writeField0(oprot thrift.TPro...
    method String (line 4160) | func (p *OrderServiceGetOrderByIdResult) String() string {
    method DeepEqual (line 4167) | func (p *OrderServiceGetOrderByIdResult) DeepEqual(ano *OrderServiceGe...
    method Field0DeepEqual (line 4179) | func (p *OrderServiceGetOrderByIdResult) Field0DeepEqual(src *GetOrder...
  function NewOrderServiceGetOrderByIdResult (line 4021) | func NewOrderServiceGetOrderByIdResult() *OrderServiceGetOrderByIdResult {

FILE: book-shop/kitex_gen/cwg/bookshop/order/orderservice/client.go
  type Client (line 13) | type Client interface
  function NewClient (line 21) | func NewClient(destService string, opts ...client.Option) (Client, error) {
  function MustNewClient (line 37) | func MustNewClient(destService string, opts ...client.Option) Client {
  type kOrderServiceClient (line 45) | type kOrderServiceClient struct
    method CreateOrder (line 49) | func (p *kOrderServiceClient) CreateOrder(ctx context.Context, req *or...
    method CancelOrder (line 54) | func (p *kOrderServiceClient) CancelOrder(ctx context.Context, req *or...
    method ListOrder (line 59) | func (p *kOrderServiceClient) ListOrder(ctx context.Context, req *orde...
    method GetOrderById (line 64) | func (p *kOrderServiceClient) GetOrderById(ctx context.Context, req *o...

FILE: book-shop/kitex_gen/cwg/bookshop/order/orderservice/invoker.go
  function NewInvoker (line 11) | func NewInvoker(handler order.OrderService, opts ...server.Option) serve...

FILE: book-shop/kitex_gen/cwg/bookshop/order/orderservice/orderservice.go
  function serviceInfo (line 12) | func serviceInfo() *kitex.ServiceInfo {
  function NewServiceInfo (line 18) | func NewServiceInfo() *kitex.ServiceInfo {
  function createOrderHandler (line 41) | func createOrderHandler(ctx context.Context, handler interface{}, arg, r...
  function newOrderServiceCreateOrderArgs (line 51) | func newOrderServiceCreateOrderArgs() interface{} {
  function newOrderServiceCreateOrderResult (line 55) | func newOrderServiceCreateOrderResult() interface{} {
  function cancelOrderHandler (line 59) | func cancelOrderHandler(ctx context.Context, handler interface{}, arg, r...
  function newOrderServiceCancelOrderArgs (line 69) | func newOrderServiceCancelOrderArgs() interface{} {
  function newOrderServiceCancelOrderResult (line 73) | func newOrderServiceCancelOrderResult() interface{} {
  function listOrderHandler (line 77) | func listOrderHandler(ctx context.Context, handler interface{}, arg, res...
  function newOrderServiceListOrderArgs (line 87) | func newOrderServiceListOrderArgs() interface{} {
  function newOrderServiceListOrderResult (line 91) | func newOrderServiceListOrderResult() interface{} {
  function getOrderByIdHandler (line 95) | func getOrderByIdHandler(ctx context.Context, handler interface{}, arg, ...
  function newOrderServiceGetOrderByIdArgs (line 105) | func newOrderServiceGetOrderByIdArgs() interface{} {
  function newOrderServiceGetOrderByIdResult (line 109) | func newOrderServiceGetOrderByIdResult() interface{} {
  type kClient (line 113) | type kClient struct
    method CreateOrder (line 123) | func (p *kClient) CreateOrder(ctx context.Context, req *order.CreateOr...
    method CancelOrder (line 133) | func (p *kClient) CancelOrder(ctx context.Context, req *order.CancelOr...
    method ListOrder (line 143) | func (p *kClient) ListOrder(ctx context.Context, req *order.ListOrderR...
    method GetOrderById (line 153) | func (p *kClient) GetOrderById(ctx context.Context, req *order.GetOrde...
  function newServiceClient (line 117) | func newServiceClient(c client.Client) *kClient {

FILE: book-shop/kitex_gen/cwg/bookshop/order/orderservice/server.go
  function NewServer (line 10) | func NewServer(handler order.OrderService, opts ...server.Option) server...

FILE: book-shop/kitex_gen/cwg/bookshop/user/k-user.go
  method FastRead (line 28) | func (p *User) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 113) | func (p *User) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 127) | func (p *User) FastReadField2(buf []byte) (int, error) {
  method FastWrite (line 142) | func (p *User) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 146) | func (p *User) FastWriteNocopy(buf []byte, binaryWriter bthrift.BinaryWr...
  method BLength (line 158) | func (p *User) BLength() int {
  method fastWriteField1 (line 170) | func (p *User) fastWriteField1(buf []byte, binaryWriter bthrift.BinaryWr...
  method fastWriteField2 (line 179) | func (p *User) fastWriteField2(buf []byte, binaryWriter bthrift.BinaryWr...
  method field1Length (line 188) | func (p *User) field1Length() int {
  method field2Length (line 197) | func (p *User) field2Length() int {
  method FastRead (line 206) | func (p *CreateUserReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 291) | func (p *CreateUserReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 305) | func (p *CreateUserReq) FastReadField2(buf []byte) (int, error) {
  method FastWrite (line 320) | func (p *CreateUserReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 324) | func (p *CreateUserReq) FastWriteNocopy(buf []byte, binaryWriter bthrift...
  method BLength (line 336) | func (p *CreateUserReq) BLength() int {
  method fastWriteField1 (line 348) | func (p *CreateUserReq) fastWriteField1(buf []byte, binaryWriter bthrift...
  method fastWriteField2 (line 357) | func (p *CreateUserReq) fastWriteField2(buf []byte, binaryWriter bthrift...
  method field1Length (line 366) | func (p *CreateUserReq) field1Length() int {
  method field2Length (line 375) | func (p *CreateUserReq) field2Length() int {
  method FastRead (line 384) | func (p *CreateUserResp) FastRead(buf []byte) (int, error) {
  method FastReadField255 (line 455) | func (p *CreateUserResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 469) | func (p *CreateUserResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 473) | func (p *CreateUserResp) FastWriteNocopy(buf []byte, binaryWriter bthrif...
  method BLength (line 484) | func (p *CreateUserResp) BLength() int {
  method fastWriteField255 (line 495) | func (p *CreateUserResp) fastWriteField255(buf []byte, binaryWriter bthr...
  method field255Length (line 503) | func (p *CreateUserResp) field255Length() int {
  method FastRead (line 511) | func (p *MGetUserReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 582) | func (p *MGetUserReq) FastReadField1(buf []byte) (int, error) {
  method FastWrite (line 613) | func (p *MGetUserReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 617) | func (p *MGetUserReq) FastWriteNocopy(buf []byte, binaryWriter bthrift.B...
  method BLength (line 628) | func (p *MGetUserReq) BLength() int {
  method fastWriteField1 (line 639) | func (p *MGetUserReq) fastWriteField1(buf []byte, binaryWriter bthrift.B...
  method field1Length (line 656) | func (p *MGetUserReq) field1Length() int {
  method FastRead (line 667) | func (p *MGetUserResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 752) | func (p *MGetUserResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 779) | func (p *MGetUserResp) FastReadField255(buf []byte) (int, error) {
  method FastWrite (line 793) | func (p *MGetUserResp) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 797) | func (p *MGetUserResp) FastWriteNocopy(buf []byte, binaryWriter bthrift....
  method BLength (line 809) | func (p *MGetUserResp) BLength() int {
  method fastWriteField1 (line 821) | func (p *MGetUserResp) fastWriteField1(buf []byte, binaryWriter bthrift....
  method fastWriteField255 (line 837) | func (p *MGetUserResp) fastWriteField255(buf []byte, binaryWriter bthrif...
  method field1Length (line 845) | func (p *MGetUserResp) field1Length() int {
  method field255Length (line 857) | func (p *MGetUserResp) field255Length() int {
  method FastRead (line 865) | func (p *CheckUserReq) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 950) | func (p *CheckUserReq) FastReadField1(buf []byte) (int, error) {
  method FastReadField2 (line 964) | func (p *CheckUserReq) FastReadField2(buf []byte) (int, error) {
  method FastWrite (line 979) | func (p *CheckUserReq) FastWrite(buf []byte) int {
  method FastWriteNocopy (line 983) | func (p *CheckUserReq) FastWriteNocopy(buf []byte, binaryWriter bthrift....
  method BLength (line 995) | func (p *CheckUserReq) BLength() int {
  method fastWriteField1 (line 1007) | func (p *CheckUserReq) fastWriteField1(buf []byte, binaryWriter bthrift....
  method fastWriteField2 (line 1016) | func (p *CheckUserReq) fastWriteField2(buf []byte, binaryWriter bthrift....
  method field1Length (line 1025) | func (p *CheckUserReq) field1Length() int {
  method field2Length (line 1034) | func (p *CheckUserReq) field2Length() int {
  method FastRead (line 1043) | func (p *CheckUserResp) FastRead(buf []byte) (int, error) {
  method FastReadField1 (line 1128) | func (p *CheckUserResp) FastReadField1(buf []byte) (int, error) {
  method FastReadField255 (line 1142) | func (p *CheckUserResp) FastReadField255(buf []byte) (int, error) {
  method FastWri
Copy disabled (too large) Download .json
Condensed preview — 4319 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (18,999K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 655,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 599,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 1112,
    "preview": "#### What type of PR is this?\n<!--\nAdd one of the following kinds:\n\nbuild: Changes that affect the build system or exter"
  },
  {
    "path": ".github/workflows/pr-check.yml",
    "chars": 1298,
    "preview": "name: Pull Request Check\n\non: [pull_request]\n\npermissions:\n  contents: read\n  pull-requests: read\n\nenv:\n  GO_VERSION: 1."
  },
  {
    "path": ".github/workflows/tests.yml",
    "chars": 471,
    "preview": "name: Tests\n\non: [push, pull_request]\n\njobs:\n  ut:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout"
  },
  {
    "path": ".gitignore",
    "chars": 318,
    "preview": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Ou"
  },
  {
    "path": ".golangci.yml",
    "chars": 474,
    "preview": "version: \"2\"\nrun:\n  timeout: \"30m\"\nlinters:\n  exclusions:\n    generated: lax\n    presets:\n      - comments\n      - commo"
  },
  {
    "path": ".licenserc.yaml",
    "chars": 671,
    "preview": "header:\n  license:\n    spdx-id: Apache-2.0\n    copyright-owner: CloudWeGo Authors\n\n  paths:\n    - \"**/*.go\"\n    - \"**/*."
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 5222,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 3206,
    "preview": "# How to Contribute\n\n## Your First Pull Request\nWe use github for our codebase. You can start by reading [How To Pull Re"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "Makefile",
    "chars": 166,
    "preview": "TOOLS_SHELL=\"./hack/tools.sh\"\n\n.PHONY: test\ntest:\n\t@${TOOLS_SHELL} test\n\t@echo \"go test finished\"\n\n\n\n.PHONY: vet\nvet:\n\t@"
  },
  {
    "path": "README.md",
    "chars": 10276,
    "preview": "# CloudWeGo Demo for Business\n\nThis repo contains CloudWeGo demos with business logic, providing valuable references for"
  },
  {
    "path": "_typos.toml",
    "chars": 306,
    "preview": "# Typo check: https://github.com/crate-ci/typos\n\n[files]\nextend-exclude = [\n    \"go.mod\",\n    \"go.sum\",\n    \"go.work.sum"
  },
  {
    "path": "book-shop/Makefile",
    "chars": 1051,
    "preview": "# Copyright 2022 CloudWeGo Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
  },
  {
    "path": "book-shop/README.md",
    "chars": 2350,
    "preview": "# Book Shop\n\n## Introduction\nAn e-commerce demo built with `Kitex` and `Hertz`.\n\n| Service Name       | Usage          |"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/add.go",
    "chars": 1991,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/del.go",
    "chars": 1722,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/edit.go",
    "chars": 2331,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/get.go",
    "chars": 1715,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/list.go",
    "chars": 1773,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/mget2c.go",
    "chars": 1983,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/offline.go",
    "chars": 1756,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/online.go",
    "chars": 1746,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_item/search.go",
    "chars": 1833,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_order/cancel.go",
    "chars": 1736,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_order/create.go",
    "chars": 2115,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_order/get.go",
    "chars": 1681,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_order/list.go",
    "chars": 1777,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_user/shop_login.go",
    "chars": 1106,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_user/user_login.go",
    "chars": 1106,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/handlers/handler_user/user_register.go",
    "chars": 1808,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/infras/client/init.go",
    "chars": 696,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/infras/client/item.go",
    "chars": 4430,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/infras/client/order.go",
    "chars": 2954,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/infras/client/user.go",
    "chars": 2158,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/main.go",
    "chars": 5308,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/model/model.go",
    "chars": 2763,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/facade/run.sh",
    "chars": 631,
    "preview": "#!/usr/bin/env bash\n#\n# Copyright 2022 CloudWeGo Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "book-shop/app/item/build.sh",
    "chars": 281,
    "preview": "#!/usr/bin/env bash\nRUN_NAME=\"cwg.bookshop.item\"\n\nmkdir -p output/bin\ncp script/* output/\nchmod +x output/bootstrap.sh\n\n"
  },
  {
    "path": "book-shop/app/item/common/constant/constant.go",
    "chars": 1207,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/common/converter/dto_2_entity.go",
    "chars": 2592,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/common/converter/entity_2_dto.go",
    "chars": 1220,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/common/entity/product_entity.go",
    "chars": 1063,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/common/po/product_po.go",
    "chars": 1159,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/repository/product_2c_repository.go",
    "chars": 939,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/repository/product_repository.go",
    "chars": 1083,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/repository/repository_registry.go",
    "chars": 1583,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/repository/stock_repository.go",
    "chars": 818,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/service/product_query_service.go",
    "chars": 2369,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/service/product_state_service.go",
    "chars": 4841,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/service/product_stock_service.go",
    "chars": 1265,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/domain/service/product_update_service.go",
    "chars": 1474,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/add_handler.go",
    "chars": 1606,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/decrease_stock_handler.go",
    "chars": 1455,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/decrease_stock_revert_handler.go",
    "chars": 1491,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/delete_handler.go",
    "chars": 2328,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/edit_handler.go",
    "chars": 1834,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/get_handler.go",
    "chars": 1526,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/list_handler.go",
    "chars": 1799,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/mget2c_handler.go",
    "chars": 1631,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/offline_handler.go",
    "chars": 2343,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/online_handler.go",
    "chars": 2336,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler/search_handler.go",
    "chars": 1653,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/handler.go",
    "chars": 3541,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/es/client.go",
    "chars": 3873,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/init.go",
    "chars": 722,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/repository/converter/product_do_2_po.go",
    "chars": 1387,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/repository/converter/product_po_2_do.go",
    "chars": 1310,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/repository/differ/po_diff.go",
    "chars": 1211,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/repository/init.go",
    "chars": 1412,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/repository/product_2c_repo_impl.go",
    "chars": 1448,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/repository/product_repo_impl.go",
    "chars": 3350,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/infras/repository/stock_repo_impl.go",
    "chars": 2047,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/main.go",
    "chars": 1519,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/item/script/bootstrap.sh",
    "chars": 409,
    "preview": "#! /usr/bin/env bash\nCURDIR=$(cd $(dirname $0); pwd)\n\nif [ \"X$1\" != \"X\" ]; then\n    RUNTIME_ROOT=$1\nelse\n    RUNTIME_ROO"
  },
  {
    "path": "book-shop/app/order/build.sh",
    "chars": 282,
    "preview": "#!/usr/bin/env bash\nRUN_NAME=\"cwg.bookshop.order\"\n\nmkdir -p output/bin\ncp script/* output/\nchmod +x output/bootstrap.sh\n"
  },
  {
    "path": "book-shop/app/order/common/converter.go",
    "chars": 1994,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/dal/client/init.go",
    "chars": 656,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/dal/client/item.go",
    "chars": 2908,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/dal/client/user.go",
    "chars": 1967,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/dal/db/init.go",
    "chars": 952,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/dal/db/order.go",
    "chars": 2046,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/handler.go",
    "chars": 3057,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/main.go",
    "chars": 1623,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/module/order_query_module.go",
    "chars": 1235,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/module/order_update_module.go",
    "chars": 2265,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/order/script/bootstrap.sh",
    "chars": 410,
    "preview": "#! /usr/bin/env bash\nCURDIR=$(cd $(dirname $0); pwd)\n\nif [ \"X$1\" != \"X\" ]; then\n    RUNTIME_ROOT=$1\nelse\n    RUNTIME_ROO"
  },
  {
    "path": "book-shop/app/user/build.sh",
    "chars": 281,
    "preview": "#!/usr/bin/env bash\nRUN_NAME=\"cwg.bookshop.user\"\n\nmkdir -p output/bin\ncp script/* output/\nchmod +x output/bootstrap.sh\n\n"
  },
  {
    "path": "book-shop/app/user/handler.go",
    "chars": 2604,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/user/infras/db/init.go",
    "chars": 952,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/user/infras/db/user.go",
    "chars": 1629,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/user/infras/redis/client.go",
    "chars": 2023,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/user/main.go",
    "chars": 1540,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/app/user/script/bootstrap.sh",
    "chars": 409,
    "preview": "#! /usr/bin/env bash\nCURDIR=$(cd $(dirname $0); pwd)\n\nif [ \"X$1\" != \"X\" ]; then\n    RUNTIME_ROOT=$1\nelse\n    RUNTIME_ROO"
  },
  {
    "path": "book-shop/app/user/service/user_service.go",
    "chars": 3021,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/deploy/mysql/init.sql",
    "chars": 2019,
    "preview": "create table `t_user`\n(\n    `id`         bigint unsigned auto_increment,\n    `created_at` datetime(3) NULL,\n    `updated"
  },
  {
    "path": "book-shop/deploy/redis/redis.conf",
    "chars": 2092,
    "preview": "# Copyright 2021 CloudWeGo Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
  },
  {
    "path": "book-shop/docker-compose.yml",
    "chars": 1809,
    "preview": "# Copyright 2021 CloudWeGo Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
  },
  {
    "path": "book-shop/docs/docs.go",
    "chars": 25414,
    "preview": "// Package docs GENERATED BY SWAG; DO NOT EDIT\n// This file was generated by swaggo/swag\npackage docs\n\nimport \"github.co"
  },
  {
    "path": "book-shop/docs/swagger.json",
    "chars": 24800,
    "preview": "{\n    \"schemes\": [\n        \"http\"\n    ],\n    \"swagger\": \"2.0\",\n    \"info\": {\n        \"description\": \"This is a book-shop"
  },
  {
    "path": "book-shop/docs/swagger.yaml",
    "chars": 11504,
    "preview": "basePath: /\ndefinitions:\n  model.AddProductRequest:\n    properties:\n      description:\n        type: string\n      isbn:\n"
  },
  {
    "path": "book-shop/go.mod",
    "chars": 4308,
    "preview": "module github.com/cloudwego/biz-demo/book-shop\n\ngo 1.23.0\n\ntoolchain go1.23.11\n\nreplace github.com/apache/thrift => gith"
  },
  {
    "path": "book-shop/go.sum",
    "chars": 46266,
    "preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ngithub.com/BurntSushi/toml v0.3.1/go."
  },
  {
    "path": "book-shop/idl/base.thrift",
    "chars": 733,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/idl/item.thrift",
    "chars": 3398,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/idl/order.thrift",
    "chars": 1857,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/idl/user.thrift",
    "chars": 1298,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/kitex_gen/base/base.go",
    "chars": 7941,
    "preview": "// Code generated by thriftgo (0.1.7). DO NOT EDIT.\n\npackage base\n\nimport (\n\t\"fmt\"\n\t\"github.com/apache/thrift/lib/go/thr"
  },
  {
    "path": "book-shop/kitex_gen/base/k-base.go",
    "chars": 7244,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage base\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github."
  },
  {
    "path": "book-shop/kitex_gen/base/k-consts.go",
    "chars": 128,
    "preview": "package base\n\n// KitexUnusedProtection is used to prevent 'imported and not used' error.\nvar KitexUnusedProtection = str"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/item/item.go",
    "chars": 258745,
    "preview": "// Code generated by thriftgo (0.1.7). DO NOT EDIT.\n\npackage item\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"database/sql/dr"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/item/itemservice/client.go",
    "chars": 4962,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage itemservice\n\nimport (\n\t\"context\"\n\titem \"github.com/cloudwego/bi"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/item/itemservice/invoker.go",
    "chars": 607,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage itemservice\n\nimport (\n\titem \"github.com/cloudwego/biz-demo/book"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/item/itemservice/itemservice.go",
    "chars": 11485,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage itemservice\n\nimport (\n\t\"context\"\n\titem \"github.com/cloudwego/bi"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/item/itemservice/server.go",
    "chars": 557,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\npackage itemservice\n\nimport (\n\titem \"github.com/cloudwego/biz-demo/book-"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/item/k-consts.go",
    "chars": 128,
    "preview": "package item\n\n// KitexUnusedProtection is used to prevent 'imported and not used' error.\nvar KitexUnusedProtection = str"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/item/k-item.go",
    "chars": 194217,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage item\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github."
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/order/k-consts.go",
    "chars": 129,
    "preview": "package order\n\n// KitexUnusedProtection is used to prevent 'imported and not used' error.\nvar KitexUnusedProtection = st"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/order/k-order.go",
    "chars": 79836,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage order\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/order/order.go",
    "chars": 107572,
    "preview": "// Code generated by thriftgo (0.1.7). DO NOT EDIT.\n\npackage order\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"database/sql/d"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/order/orderservice/client.go",
    "chars": 2687,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage orderservice\n\nimport (\n\t\"context\"\n\torder \"github.com/cloudwego/"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/order/orderservice/invoker.go",
    "chars": 612,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage orderservice\n\nimport (\n\torder \"github.com/cloudwego/biz-demo/bo"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/order/orderservice/orderservice.go",
    "chars": 5175,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage orderservice\n\nimport (\n\t\"context\"\n\torder \"github.com/cloudwego/"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/order/orderservice/server.go",
    "chars": 562,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\npackage orderservice\n\nimport (\n\torder \"github.com/cloudwego/biz-demo/boo"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/user/k-consts.go",
    "chars": 128,
    "preview": "package user\n\n// KitexUnusedProtection is used to prevent 'imported and not used' error.\nvar KitexUnusedProtection = str"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/user/k-user.go",
    "chars": 52973,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage user\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github."
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/user/user.go",
    "chars": 70801,
    "preview": "// Code generated by thriftgo (0.1.7). DO NOT EDIT.\n\npackage user\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/apache/thrift"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/user/userservice/client.go",
    "chars": 2244,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage userservice\n\nimport (\n\t\"context\"\n\tuser \"github.com/cloudwego/bi"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/user/userservice/invoker.go",
    "chars": 607,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage userservice\n\nimport (\n\tuser \"github.com/cloudwego/biz-demo/book"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/user/userservice/server.go",
    "chars": 557,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\npackage userservice\n\nimport (\n\tuser \"github.com/cloudwego/biz-demo/book-"
  },
  {
    "path": "book-shop/kitex_gen/cwg/bookshop/user/userservice/userservice.go",
    "chars": 3960,
    "preview": "// Code generated by Kitex v0.4.3. DO NOT EDIT.\n\npackage userservice\n\nimport (\n\t\"context\"\n\tuser \"github.com/cloudwego/bi"
  },
  {
    "path": "book-shop/licenses/LICENSE-copier.txt",
    "chars": 1072,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Jinzhu\n\nPermission is hereby granted, free of charge, to any person obtaining "
  },
  {
    "path": "book-shop/licenses/LICENSE-diff.txt",
    "chars": 16724,
    "preview": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\""
  },
  {
    "path": "book-shop/licenses/LICENSE-elastic.txt",
    "chars": 1082,
    "preview": "The MIT License (MIT)\nCopyright © 2012-2015 Oliver Eilhard\n\nPermission is hereby granted, free of charge, to any person "
  },
  {
    "path": "book-shop/licenses/LICENSE-gorm-mysql.txt",
    "chars": 1096,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2013-NOW  Jinzhu <wosmvp@gmail.com>\n\nPermission is hereby granted, free of charge, "
  },
  {
    "path": "book-shop/licenses/LICENSE-gorm.txt",
    "chars": 1096,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2013-NOW  Jinzhu <wosmvp@gmail.com>\n\nPermission is hereby granted, free of charge, "
  },
  {
    "path": "book-shop/licenses/LICENSE-redigo.txt",
    "chars": 10173,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "book-shop/licenses/LICENSE-snowflake.txt",
    "chars": 1287,
    "preview": "Copyright (c) 2016, Bruce\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodif"
  },
  {
    "path": "book-shop/licenses/LICENSE-thrift.txt",
    "chars": 15471,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "book-shop/pkg/conf/conf.go",
    "chars": 1403,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/pkg/errno/errno.go",
    "chars": 1811,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/pkg/errno/resp.go",
    "chars": 1083,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/pkg/utils/idgen.go",
    "chars": 810,
    "preview": "// Copyright 2023 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "book-shop/pkg/utils/logutil.go",
    "chars": 1387,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/Makefile",
    "chars": 7015,
    "preview": "# The old school Makefile, following are required targets. The Makefile is written\n# to allow building multiple binaries"
  },
  {
    "path": "bookinfo/README.md",
    "chars": 4162,
    "preview": "# Bookinfo\n\n> Rewrite **[Bookinfo](https://istio.io/latest/docs/examples/bookinfo/)** project using `hertz`, `kitex`\n\n##"
  },
  {
    "path": "bookinfo/README_CN.md",
    "chars": 3578,
    "preview": "# Bookinfo\n\n> Rewrite **[Bookinfo](https://istio.io/latest/docs/examples/bookinfo/)** project using `hertz`, `kitex`\n\n##"
  },
  {
    "path": "bookinfo/build/Dockerfile",
    "chars": 616,
    "preview": "FROM golang:1.18 as builder\n\nENV GO111MODULE=on \\\n    GOPROXY=https://goproxy.cn,direct\n\nCOPY . /go/src/github.com/cloud"
  },
  {
    "path": "bookinfo/cmd/details/cmd.go",
    "chars": 1089,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/cmd/main.go",
    "chars": 1593,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/cmd/productpage/cmd.go",
    "chars": 1109,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/cmd/ratings/cmd.go",
    "chars": 1089,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/cmd/reviews/cmd.go",
    "chars": 1089,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/conf/details.yaml",
    "chars": 47,
    "preview": "server:\n  addr: 0.0.0.0:8084\n  logLevel: debug\n"
  },
  {
    "path": "bookinfo/conf/productpage.yaml",
    "chars": 189,
    "preview": "server:\n  addr: 0.0.0.0:8081\n  logLevel: debug\nreviews:\n#  endpoint: reviews.default.svc.cluster.local:8082\n  endpoint: "
  },
  {
    "path": "bookinfo/conf/ratings.yaml",
    "chars": 47,
    "preview": "server:\n  addr: 0.0.0.0:8083\n  logLevel: debug\n"
  },
  {
    "path": "bookinfo/conf/reviews.yaml",
    "chars": 73,
    "preview": "server:\n  addr: 0.0.0.0:8082\n  logLevel: debug\nratings:\n  endpoint: :8083"
  },
  {
    "path": "bookinfo/go.mod",
    "chars": 4913,
    "preview": "module github.com/cloudwego/biz-demo/bookinfo\n\ngo 1.23.0\n\ntoolchain go1.23.11\n\nreplace github.com/apache/thrift => githu"
  },
  {
    "path": "bookinfo/go.sum",
    "chars": 73186,
    "preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
  },
  {
    "path": "bookinfo/idl/base.thrift",
    "chars": 736,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/idl/details.thrift",
    "chars": 988,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/idl/productpage.thrift",
    "chars": 1206,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/idl/ratings.thrift",
    "chars": 825,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/idl/reviews.thrift",
    "chars": 964,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/handler/productpage/product.go",
    "chars": 2783,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/details/options.go",
    "chars": 1185,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/details/server.go",
    "chars": 2270,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/details/wire.go",
    "chars": 1083,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/details/wire_gen.go",
    "chars": 658,
    "preview": "// Code generated by Wire. DO NOT EDIT.\n\n//go:generate go run github.com/google/wire/cmd/wire\n//go:build !wireinject\n// "
  },
  {
    "path": "bookinfo/internal/server/productpage/options.go",
    "chars": 1499,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/productpage/server.go",
    "chars": 2107,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/productpage/wire.go",
    "chars": 1247,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/productpage/wire_gen.go",
    "chars": 1053,
    "preview": "// Code generated by Wire. DO NOT EDIT.\n\n//go:generate go run github.com/google/wire/cmd/wire\n//go:build !wireinject\n// "
  },
  {
    "path": "bookinfo/internal/server/ratings/options.go",
    "chars": 1185,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/ratings/server.go",
    "chars": 2268,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/ratings/wire.go",
    "chars": 1083,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/ratings/wire_gen.go",
    "chars": 656,
    "preview": "// Code generated by Wire. DO NOT EDIT.\n\n//go:generate go run github.com/google/wire/cmd/wire\n//go:build !wireinject\n// "
  },
  {
    "path": "bookinfo/internal/server/reviews/options.go",
    "chars": 1379,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/reviews/server.go",
    "chars": 2412,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/reviews/wire.go",
    "chars": 1188,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/server/reviews/wire_gen.go",
    "chars": 911,
    "preview": "// Code generated by Wire. DO NOT EDIT.\n\n//go:generate go run github.com/google/wire/cmd/wire\n//go:build !wireinject\n// "
  },
  {
    "path": "bookinfo/internal/service/details/service.go",
    "chars": 1583,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/service/ratings/service.go",
    "chars": 1410,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/internal/service/reviews/service.go",
    "chars": 1963,
    "preview": "// Copyright 2022 CloudWeGo Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not"
  },
  {
    "path": "bookinfo/kitex_gen/base/base.go",
    "chars": 7950,
    "preview": "// Code generated by thriftgo (0.2.1). DO NOT EDIT.\n\npackage base\n\nimport (\n\t\"fmt\"\n\t\"github.com/apache/thrift/lib/go/thr"
  },
  {
    "path": "bookinfo/kitex_gen/base/k-base.go",
    "chars": 7244,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage base\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github."
  },
  {
    "path": "bookinfo/kitex_gen/base/k-consts.go",
    "chars": 128,
    "preview": "package base\n\n// KitexUnusedProtection is used to prevent 'imported and not used' error.\nvar KitexUnusedProtection = str"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/details/details.go",
    "chars": 30598,
    "preview": "// Code generated by thriftgo (0.2.1). DO NOT EDIT.\n\npackage details\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/apache/thr"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/details/detailsservice/client.go",
    "chars": 1542,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage detailsservice\n\nimport (\n\t\"context\"\n\tdetails \"github.com/cloudw"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/details/detailsservice/detailsservice.go",
    "chars": 2065,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage detailsservice\n\nimport (\n\t\"context\"\n\tdetails \"github.com/cloudw"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/details/detailsservice/invoker.go",
    "chars": 621,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage detailsservice\n\nimport (\n\tdetails \"github.com/cloudwego/biz-dem"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/details/detailsservice/server.go",
    "chars": 571,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\npackage detailsservice\n\nimport (\n\tdetails \"github.com/cloudwego/biz-demo"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/details/k-consts.go",
    "chars": 131,
    "preview": "package details\n\n// KitexUnusedProtection is used to prevent 'imported and not used' error.\nvar KitexUnusedProtection = "
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/details/k-details.go",
    "chars": 22636,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage details\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"gith"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/product/k-consts.go",
    "chars": 131,
    "preview": "package product\n\n// KitexUnusedProtection is used to prevent 'imported and not used' error.\nvar KitexUnusedProtection = "
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/product/k-productpage.go",
    "chars": 38984,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage product\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"gith"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/product/productpage.go",
    "chars": 52532,
    "preview": "// Code generated by thriftgo (0.2.1). DO NOT EDIT.\n\npackage product\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/apache/thr"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/product/productpageservice/client.go",
    "chars": 1967,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage productpageservice\n\nimport (\n\t\"context\"\n\tproduct \"github.com/cl"
  },
  {
    "path": "bookinfo/kitex_gen/cwg/bookinfo/product/productpageservice/invoker.go",
    "chars": 629,
    "preview": "// Code generated by Kitex v0.4.2. DO NOT EDIT.\n\npackage productpageservice\n\nimport (\n\tproduct \"github.com/cloudwego/biz"
  }
]

// ... and 4119 more files (download for full content)

About this extraction

This page contains the full source code of the cloudwego/biz-demo GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 4319 files (17.0 MB), approximately 4.7M tokens, and a symbol index with 22244 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!