Skip to content

Commit

Permalink
优化目录结构
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Oct 18, 2021
1 parent d03e1fc commit 1f6a9cf
Show file tree
Hide file tree
Showing 58 changed files with 57 additions and 148 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
# 象传服务配置
XIANG_MODE: debug
XIANG_SOURCE: ${{ github.WORKSPACE }}
XIANG_ROOT: ${{ github.WORKSPACE }}/app
XIANG_ROOT: ${{ github.WORKSPACE }}/tests

# 服务配置
XIANG_SERVICE_DEBUG: true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GOFILES := $(shell find . -name "*.go")
VERSION := $(shell grep 'const VERSION =' share/vars.go |awk '{print $$4}' |sed 's/\"//g')

# ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TESTFOLDER := $(shell $(GO) list ./... | grep -E 'xiang$$|entry$$|table$$|user$$|xfs$$' | grep -v examples)
TESTFOLDER := $(shell $(GO) list ./... | grep -E 'xiang$$|engine$$|table$$|user$$|xfs$$' | grep -v examples)
TESTTAGS ?= ""

# 运行单元测试
Expand Down
1 change: 1 addition & 0 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# API
2 changes: 1 addition & 1 deletion app/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# 测试用应用
# 应用信息
Binary file removed app/plugins/dist/user
Binary file not shown.
4 changes: 2 additions & 2 deletions cmd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
"github.com/yaoapp/gou"
"github.com/yaoapp/xiang/config"
"github.com/yaoapp/xiang/entry"
"github.com/yaoapp/xiang/engine"
)

var name string
Expand All @@ -18,7 +18,7 @@ var migrateCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
Boot()
// 加载数据模型
entry.Load(config.Conf)
engine.Load(config.Conf)

if name != "" {
mod, has := gou.Models[name]
Expand Down
4 changes: 2 additions & 2 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
"github.com/yaoapp/gou"
"github.com/yaoapp/xiang/config"
"github.com/yaoapp/xiang/entry"
"github.com/yaoapp/xiang/engine"
"github.com/yaoapp/xiang/service"
"github.com/yaoapp/xiang/share"
)
Expand All @@ -32,7 +32,7 @@ var startCmd = &cobra.Command{
fmt.Printf(color.GreenString("\n象传应用引擎 v%s %s", share.VERSION, mode))

// 加载数据模型 API 等
entry.Load(config.Conf)
engine.Load(config.Conf)

// 打印应用目录信息
fmt.Printf(color.WhiteString("\n---------------------------------"))
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion entry/init_test.go → engine/init_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion entry/load.go → engine/load.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion entry/load_test.go → engine/load_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"path"
Expand Down
2 changes: 1 addition & 1 deletion entry/process.go → engine/process.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"github.com/yaoapp/gou"
Expand Down
2 changes: 1 addition & 1 deletion entry/process_test.go → engine/process_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion entry/table_test.go → engine/table_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion entry/user_test.go → engine/user_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion entry/watch_test.go → engine/watch_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entry
package engine

import (
"log"
Expand Down
1 change: 1 addition & 0 deletions flow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Flow
40 changes: 19 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,37 @@ module github.com/yaoapp/xiang
go 1.16

require (
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1286 // indirect
github.com/aliyun/aliyun-oss-go-sdk v2.1.10+incompatible // indirect
github.com/caarlos0/env/v6 v6.7.1 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/elazarl/go-bindata-assetfs v1.0.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/gin-gonic/gin v1.7.4 // indirect
github.com/go-errors/errors v1.4.1 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1286
github.com/aliyun/aliyun-oss-go-sdk v2.1.10+incompatible
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/caarlos0/env/v6 v6.7.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/elazarl/go-bindata-assetfs v1.0.1
github.com/fatih/color v1.13.0
github.com/fsnotify/fsnotify v1.5.1
github.com/gin-gonic/gin v1.7.4
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/hashicorp/go-hclog v1.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect
github.com/jmoiron/sqlx v1.3.4 // indirect
github.com/joho/godotenv v1.3.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/joho/godotenv v1.3.0
github.com/json-iterator/go v1.1.12
github.com/lib/pq v1.10.3 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-sqlite3 v1.14.8 // indirect
github.com/mojocn/base64Captcha v1.3.5 // indirect
github.com/mojocn/base64Captcha v1.3.5
github.com/robertkrimen/otto v0.0.0-20211004134430-12a632260352 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cobra v1.2.1 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/spf13/afero v1.6.0
github.com/spf13/cobra v1.2.1
github.com/stretchr/testify v1.7.0
github.com/yaoapp/gou v0.0.0-20211007044811-e0834e575aa0 // indirect
github.com/yaoapp/gou v0.0.0-20211007044811-e0834e575aa0
github.com/yaoapp/kun v0.6.7
github.com/yaoapp/xun v0.6.0 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
github.com/yaoapp/xun v0.6.0
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect
golang.org/x/net v0.0.0-20211006190231-62292e806868 // indirect
golang.org/x/sys v0.0.0-20211006225509-1a26e0398eed // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/genproto v0.0.0-20211005153810-c76a74d43a8e // indirect
google.golang.org/grpc v1.41.0 // indirect
Expand Down
Loading

0 comments on commit 1f6a9cf

Please sign in to comment.