Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

引入go-mir重构paopao-ce的接入层与业务逻辑层 #196

Merged
merged 98 commits into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
5433eb9
prepare use mir
alimy Nov 11, 2022
367e0b0
optimize source code layout
alimy Nov 11, 2022
a637444
optimize source code layout
alimy Nov 11, 2022
8e88500
add app service start/stop common logic
alimy Nov 11, 2022
3c14ced
optimize base code for binding/render
alimy Nov 11, 2022
0eda777
mv app's logic to service
alimy Nov 12, 2022
7b325e3
optimzie error process logic adapter mir
alimy Nov 15, 2022
c05c142
Merge branch 'dev' into feature/mir-prepare
alimy Nov 17, 2022
fd665ab
merge from dev branch
alimy Nov 17, 2022
e817720
optimize service define in pkg/service package
alimy Nov 17, 2022
c3c497e
Merge branch 'dev' into feature/mir-prepare
alimy Nov 17, 2022
a0983be
Merge branch 'jc/alimy' into feature/mir-prepare
alimy Nov 18, 2022
59ef538
mir: add initial proposal document
alimy Nov 21, 2022
2b7c4c7
Merge branch 'feature/mir' into feature/mir-prepare
alimy Nov 21, 2022
c73375b
merge from jc/alimy
alimy Nov 23, 2022
103a0f8
Merge branch 'feature/mir' into feature/mir-prepare
alimy Nov 23, 2022
1055faa
Merge branch 'jc/alimy' into feature/mir
alimy Nov 23, 2022
3bd109d
Merge branch 'feature/mir' into feature/mir-prepare
alimy Nov 23, 2022
a1a1697
Merge branch 'jc/alimy' into feature/mir
alimy Nov 23, 2022
25158d7
Merge branch 'feature/mir' into feature/mir-prepare
alimy Nov 23, 2022
df1744f
optimize servants code layout
alimy Nov 25, 2022
7636412
mir: optimize source code layout for import go-mir
alimy Dec 2, 2022
1125487
mir: move mirgration module to internal pkg
alimy Dec 2, 2022
c7482e2
Merge branch 'dev' into feature/mir
alimy Dec 3, 2022
951fb52
Merge branch 'feature/mir' into feature/mir-prepare
alimy Dec 3, 2022
c2b2b2f
Merge branch 'dev' into feature/mir
alimy Dec 3, 2022
01a9545
Merge branch 'feature/mir' into feature/mir-prepare
alimy Dec 3, 2022
d2f7d7f
Merge branch 'dev' into feature/mir
alimy Dec 3, 2022
2c66f3c
Merge branch 'feature/mir' into feature/mir-prepare
alimy Dec 3, 2022
77fa71e
Merge branch 'dev' into feature/mir
alimy Dec 3, 2022
fb07aec
Merge branch 'feature/mir' into feature/mir-prepare
alimy Dec 3, 2022
66e8f1c
Merge branch 'dev' into feature/mir
alimy Dec 3, 2022
3bf5dd5
Merge branch 'feature/mir' into feature/mir-prepare
alimy Dec 3, 2022
9289212
Merge branch 'dev' into feature/mir
alimy Dec 4, 2022
6570286
add internal/service base logic
alimy Dec 9, 2022
3c47f48
optimize main initial logic for new service init
alimy Dec 9, 2022
8921655
Merge branch 'feature/mir-prepare' into feature/mir
alimy Dec 9, 2022
3ad6f66
upgrade go-mir version to v3.0.0-alpha.4
alimy Dec 9, 2022
6a53632
optimize main function logic and custom service create logic
alimy Dec 10, 2022
9be9ecc
mir: update proposal document
alimy Dec 10, 2022
6650d08
add m/s/x RESTful API stub interface for mir
alimy Dec 10, 2022
4dae86c
mir: add Admin/SpaceX/Bot/LocalOSS stub service interface and simple …
alimy Dec 10, 2022
0adfeee
mir: update mirc/README.md
alimy Dec 10, 2022
9e1d09a
use github.com/alimy/cfg as features configure help library
alimy Dec 11, 2022
edc62e2
merge from dev
alimy Dec 11, 2022
43c45b4
Merge branch 'dev' into feature/mir
alimy Dec 12, 2022
4d379e2
upgrade github.com/alimy/mir/v3 => v3.0.0-alpha.5
alimy Dec 13, 2022
2397eff
upgrade github.com/alimy/mir/v3 => v3.0.0-alpha.6
alimy Dec 13, 2022
9e33e96
upgrade github.com/alimy/mir/v3 => v3.0.0-alpha.7
alimy Dec 15, 2022
3fabcb5
upgrade github.com/alimy/cfg => v0.3.0
alimy Dec 16, 2022
dfe59ab
merge from dev
alimy Dec 16, 2022
c40c1c7
Merge branch 'dev' into feature/mir
alimy Dec 16, 2022
b5312cc
update ROADMAP.md
alimy Dec 16, 2022
0e7f47f
optimze service interface add Version() to return version info
alimy Dec 16, 2022
bd53512
Merge branch 'dev' into feature/mir
alimy Dec 16, 2022
bab9fd4
optimize service create if needed by config.yaml feature declare
alimy Dec 16, 2022
da63359
update spacex servie name info
alimy Dec 17, 2022
f287c82
add grpc service template code and optimize service initial logic
alimy Dec 20, 2022
db137b3
change source code from mirc/routes/* => mirc/*
alimy Dec 20, 2022
fdcacec
optimzie proto file define
alimy Dec 20, 2022
b164ade
optimize service initial logic
alimy Dec 20, 2022
3e0c38d
upgrade github.com/alimy/mir/v3 => v3.0.0-beta.1
alimy Dec 22, 2022
8139e4d
upgrade github.com/alimy/mir/v3 => v3.0.0-alpha.8
alimy Dec 22, 2022
989d790
add simple go-mir define file for web api
alimy Dec 23, 2022
3a1626e
mir: remove reduce comment in mirc/web/v1 and go mod tidy
alimy Dec 23, 2022
63bc1c5
add internal/servants/web servants init logic
alimy Dec 23, 2022
f3bb188
mir: change error variable names
alimy Dec 23, 2022
fc4e796
mir: optimize api defined service names
alimy Dec 23, 2022
9feb1a5
mir:update proposal documents
alimy Dec 23, 2022
da939f7
mir: add partital interface implement for new web service
alimy Dec 27, 2022
dee07b6
mir: add alipay api implement for new web service
alimy Dec 27, 2022
2d2c245
mir: partial api implement for new web service
alimy Dec 28, 2022
64527ec
mir:add core api implement for new web service
alimy Dec 29, 2022
820d541
mir:add priv api implement for new web service
alimy Dec 29, 2022
bc45967
mir: add priv api implement full implement for new web service
alimy Dec 30, 2022
058a307
mir: add pub api implement for new web service
alimy Dec 30, 2022
6b2f320
mir: add loose api implement for new web service
alimy Dec 31, 2022
53383b9
mir: add friendship api implement for new web service
alimy Dec 31, 2022
10e5bc4
mir:fixed new service initial error
alimy Dec 31, 2022
275e132
mir: fixed http service initial error by wrong ReadTimeout/WriteTimeo…
alimy Dec 31, 2022
6576d74
add frontend:web / frontend:embedweb / docs service
alimy Dec 31, 2022
b99c239
mir:ajust frontend adapter new web service api
alimy Dec 31, 2022
a109dd8
Merge branch 'dev' into feature/mir
alimy Dec 31, 2022
bde80d9
mir:fixed get comments return wrong data error
alimy Dec 31, 2022
ce77357
mir:fixed get suggest user/tags result error
alimy Dec 31, 2022
c7a66f9
update docs
alimy Jan 1, 2023
5aa3074
mir: update docs/proposal documents
alimy Jan 1, 2023
35f266e
mir: fixed alipay client initialize error in old web service
alimy Jan 1, 2023
89a2496
mir:fixed LockTweet/StickTweet return value error
alimy Jan 1, 2023
f3ed27d
mir:fixed VisibleTweet error in new web service
alimy Jan 1, 2023
ce2c4e6
mir: upgrade github.com/alimy/mir/v3 => v3.0.0-rc.1
alimy Jan 2, 2023
2eb92b1
mir: update documents
alimy Jan 3, 2023
f2265bc
Merge branch 'dev' into feature/mir
alimy Jan 3, 2023
ba27352
mir: optimize app start service logic to fixed mutilple service serve…
alimy Jan 4, 2023
e2e8393
mir: ajust info print when stop app
alimy Jan 4, 2023
a05fea2
mir: update docs/proposal documents
alimy Jan 4, 2023
c19d710
Merge branch 'dev' into feature/mir
alimy Jan 5, 2023
4efb9d0
mir: upgrade github.com/alimy/mir/v3 => v3.0.0
alimy Jan 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 31 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,28 @@ windows-x64:
@echo Build paopao-ce [windows-x64] CGO_ENABLED=$(CGO_ENABLED)
@CGO_ENABLED=$(CGO_ENABLED) GOOS=windows GOARCH=amd64 go build -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_WINDOWS_AMD64)/$(basename $(TARGET)).exe

.PHONY: generate
generate: gen-mir gen-grpc

.PHONY: gen-mir
gen-mir:
@go generate mirc/main.go
@go fmt ./auto/api/...

.PHONY: gen-grpc
gen-grpc:
@rm -rf auto/rpc
@buf generate proto
@go fmt ./auto/rpc/...

.PHONY: proto-mod
proto-mod:
@cd proto/ && buf mod update

.PHONY: proto-lint
proto-lint:
@cd proto/ && buf lint

clean:
@go clean
@find ./release -type f -exec rm -r {} +
Expand All @@ -83,7 +105,15 @@ test:
@go test ./...

pre-commit: fmt
go mod tidy
@go mod tidy

.PHONY: install-protobuf-plugins
install-protobuf-plugins:
@go install github.com/bufbuild/buf/cmd/[email protected]
@go install github.com/bufbuild/buf/cmd/[email protected]
@go install github.com/bufbuild/buf/cmd/[email protected]
@go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

help:
@echo "make: make"
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,20 @@ Web端:

## 🛠 技术栈

PaoPao主要由以下优秀的开源项目/工具构建

* [Go](https://go.dev/)
* [Gin](https://gin-gonic.com/)
* [Zinc](https://zinclabs.io/)
PaoPao主要由以下优秀的开源项目/工具构建
#### 后端:
* [Go](https://go.dev/ 'go')
* [Gin](https://gin-gonic.com/ 'gin')
* [Mir](https://github.com/alimy/mir 'go-mir')
* [Buf](https://github.com/bufbuild/buf 'buf')
* [gRPC](https://github.com/grpc/grpc-go 'grpc-go')
* [Zinc](https://zinclabs.io/ 'zinc')

#### 前端:
* [Naive UI](https://www.naiveui.com/)
* [Vue.js](https://vuejs.org/)
* [Vite.js](https://vitejs.dev/)
* [tauri](https://github.com/tauri-apps/tauri 'tauri')

<!-- GETTING STARTED -->
## 🏗 快速开始
Expand Down Expand Up @@ -316,13 +322,15 @@ release/paopao-ce --no-default-features --features sqlite3,localoss,loggerfile,r
目前支持的功能集合:
| 功能项 | 类别 | 状态 | 备注 |
| ----- | ----- | ----- | ----- |
|`OldWeb` | 子服务 | 稳定(默认) | 开启旧的Web服务 |
|`Web` | 子服务 | WIP | 开启Web服务|
|`Web` | 子服务 | 内测 | 开启Web服务|
|`Admin` | 子服务 | WIP | 开启Admin后台运维服务|
|`SpaceX` | 子服务 | WIP | 开启SpaceX服务|
|`Bot` | 子服务 | WIP | 开启Bot服务|
|`NativeOBS` | 子服务 | WIP | 开启NativeOBS服务|
|`Deprecated:Web` | 子服务 | 稳定 | Deprecated(关闭) OldWeb服务|
|`Docs` | 子服务 | WIP | 开启开发者文档服务|
|`Frontend:Web` | 子服务 | 内测 | 开启独立前端服务|
|`Frontend:EmbedWeb` | 子服务 | 内测 | 开启内嵌于后端Web API服务中的前端服务|
|`Deprecated:Web` | 子服务 | 稳定 | 开启旧的Web服务|
|`Gorm` | 数据库 | 稳定(默认) | 使用[gorm](https://github.com/go-gorm/gorm)作为数据库的ORM,默认使用 `Gorm` + `MySQL`组合|
|`Sqlx`| 数据库 | WIP | 使用[sqlx](https://github.com/jmoiron/sqlx)作为数据库的ORM|
|`MySQL`| 数据库 | 稳定(默认) | 使用MySQL作为数据库|
Expand Down
13 changes: 6 additions & 7 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ paopao-ce roadmap.
### v0.2.0
* [x] add `Friendship` feature
* [ ] add `Lightship` feature
* [ ] add `sqlx` feature
* [ ] add new `web` service
* [ ] add `deprecated:web` feature
* [ ] support run multiple service in single paopao-ce instance
* [ ] use [go-mir](https://github.com/alimy/mir) optimize paopao-ce source code architecture

* [ ] add `Sqlx` feature
* [x] add new `Web` service
* [x] add `Frontend:Web` feature
* [x] add `Deprecated:OldWeb` feature
* [x] support run multiple service in single paopao-ce instance
* [x] use [go-mir](https://github.com/alimy/mir) optimize paopao-ce source code architecture

### Next
* [ ] add `Followship` feature
Expand All @@ -29,4 +29,3 @@ paopao-ce roadmap.
* [ ] optimize topics service
* [ ] optimize backend data logic service(optimize database CRUD operate)
* [ ] optimize search logic service

140 changes: 140 additions & 0 deletions auto/api/m/v1/user.go

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

140 changes: 140 additions & 0 deletions auto/api/r/v1/user.go

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

Loading