book-shop

module
v0.0.0-...-7bf3344 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2024 License: Apache-2.0

README

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

Architecture

Technology Architecture

Service Calling Relations

Quick Start

Setup Environment
$ make start
Run Services
$ make user
$ make item
$ make order
$ make facade
Stop Environment
$ make stop
Get Documents & Run Test

browse to http://localhost:8080/swagger/index.html

Examples

pprof
$ go tool pprof -http=:1234 http://localhost:8080/debug/pprof/heap

User Service
User Register

User Login

Shop Login

JWT Auth

Item Service
Add Item

Edit Item

Delete Item

Offline Item

Online Item

Get Item

List Items

Batch Get Items (2C Interface)

Search Items (2C Interface)

Order Service
Create Order

Cancel Order

List Orders

Get Order

Directories

Path Synopsis
app
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
kitex_gen
cwg/bookshop/item/itemservice
Code generated by Kitex v0.4.3.
Code generated by Kitex v0.4.3.
cwg/bookshop/order/orderservice
Code generated by Kitex v0.4.3.
Code generated by Kitex v0.4.3.
cwg/bookshop/user/userservice
Code generated by Kitex v0.4.3.
Code generated by Kitex v0.4.3.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL