+ 文件上传接口

This commit is contained in:
Max 2021-10-12 09:02:49 +08:00
parent 1a91125f2a
commit 3d2d97f20d
14 changed files with 322 additions and 96 deletions

3
.gitignore vendored
View file

@ -18,4 +18,5 @@
.tmp
dist
ui
^ui/index.html
^ui/index.html
app/data/*/*

View file

@ -2,5 +2,18 @@
"name": "象传应用",
"short": "象传",
"description": "象传应用后台",
"storage": {
"default": "oss",
"oss": {
"comment": "https://www.alibabacloud.com/help/zh/doc-detail/100624.htm",
"endpoint": "oss-cn-hangzhou.aliyuncs.com",
"id": "LTAI5tLC5cnKqF2eB4L7De3S",
"secret": "OkD17XjvjNQoiLgRyyjIsTnviULr0w",
"roleArn": "RamOssTest",
"sessionName": "SessionTest"
},
"cos": {},
"s3": {}
},
"option": {}
}

1
app/data/README.md Normal file
View file

@ -0,0 +1 @@
文件上传

View file

@ -33,11 +33,23 @@ var startCmd = &cobra.Command{
global.Load(config.Conf)
// 打印应用目录信息
fmt.Printf(color.GreenString("\n应用根目录: %s\n", config.Conf.Root))
fmt.Printf(color.WhiteString("\n---------------------------------"))
fmt.Printf(color.GreenString("\n应用名称: %s v%s", global.App.Name, global.App.Version))
fmt.Printf(color.GreenString("\n应用根目录: %s", config.Conf.Root))
fmt.Printf(color.GreenString("\n数据存储目录: %s", config.Conf.RootData))
fmt.Printf(color.GreenString("\n数据存储引擎: %s", global.App.Storage.Default))
fmt.Printf(color.WhiteString("\n---------------------------------\n\n"))
fmt.Printf(color.GreenString("\n已注册API"))
fmt.Printf(color.WhiteString("\n---------------------------------"))
for _, api := range gou.APIs { // API信息
if len(api.HTTP.Paths) <= 0 {
continue
}
fmt.Printf(color.CyanString("\n%s(%d)\n", api.Name, len(api.HTTP.Paths)))
for _, p := range api.HTTP.Paths {
fmt.Println(
colorMehtod(p.Method),
color.WhiteString(filepath.Join("/api", api.HTTP.Group, p.Path)),
@ -56,6 +68,8 @@ var startCmd = &cobra.Command{
port = ""
}
fmt.Printf(color.GreenString("\n\n访问入口"))
fmt.Printf(color.WhiteString("\n---------------------------------"))
fmt.Printf(color.GreenString("\n前台界面: http://%s%s/\n", domain, port))
fmt.Printf(color.GreenString("管理后台: http://%s%s/xiang/login\n", domain, port))
fmt.Printf(color.GreenString("API 接口: http://%s%s/api\n", domain, port))

View file

@ -21,7 +21,6 @@ type Config struct {
XiangConfig
Service ServiceConfig `json:"service,omitempty"`
Database DatabaseConfig `json:"database,omitempty"`
Storage StorageConfig `json:"storage,omitempty"`
JWT JWTConfig `json:"jwt,omitempty"`
Log LogConfig `json:"log,omitempty"`
}
@ -65,12 +64,6 @@ type DatabaseConfig struct {
AESKey string `json:"aeskey,omitempty" env:"XIANG_DB_AESKEY"` // 加密存储KEY
}
// StorageConfig 存储配置
type StorageConfig struct {
Debug bool `json:"debug,omitempty" env:"XIANG_STOR_DEBUG" envDefault:"false"` // DEBUG 开关
Path string `json:"path,omitempty" env:"XIANG_STOR_PATH" envDefault:"fs:///data/xiang"` // 数据存储目录
}
// JWTConfig JWT配置
type JWTConfig struct {
Debug bool `json:"debug,omitempty" env:"XIANG_JWT_DEBUG" envDefault:"false"` // DEBUG 开关
@ -185,8 +178,11 @@ func (cfg *Config) SetDefaults() {
// 过滤数据
cfg.RootDB = strings.TrimPrefix(cfg.RootDB, "fs://")
cfg.RootDB = strings.TrimPrefix(cfg.RootDB, "file://")
cfg.RootData = strings.TrimPrefix(cfg.RootData, "fs://")
cfg.RootData = strings.TrimPrefix(cfg.RootData, "file://")
cfg.RootUI = strings.TrimPrefix(cfg.RootUI, "fs://")
cfg.RootUI = strings.TrimPrefix(cfg.RootUI, "file://")
}
// SetEnvFile 指定ENV文件

View file

@ -40,9 +40,6 @@ func TestNewConfig(t *testing.T) {
assert.Equal(t, cfg.JWT.Debug, vBool(os.Getenv("XIANG_JWT_DEBUG")))
assert.Equal(t, cfg.JWT.Secret, os.Getenv("XIANG_JWT_SECRET"))
assert.Equal(t, cfg.Storage.Debug, vBool(os.Getenv("XIANG_STOR_DEBUG")))
assert.Equal(t, cfg.Storage.Path, os.Getenv("XIANG_STOR_PATH"))
assert.Equal(t, cfg.Log.Access, os.Getenv("XIANG_LOG_ACCESS"))
assert.Equal(t, cfg.Log.Error, os.Getenv("XIANG_LOG_ERROR"))
assert.Equal(t, cfg.Log.DB, os.Getenv("XIANG_LOG_DB"))

View file

@ -1,6 +1,7 @@
// Code generated for package data by go-bindata DO NOT EDIT. (@generated)
// sources:
// .tmp/data/ui/index.html
// .tmp/data/xiang/.DS_Store
// .tmp/data/xiang/apis/README.md
// .tmp/data/xiang/apis/table.http.json
// .tmp/data/xiang/apis/user.http.json
@ -17,6 +18,7 @@
// .tmp/data/xiang/models/menu.json
// .tmp/data/xiang/models/user.json
// .tmp/data/xiang/tables/README.md
// .tmp/data/xiang/tables/menu.json
// .tmp/data/xiang/tables/user.json
package data
@ -196,7 +198,27 @@ func uiIndexHtml() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "ui/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "ui/index.html", size: 14, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _xiangDs_store = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x97\x4f\x4b\xe3\x40\x14\xc0\xdf\xa4\xd9\xee\x64\xcb\xb2\x39\x2c\x6c\x8f\xb9\xec\xad\x87\xb6\xdb\x5d\xe8\x61\x21\x64\xbb\x07\x6f\x42\x44\x0f\x55\xda\x0c\x09\x36\x90\x66\x4a\x92\x1a\x34\x46\xfa\x35\xf4\x1b\xf9\x09\xfc\x3a\x92\xe6\xa9\x25\xb6\xde\xc4\x5a\xdf\x0f\xca\x6f\xca\xfc\x49\xde\x84\xf9\xf3\x00\x80\x59\x73\xb7\x03\xa0\x03\x00\x87\xd2\xea\x17\x58\x0b\xc7\xdf\x33\x14\xb4\x5a\x8c\xb7\x1c\x23\x80\x58\xa4\xf1\x4c\x04\x52\xac\x1f\x8b\x20\x88\x2d\xa2\x58\xbb\x75\x98\x82\x04\x17\xbc\xca\xfa\xbd\x15\xb3\xc0\x8f\x93\x76\xfb\x8e\x29\x35\xf5\x53\xfd\x33\xe7\xbc\xc1\xbf\xf2\x13\x7b\x22\x53\x3b\x71\x92\x79\x6c\x39\xd1\xb0\xf8\xb7\xef\x24\x13\x81\xe5\x03\x29\x83\xc7\xb2\x23\x0e\x7d\x2f\x1d\xe9\xdf\xff\xc9\x30\x71\xfc\xd0\x8b\x96\x9d\x7d\xd7\x13\x4e\x74\x7c\xe4\x87\xae\x4c\x2d\x39\x0f\xdd\x78\xb8\x52\xa1\x69\x1a\xd7\x46\x7a\x33\xcb\x7a\xbf\xfe\xb4\x8c\xde\xef\x6e\xde\x32\xb2\x7e\xb7\xdd\x32\x7a\xfd\x6e\x9e\x6b\xfc\xc7\xcf\xce\xdf\xbd\xf1\xf4\xfc\x22\xbb\xcc\xaf\xae\xcb\x58\x18\xc3\xa0\xbe\x55\x82\xbc\xa9\x06\x79\x66\x47\x61\x20\xc3\xd3\x72\xe3\x82\x3a\x24\xe0\x80\x80\x00\xbc\x5d\x9e\x80\x95\x20\x2b\x13\x40\x7c\x44\xf0\xcb\xf3\xc6\x5b\xbf\x08\x41\x10\x5b\x47\xb1\x3f\x18\x68\x13\xbd\x28\xcd\xb0\x5e\x41\xab\x2b\x7d\x74\xb4\x81\x36\xd1\x8b\xd2\x0c\xdb\x29\x68\x15\xcd\xd1\x3a\xda\x40\x9b\xe8\x45\x69\xdc\xb4\x18\x26\x1f\x0c\x9f\xcc\x30\x43\x61\x3a\xda\x40\x9b\xaf\x33\x37\x04\xf1\xde\xa9\x95\xd2\x8b\xf3\xff\xff\xe6\xfc\x9f\x20\x88\x1d\x86\xa9\x03\x7b\x60\xbd\x90\x0a\x2a\x78\x11\x18\x3f\x74\xd8\x70\x11\xc0\xb6\xc5\x51\xdc\x84\xa7\xb6\x74\x11\x20\x88\x2d\xe3\x3e\x00\x00\xff\xff\xc8\x24\xe8\x37\x04\x18\x00\x00")
func xiangDs_storeBytes() ([]byte, error) {
return bindataRead(
_xiangDs_store,
"xiang/.DS_Store",
)
}
func xiangDs_store() (*asset, error) {
bytes, err := xiangDs_storeBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "xiang/.DS_Store", size: 6148, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -216,12 +238,12 @@ func xiangApisReadmeMd() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/apis/README.md", size: 13, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/apis/README.md", size: 13, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _xiangApisTableHttpJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x96\xcd\x8a\x13\x41\x10\xc7\xef\xf3\x14\x4d\xb3\xc7\xec\x4c\xf4\x38\x37\xc1\x0f\x72\x72\x61\x15\x0f\xcb\x1e\xca\xe9\x32\x29\x99\xe9\x6e\xbb\xba\xa3\x71\xc9\x23\xa8\x27\xef\x8a\x08\x9e\xc4\x07\xf0\x75\x0c\x3e\x86\x74\xcf\xec\xae\x1b\xd9\x4d\xcc\xb0\x4c\x2e\x09\x5d\x5f\xd4\xef\xff\x87\x62\xce\x32\x21\xa4\x86\x06\x65\x29\xe4\xea\xe3\x8f\xd5\xbb\xef\xbf\x3f\x7f\x5b\x7d\xfa\xb9\x7a\xff\xf5\xd7\x87\x2f\x72\x14\xf3\x73\x74\x4c\x46\xc7\x92\x3b\xf9\x38\x1f\xb7\x51\x85\x5c\x39\xb2\xbe\xcb\xfc\xdb\x7c\xef\x68\xd2\x56\x4e\x9d\x09\x36\xd6\xbc\x21\xd0\xd3\xc2\xc3\xf3\x1a\xbb\x4c\x00\xa7\x62\x86\xf4\xa1\x75\xa6\x42\xe6\x36\x61\xc1\xcf\x58\x96\xe2\x24\x13\x42\x88\xb3\xf4\xdb\x85\x63\x79\x51\xc6\x9d\x0b\x46\x70\xd5\x2c\x75\xa4\x74\x83\x7e\x66\xd2\xbc\x47\x0f\x9e\x5c\x86\xcf\x27\x9f\x6f\x90\xa7\x0d\xf2\xe3\xb5\x6e\x8a\x1c\x27\xf2\xc0\x82\x83\x26\x4f\xa2\x8c\x84\x2c\x5f\x05\x74\x8b\xc3\x14\x8c\xef\x83\xf4\xce\x2d\x4c\x71\xed\xc9\xf4\x16\xe5\xe9\xc5\x38\x13\xbc\x2c\x2f\x56\x17\x42\xb2\x07\x1f\xe2\x16\x77\xc7\xe3\xd1\x65\xd8\x2f\x6c\x52\x1f\xac\xad\xa9\x82\xa8\x67\xf1\x92\x8d\x96\x5d\xc9\x32\xfd\x2f\x47\x37\x2a\xf1\x82\xb4\x2a\x4a\x52\xbb\x6a\xf1\x90\xb4\xda\xa4\x44\xf7\x24\x35\x14\x24\xc3\x1c\xaf\x83\x3c\x7a\x7c\xbc\x85\xe3\x30\xc7\x8d\x7e\x5b\x58\xd4\x06\x06\x83\x54\x58\xa3\xef\x87\x79\x3f\x8d\xd8\x7b\x3b\x49\x33\x3a\xbf\x33\xe5\x64\xad\xfd\x5a\xca\x64\x67\x5e\x99\x3a\x34\x9a\xaf\xc4\xe6\x50\x07\xe4\x81\x9d\x7e\x3d\x43\x87\x3d\xbd\x7e\x76\x75\xc6\x16\x97\x6c\x58\x66\xd2\x3d\x81\x27\x7a\xa3\xf1\xed\x61\x26\xc5\x7f\x9f\x69\x47\x0d\xb8\xc5\x50\xf4\xc1\x2a\xe8\xed\xf8\xd3\x34\xe4\xff\x1d\xdf\x83\xdb\xd6\xf1\xf7\x70\xbf\x85\xef\xe9\xfe\x1e\x28\xc1\xe8\x3d\xe9\xe9\xee\x9f\x2e\x6b\xed\x37\xaa\xc0\x58\x63\xe5\x6f\x0f\x35\x13\xe2\x34\x5b\x66\x7f\x02\x00\x00\xff\xff\x5d\xd7\x6a\x3b\x4c\x0a\x00\x00")
var _xiangApisTableHttpJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x56\xbd\x8e\xd3\x40\x10\xee\xfd\x14\xab\xd5\x95\x39\x3b\x50\xba\x43\xe2\x47\xa9\x38\xe9\x40\x14\xa7\x2b\x06\xef\x90\x0c\xb2\x77\x97\x9d\xdd\x40\x38\xe5\x11\x80\x8a\x1e\x84\x90\xa8\x10\x0f\xc0\xeb\x10\xf1\x18\x68\xd7\xbe\x3b\x12\xc8\x25\x24\x42\x4e\x63\x6b\xfe\x3e\xcd\xf7\x7d\xd6\xc8\x17\x99\x10\x52\x43\x83\xb2\x14\x72\xf1\xfe\xdb\xe2\xcd\xd7\x9f\x1f\xbf\x2c\x3e\x7c\x5f\xbc\xfd\xfc\xe3\xdd\x27\x39\x88\xf5\x29\x3a\x26\xa3\x63\xcb\xad\x7c\x98\x0f\xdb\xac\x42\xae\x1c\x59\xdf\x55\xfe\x1c\xbe\x73\x32\x6a\x3b\xc7\xce\x04\x1b\x7b\x5e\x11\xe8\x71\xe1\xe1\x69\x8d\x5d\x25\x80\x53\xb1\x42\xfa\xd8\x3a\x53\x21\x73\x5b\xb0\xe0\x27\x2c\x4b\x71\x96\x09\x21\xc4\x45\x7a\x76\xe9\xd8\x5e\x94\x71\xe7\x82\x11\x5c\x35\x49\x13\xa9\xdc\xa0\x9f\x98\x84\xf7\xe0\xde\xa3\xeb\xf4\x25\xf2\xe5\x06\x79\xda\x20\x3f\x5d\x99\xa6\xc8\xe3\x4c\x1e\x59\x70\xd0\xe4\x49\x94\x81\x90\xe5\x8b\x80\x6e\x76\x9c\x92\x31\x3e\x4a\x71\x6e\x61\x8c\x2b\x21\xd3\x6b\x94\xe7\x57\x70\x26\x78\x59\x5e\xad\x2e\x84\x64\x0f\x3e\xc4\x2d\x6e\x0f\x87\x83\xeb\xb4\x9f\xd9\xa4\x3e\x58\x5b\x53\x05\x51\xcf\xe2\x39\x1b\x2d\xbb\x96\x79\x7a\xcf\x07\x37\x2a\xf1\x8c\xb4\x2a\x4a\x52\xbb\x6a\x71\x9f\xb4\xda\xa4\x44\x17\x92\xea\x8b\x24\xc3\x14\xff\x46\xf0\xe4\xe1\xe9\x16\x6e\x2f\x0d\xaf\xf1\xda\xc2\xac\x36\xd0\x1b\x41\x85\x35\x7a\x5c\xe7\xe3\x56\x34\xef\x26\x88\x83\xb7\x92\x34\xa3\xf3\x3b\xb3\x1c\xad\x8c\xaf\x65\x99\xec\xcc\x2b\x53\x87\x46\xf3\x52\x6e\x0a\x75\x40\xee\xd9\xe9\x97\x13\x74\xbb\x7f\xd2\xad\xd7\x4f\x96\x31\xb6\xb8\x62\xfd\x72\x26\xbd\x27\xe1\x91\xde\x68\x7c\x7b\x94\x49\xf1\xef\x27\xda\x51\x03\x6e\xd6\x17\xfb\x60\x15\xec\xed\xf8\xe3\x04\xf2\xef\x8e\x1f\xc0\x6d\xeb\xf8\xef\xe1\x7e\x4b\x7e\x4f\xf7\x0f\x40\x09\x46\xef\x49\x8f\x77\xff\x6d\x59\x19\xbf\x51\x05\xc6\x1a\x2b\xff\xff\xa8\x66\x42\x9c\x67\xf3\xec\x57\x00\x00\x00\xff\xff\xdc\xb3\x29\x66\x48\x0a\x00\x00")
func xiangApisTableHttpJsonBytes() ([]byte, error) {
return bindataRead(
@ -236,7 +258,7 @@ func xiangApisTableHttpJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/apis/table.http.json", size: 2636, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/apis/table.http.json", size: 2632, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -256,12 +278,12 @@ func xiangApisUserHttpJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/apis/user.http.json", size: 1260, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/apis/user.http.json", size: 1260, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _xiangApisXiangHttpJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x90\x3d\x4e\x03\x31\x10\x85\x7b\x9f\x62\xe4\x7a\xb3\x59\x28\xb7\xa3\x40\x88\x2e\x05\x5d\x94\x62\xb2\xb1\x36\x8e\x36\xf6\xc8\x9e\xe5\x47\xd1\x5e\x01\x8e\x40\x81\x38\x01\x65\xce\x03\xb9\x06\xb2\xd7\xf2\x82\x10\x1d\x34\xb6\xfc\xbd\xe7\xa7\x79\x73\x10\x00\xd2\xe0\x5e\xc9\x1a\xe4\xe9\xed\x78\x3a\x3e\x7f\x3c\xbe\xbe\x3f\xbd\xc8\x22\x28\xb7\xca\x79\x6d\x4d\x10\xcf\xca\xaa\xac\x46\xba\x51\xbe\x71\x9a\x38\x29\x5f\xbf\x5d\x2c\xae\x47\x4f\xeb\x6c\x4f\x41\xbd\xd7\x68\xda\xc4\x7a\x74\x9b\xc0\xd6\x0a\x9d\x72\xb3\xdd\x1d\x8f\x02\x21\x6f\xbd\xac\x61\x29\x00\x00\x0e\xf1\x4c\x38\xd8\xe7\xa4\x53\x44\xc4\x7b\xc5\x5b\x1b\x73\xae\x2e\x6f\x26\x9c\xd3\x67\x13\x23\x67\x1b\xe5\x7d\x9e\xa3\x6c\x3b\xbb\xc6\xae\x5c\x7c\x0b\xd4\xa1\xc6\x72\x95\xdf\xb6\x67\x59\xe7\x31\x00\xa4\x67\xe4\x3e\xa4\x9c\x57\x55\x31\x61\x7e\xa0\xb8\x37\x24\xea\x74\x83\x61\x1f\xf3\x9d\xb7\x46\x26\xcb\x10\xef\xa1\xf8\xa5\x95\x36\x9e\x54\xc3\x7f\x5a\xec\x47\xe6\x3f\x77\x13\x00\x2b\x31\x88\xcf\x00\x00\x00\xff\xff\x4e\x28\x95\x49\x47\x02\x00\x00")
var _xiangApisXiangHttpJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x90\x3f\x4e\xc3\x30\x14\xc6\xf7\x9c\xe2\xc9\x73\xf3\x07\xc6\x6c\x0c\x80\xd8\x3a\xb0\x55\x1d\x5e\x5d\x93\xbe\x2a\xb1\x2d\xdb\x29\x45\x55\xae\x00\x47\x60\x40\x9c\x80\xb1\xe7\x81\x5e\x03\xd9\xb1\x12\x2a\xc4\x16\x89\x25\x51\x7e\xdf\xcb\x4f\xef\x7b\x87\x04\x80\x49\x6c\x04\x2b\x81\x9d\x3e\x8e\xa7\xe3\xeb\xd7\xf3\xfb\xe7\xcb\x1b\x9b\xf9\x64\x27\x8c\x25\x25\x7d\x78\x91\x15\x59\xd1\xd3\xb5\xb0\xdc\x90\x76\x31\xf9\xf9\xdb\xd5\xfc\xae\x9f\xa9\x8c\x6a\xb5\x4f\xf7\x84\xb2\x8a\xac\x45\xb3\xf6\x6c\x25\xd0\x08\x93\x6e\x1f\x5d\x1f\x68\x74\x1b\xcb\x4a\x58\x24\x00\x00\x87\xf0\x8c\xd8\x8f\xe7\x9a\xa2\x22\xe0\x46\xb8\x8d\x0a\x9e\xdb\xeb\xfb\x11\x0f\xf6\x74\x64\xda\x28\x2e\xac\x1d\xf6\xc8\xaa\x5a\xad\xb0\xce\xe6\x67\x42\xf2\x35\x16\xcb\xe1\x5b\xb5\x8e\x95\xc3\x1a\x00\xcc\x3a\x74\xad\xb7\x5c\x16\xc5\x6c\xc4\xee\x49\x87\xbb\xa1\xd6\x35\x71\xf4\xf7\xc8\xb7\x56\x49\x16\x47\xba\xf0\xee\x66\x7f\xb4\x22\x69\xb5\xe0\x6e\xd2\x62\xbf\x9c\xff\xd4\xed\x01\x77\xc4\x95\xcc\x88\xab\x49\xfb\xdd\xf4\xde\xe9\xfa\x51\x83\x95\xc8\xf7\x69\xb0\x9e\x77\x4b\x00\x96\x49\x97\x7c\x07\x00\x00\xff\xff\x8c\x10\xa9\xc3\x23\x03\x00\x00")
func xiangApisXiangHttpJsonBytes() ([]byte, error) {
return bindataRead(
@ -276,12 +298,12 @@ func xiangApisXiangHttpJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/apis/xiang.http.json", size: 583, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/apis/xiang.http.json", size: 803, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _xiangDataAppJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xaa\xe6\x52\x50\x50\xca\x4b\xcc\x4d\x55\xb2\x52\x50\x7a\xb1\x71\xe1\x93\x3d\x0b\x9e\xee\x9a\xf2\x7c\xca\x8a\xa7\x7b\xa6\x3e\x9b\xdc\xa7\xa4\x03\x92\x2f\xce\xc8\x2f\x2a\x41\x28\x80\x08\x96\xa5\x16\x15\x67\xe6\xe7\x81\x84\x0d\xf4\xcc\xf4\x4c\x21\xa2\x29\xa9\xc5\xc9\x45\x99\x05\x25\x50\x19\x4c\x13\x9f\xaf\x5b\xf8\x7c\x42\xdb\xd3\x09\x7d\x4f\xfb\x37\x40\xb4\x64\x26\xe7\xe7\x15\x2b\x59\x29\x54\xd7\x72\xd5\x72\x01\x02\x00\x00\xff\xff\xa4\xe7\xb8\x35\x90\x00\x00\x00")
var _xiangDataAppJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xaa\xe6\x52\x50\x50\xca\x4b\xcc\x4d\x55\xb2\x52\x50\x7a\xb1\x71\xe1\x93\x3d\x0b\x9e\xee\x9a\xf2\x7c\xca\x8a\xa7\x7b\xa6\x3e\x9b\xdc\xa7\xa4\x03\x92\x2f\xce\xc8\x2f\x2a\x41\x28\x80\x08\x96\xa5\x16\x15\x67\xe6\xe7\x81\x84\x0d\xf4\xcc\xf4\x4c\x21\xa2\x29\xa9\xc5\xc9\x45\x99\x05\x25\x50\x19\x4c\x13\x9f\xaf\x5b\xf8\x7c\x42\xdb\xd3\x09\x7d\x4f\xfb\x37\x40\xb4\x64\x26\xe7\xe7\x15\x2b\x59\x29\x54\xd7\x42\x2c\x2b\xc9\x2f\x4a\x4c\x07\xb9\x07\xe4\x36\xb0\x91\x69\x89\xa5\x39\x60\xfb\x73\xf2\x93\x13\x73\xc0\xba\x14\x14\x94\xf2\x8b\x11\xba\x14\x14\x94\x92\xf3\x51\xb8\xc5\xc6\x60\x1e\x97\x82\x02\xc4\xd8\x7c\x98\x9b\xaa\x6b\xb9\x6a\xb9\x00\x01\x00\x00\xff\xff\xf3\xff\xaa\x68\xf7\x00\x00\x00")
func xiangDataAppJsonBytes() ([]byte, error) {
return bindataRead(
@ -296,7 +318,7 @@ func xiangDataAppJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/data/app.json", size: 144, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/data/app.json", size: 247, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -316,7 +338,7 @@ func xiangDataIconsDs_store() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/data/icons/.DS_Store", size: 6148, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/data/icons/.DS_Store", size: 6148, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -336,7 +358,7 @@ func xiangDataIconsIconIcns() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/data/icons/icon.icns", size: 75636, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/data/icons/icon.icns", size: 75636, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -356,7 +378,7 @@ func xiangDataIconsIconIco() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/data/icons/icon.ico", size: 31310, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/data/icons/icon.ico", size: 31310, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -376,7 +398,7 @@ func xiangDataIconsIconPng() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/data/icons/icon.png", size: 22420, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/data/icons/icon.png", size: 22420, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -396,7 +418,7 @@ func xiangFlowsReadmeMd() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/flows/README.md", size: 12, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/flows/README.md", size: 12, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -416,7 +438,7 @@ func xiangFlowsMenuFlowJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/flows/menu.flow.json", size: 1045, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/flows/menu.flow.json", size: 1045, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -436,7 +458,7 @@ func xiangFlowsTableGetFlowJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/flows/table/get.flow.json", size: 541, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/flows/table/get.flow.json", size: 541, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -456,12 +478,12 @@ func xiangModelsReadmeMd() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/models/README.md", size: 15, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/models/README.md", size: 15, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _xiangModelsMenuJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xdc\x98\xdd\x4e\x1b\x47\x14\xc7\xef\xfd\x14\xa3\xb9\x36\x05\x0c\xfd\xb0\x2f\x2b\x6e\xb8\xe8\x13\x54\x51\x34\xde\x3d\x5e\x8f\x98\x9d\x75\x77\x66\x69\x2c\x84\x44\xa9\x9a\x58\x6e\x69\x68\x45\x44\x55\xdc\x24\x54\xad\xca\x4d\x0b\x51\x23\x4a\x49\x4a\x5f\x86\xb5\xcd\x5b\x54\xfb\xbd\xf6\xce\xae\x81\x12\x19\xb8\xe1\xe3\xcc\xd7\xf9\x9d\x39\xf3\x3f\xb3\xb3\x56\x42\x08\x73\x62\x02\xae\x21\x3c\x7c\xda\x73\xb7\x9e\xe1\xb2\x67\x93\xa4\xce\x3c\xa3\xd7\x21\xd5\xe5\x11\x25\xdc\x78\x68\x02\x77\xfc\x6e\x08\x61\xcd\x32\x4d\xe0\x32\x19\x3f\xdc\x3f\x88\xda\x80\x1b\x94\xfb\xe3\x96\x39\xb7\x96\x3e\xc6\x25\x84\xd6\xfd\xe9\x35\x8b\x39\x26\x17\xb8\x86\x3e\xf5\xbb\xae\x25\x4b\x50\x1d\x97\x11\x96\xed\x56\x30\x70\xc9\xfb\x2f\xb5\xc8\xf2\x12\x0e\xe6\x40\xa1\x6f\x29\xef\x5a\xc4\xf6\x7a\x95\x23\x7b\x34\x49\x9d\x1a\xcb\x5c\x82\x01\x76\xd2\x96\x9a\x72\xd0\x39\x1e\x76\x37\x07\x9b\x7f\x27\xad\xdc\x61\x2c\x8c\x80\xb4\x1d\x88\xed\x94\xeb\xf0\x28\x34\xfa\xb6\x3c\x57\xfc\xdf\x19\x47\x84\xb4\x29\x37\x12\x3b\x03\x6e\xc8\x26\xae\xa1\xca\xdc\x9c\xca\x33\x77\x7b\x6b\xf0\xdb\x11\xbe\xfa\xf2\x54\xb3\xf8\x0d\x2c\xbf\x77\xd6\x7f\xf9\x24\x37\x2a\x85\x1e\xd4\x99\xa5\xad\x08\xc5\x5e\x58\x16\x03\xc2\x95\x1b\xe1\x8f\x71\x4f\xbe\x74\x5f\x6d\x24\xed\x3a\x34\x88\xc3\xbc\xf6\x06\x61\xe2\x1a\x5b\xb1\x4a\x05\xad\x33\x48\x67\xed\x25\xfd\xe9\xff\x70\x36\xf8\xe5\xf4\x06\x5d\x69\x11\xd9\xfc\xff\xdb\x32\xfc\xeb\x70\xb0\xf3\xea\x1a\x59\x61\x13\xbe\x92\x5d\x9e\x8e\x1f\x8d\x04\xb3\x5a\xad\x56\x95\x81\xf9\xf6\x7b\xb7\xb3\x7b\x0d\x0f\x84\x24\xd2\x51\x64\x05\x70\xc7\x54\x39\x80\x81\x7b\x09\xa7\x27\x6d\x56\x4b\x52\x8b\x7b\xc2\x91\xb4\x21\xac\x53\x11\xfc\xfd\x40\x19\x30\x5f\x98\x06\xdd\xe3\xfe\xc6\x17\x28\x1c\x85\xdc\xb7\x1b\xee\xf6\x61\x19\x45\x43\x91\xfb\xd5\x9f\x17\xbb\xbf\x17\x41\x95\x10\xf2\xe7\xc7\x36\x30\xe2\xb9\x21\x12\x85\xd4\x9a\x94\xe9\x36\xf0\xd8\x92\xa2\x6b\x12\xf1\x09\xe1\xed\x64\x6a\xd3\xd2\x81\xc5\x7a\xfa\xde\x68\x66\xae\x40\x5b\x25\x66\x0d\xcb\x06\x6a\xf0\x48\x22\x23\xf3\x67\x0e\xd8\xed\xd4\xa2\x08\x61\x01\x0c\x34\xe9\x87\x28\x90\xa1\x48\x0f\x92\x53\x19\xa5\x62\x94\x13\xf1\xce\x3c\x08\xa7\x59\x8f\x89\x03\xc1\x5e\x25\xcc\x81\x94\x5e\xc7\x41\xd2\x71\x0d\xcd\x97\xc7\xf7\xb9\xff\xec\xa8\xbf\xf5\xc7\xa0\xf7\x75\xff\xa7\x7f\x53\x11\xd5\x2c\x1e\xa9\xd3\x0c\xd1\x24\x5d\xa5\x32\x15\x15\xdf\xa5\x1a\xc2\xb3\x2b\x84\xd7\xd3\x47\x32\x0c\x45\x0d\x79\x02\x14\x5b\x47\xce\xf5\xf8\x91\x0c\x41\xc7\xcd\x3e\x6d\x0d\xcd\x2b\x93\xd4\x67\xa9\xe4\xb0\xb8\x9d\xc7\xfd\xe7\xdb\x39\x2c\x2d\x0a\x33\x5a\x93\xd8\x52\x01\x33\x66\x2f\xf4\x5a\x0d\x5a\xcc\x52\xc9\x67\x59\xc8\x61\x19\xee\x1f\xf4\x5f\xbe\xcd\x61\x31\xec\x74\x7a\xc5\x18\xc1\x85\xe0\xdd\x61\x2c\xe4\x63\x2c\x66\x30\xdc\xd3\x9d\xc1\xce\x81\x7b\xb2\xe9\xf6\x4e\xa7\x86\x31\x72\x31\x08\x29\x16\xf3\x29\xde\xcf\x50\x0c\xff\x39\x3c\x7f\x73\xdc\xef\x6d\xb9\xdd\xfd\xe0\xe7\xf0\xf5\xc1\xc5\x93\xa7\xe3\xa9\x36\x9a\x4a\xb3\x82\x91\x0c\xf3\xe5\x0f\x46\x0c\x55\xb9\xe4\xc6\x78\x35\x20\x9f\xea\x83\x42\x2a\xb7\x77\xe4\xbe\x78\x31\x81\x87\xd8\x70\x8b\x80\x3e\x2c\x06\x7a\xbe\x39\xd8\x7b\x7d\xf1\xf3\xe3\xc9\x58\x0d\x0a\x4c\x17\xb7\x07\xec\xa3\x42\xb0\xe1\xfe\x37\xe7\x27\x3f\x4e\x40\xa2\x5c\x77\x84\xb4\xdb\xb7\x07\xaa\x5a\x08\x75\x7e\xb6\x77\xd1\xdb\x98\x00\xc5\x01\x6e\xd3\x36\xcd\x2b\x8a\x69\x4a\x1b\x14\x18\x02\xec\x55\xaa\x81\x52\x17\x02\x2d\xd4\x2c\xb3\x45\x84\xb8\xaa\xec\x2d\xde\x0c\x50\xb6\xa2\x4e\x90\x85\x08\x48\x29\x0c\x21\x91\x6d\x09\xd1\x24\xd4\x9e\x12\x53\xb6\xb2\xa6\x95\xa1\x80\x29\x47\x15\x02\x2a\xd1\xb4\x5a\x2d\xca\x8d\x99\x3a\x31\xa6\x04\x96\xad\xb5\x13\x94\x21\x02\xcb\xd5\x86\x00\xed\x73\xca\xf5\x29\x21\x65\x0b\xef\x04\x5d\x88\x90\xd4\xca\x10\xde\x5e\xb9\xd6\xb4\xa6\x95\x7d\xd9\xa2\x7b\xc7\x25\x22\x5b\x74\xef\xbe\x44\x64\xeb\xed\x3d\x91\x08\x45\xcd\xbd\xe3\x12\x51\x99\xbb\x6f\x12\x51\x51\xdc\x22\xba\xbf\xba\xdf\x75\xdd\xce\x6e\xf2\x40\x9b\x26\xaa\x3b\xc6\x2c\xa3\x42\xe6\xc0\x8c\x36\x8d\xa1\x8c\x7c\x09\xc5\x24\x0b\x37\x43\xa2\xb8\x3e\x74\xf6\xdc\x37\xa7\x01\x4f\x0e\x89\x66\x03\x91\x90\xf7\xb5\xce\x9c\x2b\x0b\xdd\xd5\x61\xe2\xc7\x22\xff\x1d\x29\x78\x3b\x09\x0c\xf1\x13\xd6\x1a\xc2\x92\x9a\x20\x24\x31\x5b\xf1\x17\x25\xc2\xc2\x6a\xc8\x87\x3a\x30\x90\x10\x59\xd1\x7a\x69\xbd\xf4\x5f\x00\x00\x00\xff\xff\x2f\x9d\x83\xca\xad\x17\x00\x00")
var _xiangModelsMenuJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x55\xcd\x6e\xd3\x4c\x14\xdd\xe7\x29\x46\xb3\xce\xf7\xf5\x67\x17\x2f\x51\x37\x5d\xf0\x04\x55\x55\x4d\xec\x1b\x67\x94\xf1\x4c\xf0\x8c\xa3\x46\x28\x52\x29\x42\x54\x45\x81\xf2\x53\x15\xa9\x45\xa2\x12\x12\x6c\xa0\xad\x90\x0a\x04\x54\x5e\x06\x3b\xe1\x2d\x90\xc7\x8e\xc7\x6d\xa6\xa6\x2d\x5d\x25\xba\x33\x73\xcf\xb9\x3f\xe7\xf8\x7e\x0d\x21\xcc\x49\x00\xd8\x41\x78\xf2\xec\x20\x1e\xee\xe2\x7a\x1a\x53\xa4\xc9\xd2\x60\x7a\xa1\x74\x65\x9d\x12\xee\xaf\x05\xc0\x23\x7d\x0d\x21\xec\x8a\x20\x00\xae\xcc\xfb\xc9\xe1\x87\xe9\x19\x70\x9f\x72\xfd\x6e\x99\x73\xb1\x74\x07\xd7\x10\x1a\xe8\xf4\xae\x60\x51\xc0\x25\x76\xd0\x8a\xbe\x9a\xc1\x94\x80\xa8\x97\x27\x49\xb9\xf4\xbb\x59\x92\x25\x13\x2b\xc1\x2e\x2f\x61\x1d\x1d\xd4\xed\xa9\xba\x24\x4c\x6f\xce\xa4\x6b\x52\x7f\x99\x2b\xf0\x21\xb4\xa6\x1d\x6f\x9d\x4e\xb6\x37\xc7\x9b\xdf\xcc\x29\x8f\x18\xcb\xfb\xa2\xc2\x08\x8a\x38\xe5\x1e\xac\xe7\xc1\x4a\x2a\xfa\x77\x86\x88\x54\x21\xe5\xbe\x89\x33\xe0\xbe\x6a\x63\x07\x2d\xce\xcf\xdb\x98\xc5\x3b\xc3\xf1\xfb\x63\x7c\x7d\x78\xea\x0a\x7e\x0b\xf0\xfb\x67\xc9\xdb\xc7\x97\x76\xa5\x92\x41\x93\x09\xb7\x23\x2d\xb3\x10\x82\x01\xe1\xd6\x41\xe8\x37\xf1\xd7\x87\xf1\xc9\x86\x39\xf7\xa0\x45\x22\x96\x9e\xb7\x08\x93\x37\x18\x45\x8f\x4a\xda\x64\x50\xde\xe5\x2b\xf2\x49\x5e\x9f\x8d\xdf\x8d\x6e\x91\x4a\x97\xa8\xf6\xbf\x8f\x65\xf2\xe5\x68\xfc\xea\xe4\x06\x5b\x11\x12\xde\x99\x85\xa7\x17\xa5\x61\xca\x6c\x34\x1a\x0d\x6b\x63\x9e\xbe\x88\xb7\xf6\xae\xc1\x80\x91\x26\x30\xad\xb5\xed\xd3\x64\xe3\x41\x69\xa5\x72\x6a\x52\x11\x15\x59\xd6\x05\x78\x14\xd8\x98\x61\xe0\xe9\x26\x96\xbc\x43\x74\x15\x15\x3c\xf5\x19\x73\x86\xb0\x47\x65\xf6\x7f\xd5\xda\x49\xed\x63\x19\x27\x94\xbf\x42\xf1\x8f\x8d\x78\xe7\xa8\x8e\xa6\x4f\x51\xfc\xe8\xf3\xef\xbd\x8f\x55\xd5\xd6\x10\xd2\xf9\x71\x08\x8c\xa4\x34\xa4\x31\x54\xb7\x4d\x99\x17\x02\x2f\x22\xa5\xea\xda\x44\xde\x25\xbc\x6f\x52\x07\xc2\xcb\xfa\xa4\xed\xf7\xff\xf3\x2b\xdb\x81\xbe\xcd\xe5\x5a\x22\x04\xea\xf3\x8b\x5e\x7a\x2f\x82\xb0\x5f\x02\x45\x08\x4b\x60\xe0\x2a\xdd\xa2\xcc\x9f\xa6\x46\x61\xe4\x3a\xdd\xd1\xe9\xb2\x14\x93\x59\xcd\xd3\x0c\x8a\x8a\x33\x7f\xef\x11\x16\x41\x85\xbd\x27\xbb\xc7\xc9\xf0\xd3\xf8\xe0\x49\xf2\xe6\xa7\x21\xa7\x41\x1c\x84\xe7\x3a\x84\x37\xcb\xea\xd3\x7c\x72\x03\xfb\x8f\xb8\x8a\xf6\xa8\x2a\xf5\x47\x93\x72\xd0\x42\x11\xc8\xd9\xd9\x16\xe2\x9c\xee\x1d\x64\xa4\x94\xd7\xea\xa0\x85\x4a\xb5\xfc\x1a\x3d\x4f\x0e\x86\xf1\xf6\x61\x3c\x7a\x69\x61\xae\xbf\x9b\x73\x12\xc2\x1e\x75\xe1\x92\x02\x5c\x26\x22\x6f\x86\xfd\xe2\xed\xb0\x2f\x79\x83\x59\xb1\x95\x62\xda\x66\xee\x7f\xab\xe9\x2a\x75\xcd\xd6\xc6\xa8\x54\xb8\x38\x1d\xd4\xab\x81\xe3\xad\xfd\xf8\xfb\xe8\x0a\xf0\x2d\x11\x06\x53\xf4\xb9\xf9\x0a\xfc\x2e\x8b\x64\x09\x3f\xff\xb7\x7a\x41\x90\x5a\xab\xd9\x7e\x66\x81\xc2\x26\x72\x79\x2a\x1a\x80\x54\x24\xe8\xca\x73\xdf\x7a\x2c\x45\x4b\xad\x79\xc0\x40\x81\x34\x5a\x1f\xd4\x06\xb5\x3f\x01\x00\x00\xff\xff\xd8\xc5\x4f\x38\x4a\x09\x00\x00")
func xiangModelsMenuJsonBytes() ([]byte, error) {
return bindataRead(
@ -476,7 +498,7 @@ func xiangModelsMenuJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/models/menu.json", size: 6061, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/models/menu.json", size: 2378, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -496,7 +518,7 @@ func xiangModelsUserJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/models/user.json", size: 8826, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/models/user.json", size: 8826, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -516,7 +538,27 @@ func xiangTablesReadmeMd() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/tables/README.md", size: 15, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/tables/README.md", size: 15, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _xiangTablesMenuJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x41\x6f\xdb\x36\x14\xbe\xfb\x57\x10\x3c\xbb\x46\x32\x6c\x3b\xe4\xdc\x4b\x6f\x03\x76\xd8\x61\x08\x0a\x5a\xa4\x63\x22\xb4\xa4\x49\x94\x93\x60\x30\x90\x76\x87\x66\x1d\xba\x05\xc3\xd6\x64\xc8\x86\xa5\x40\xd1\x61\x87\x25\x29\x50\xa4\x9d\x8b\xa5\x7f\x26\x92\x9d\x7f\x31\x88\x94\x2d\x52\xa6\x6d\x59\xb1\x0c\x04\xd5\x51\x8f\x8f\xfc\xc8\x8f\xef\x3d\xbe\x47\xf1\xdb\x1a\x00\xd0\x46\x1d\x02\x37\x00\x1c\xfe\xf4\x7b\xf8\xec\x57\x58\x8f\x65\x5d\xe2\xf9\xd4\xb1\x63\xf1\x7a\x63\xad\xb1\x26\xa5\x98\x58\x1e\x75\x79\xd2\x20\xf5\x87\x67\x57\x83\xff\xce\x64\x7b\x93\xda\x18\x6e\x80\x78\x54\x00\x60\xc7\xc1\x84\xc5\x8a\xbb\x14\xd9\x5b\x8d\x0e\xb1\x03\x58\x03\xa0\x27\x54\x91\x4b\xfd\x54\xd5\x27\xc8\xb3\xda\xe3\x6f\x00\xa0\xeb\x39\x16\xf1\x63\x15\x39\x8e\xdf\x48\x47\x69\x7c\x81\xb6\xa8\x8d\x38\x11\xa8\x42\x7d\x2b\x40\x5e\x0c\x0d\xef\xa5\x32\x4c\x5a\x28\x60\x1c\x6e\x80\xaf\x13\x11\x18\x8f\x2f\x14\x76\x28\x6f\xfb\x0a\x68\x22\xb6\xda\x94\x61\x8f\xd8\x13\x2d\x00\xc0\x6f\x02\xe2\xed\x19\x1a\xc4\x1a\x18\xb1\x04\x9a\x64\xb4\x0e\x20\xc5\x70\x33\xa3\xd8\xab\x4d\xfb\xea\xd5\xb5\xb9\xb5\x89\x47\x7c\x6d\xee\xd9\xf9\xcb\xc9\x3a\x2c\xe8\x88\xed\x70\x91\x47\x6c\x0e\xeb\x59\x0d\xc7\x8d\x5b\xed\x80\x31\x38\x15\x3b\x9d\xa5\x32\x8b\xb8\x4b\xfa\xb5\xfe\x59\x4d\xd5\xed\x8d\x77\x52\xce\x40\xd9\xcc\x07\xf7\xd5\x8d\x64\xa8\x29\xad\xe0\xc1\xfd\x74\x6b\xba\x94\xec\x68\x2c\x42\xbe\xe7\x0a\x23\x94\xea\x29\x6c\x6c\x08\x6e\x76\x93\x60\x17\xb1\x40\xa8\x6f\x50\x9c\xae\x6a\xb4\xa2\xf1\x1a\x20\xc1\x94\x9b\x71\xa8\xed\x06\x7c\x69\x38\x2d\xc7\xeb\xc4\x7d\x65\x4b\x22\x87\x4d\xe6\x58\xdb\xbe\x91\x0c\xd1\x14\xbe\xfb\x2e\x7c\xbd\x5f\x06\x2b\x09\x72\x21\x66\xac\x36\xb1\xb6\x9b\xce\xae\x11\x6e\xa1\xa5\x27\xeb\xbb\x63\xeb\x4f\xfc\x78\x61\x30\xcd\x7d\x5d\x86\x2c\xd2\x76\x18\x26\x9e\x08\x95\xe7\x6f\x6f\xf6\xbf\x8f\x7e\xf8\x3b\x3a\x3e\x0f\x0f\x5f\x5d\xbf\xeb\x9b\x08\x00\xd2\x5d\xe3\xf8\x9a\xc3\xf3\xc7\x5c\x46\xc7\xe7\x93\x5e\x3f\x9a\xde\xba\xee\xf3\xf5\x9c\x63\x86\x87\xaf\xa6\x8f\xb9\x96\x27\x8e\xe4\x34\x14\xcb\x23\x88\x13\xfc\x10\x71\xa3\x9d\x84\x07\x27\xe1\xfb\x7e\x74\x74\x79\x73\xf4\xa6\x0c\x43\x51\xe0\x0b\x19\x0b\x46\x9c\x70\xda\x21\x4b\x87\x34\xb3\x85\x09\x23\x33\xd9\x3a\xbd\xf9\xed\x65\x74\xfa\x64\x78\x76\x51\x06\x5b\x0a\xfc\xaa\xd8\xca\x07\x69\x66\x8b\x5a\x8e\x6d\xe6\xe9\xe4\x2a\x3a\x7d\x52\xca\x71\x14\x43\xae\xe6\x40\x9a\x83\x34\x85\x12\x5c\x9d\xcd\x42\x9a\x24\xbd\x06\xdb\x38\x7c\x36\xf8\xab\x14\xef\x11\x90\x2b\x21\x64\x1e\x92\x99\x92\x24\x81\x34\x91\x32\x38\xb8\x1c\x3e\x7d\x3c\x78\xfc\x6f\x19\xbc\x24\xb8\x2b\x61\x66\x3e\xd6\x34\x6e\x78\xdb\xc8\xcc\xf0\xed\xf9\xe0\x97\xd7\xe5\xd0\xc2\xdb\xab\x22\x65\x36\x92\x99\x12\x0f\xd9\xdb\x46\x4a\xa2\x1f\x7f\x0e\x0f\x8e\xca\xa0\x44\x40\xae\x84\x92\x79\x48\x66\x4a\x7c\x8e\x78\x60\x4e\xf8\x07\x4f\x2f\xa3\xfd\x47\x65\x90\x92\x80\x16\xa2\x25\x67\xae\xbb\x78\x4e\x4a\x6c\xd4\x64\x04\x4f\xcf\x21\xc7\x1a\x9a\x42\xee\xfc\x14\x53\x7f\x1e\xc0\x58\x45\x47\x50\xbe\x36\xeb\x45\x19\x35\x6f\x7f\xe0\xe2\x59\xb9\x6c\x74\xf2\x26\x7a\x7e\x51\x5e\x2e\xab\xc0\x17\x32\x86\x02\xd9\x59\x3e\x48\x33\x5b\x5d\xea\xd3\x26\x23\x0f\xc5\xbd\x90\x91\xaf\xe3\xab\xc1\xcb\x7e\x19\x4c\x69\xd0\x85\xb8\x9a\x59\x24\xdf\x0e\xd4\xcc\x96\x56\x08\x55\x95\x52\x0e\xbe\x94\x52\xa8\xaa\x95\xe6\xf3\x25\xd3\xde\x2a\x23\xd6\x48\x91\x75\x62\x55\x42\xaa\xa4\x24\xe9\x5d\x95\xf9\x69\xa4\xc8\xb3\xea\xae\x1d\x63\x0b\xdf\x75\x6a\x90\x0b\xdc\x78\x66\x48\x00\xc5\xb2\xca\x3b\x7d\xd3\xa9\xa5\x7f\x55\x7e\x38\x97\xaf\xf4\xce\xa1\xba\x91\x30\xd1\x23\x0b\xca\xaa\xd6\xfc\x38\x6b\xcd\xe4\xde\xa9\xba\x92\x02\xda\xcf\xe8\x16\x65\x9c\x78\xf2\x57\xa5\x10\x30\xea\xa7\x53\x82\xae\x47\x3b\x48\xfc\xc0\x87\x74\xb4\x9f\x90\xa1\x3d\x27\xd0\x4a\xf6\xf4\x97\xf6\x94\x97\x03\xa3\x27\x13\x99\xd4\x58\xb4\xed\x50\x2c\xee\x0a\xe1\x27\x9f\xae\xb9\xbb\xca\x22\xea\xb3\xc7\x4a\x23\x5a\xee\x2e\x49\x12\x9a\x1f\x42\x06\x86\xdc\xfa\x89\x25\xe5\xd6\x4f\xf2\xbf\xdc\xfa\xea\x4f\xd0\xfc\x20\x32\x95\x98\x30\x8e\xcd\xd4\x38\xc6\x46\x70\x8b\xed\xfb\x7c\x12\x40\x73\x40\x64\x8d\xe2\x54\x6a\x36\xa2\x5e\x35\x3b\x40\x33\xe0\xdc\xb1\xe7\x7a\x40\x9a\x0c\x3c\xbf\x08\xdf\xf7\x95\x27\x39\x63\x95\xe4\xaf\x16\x6c\x21\x1f\xb4\xd0\x3d\x97\xcd\x0e\x1f\x23\xef\x9f\xf4\xd2\x54\x42\x3b\xae\xe3\x65\x64\xf2\xe8\xd6\x65\xb2\xc0\xcc\xf4\xb5\x7d\x62\xee\xfb\x55\x9b\x78\xc6\x01\x0c\x0d\xb2\xc7\x97\xa3\x27\x34\x13\x5d\x4c\x2d\xae\x7c\x05\x24\x5f\x23\x29\x72\x9f\x70\x4e\xed\x2d\x53\x78\xd0\x02\x54\xde\x68\xd0\xa2\x84\x61\x9f\xcc\x78\x48\xc4\x29\x67\xd2\xa0\xfe\xec\x0f\x5e\xec\x5f\x7f\x78\x11\x3d\xd2\x33\x55\x88\x89\xaf\xbe\x9d\xd2\x1b\x4d\xf1\x26\x0b\x02\xe6\x18\x2e\x30\x1b\x2f\xc8\x71\xd2\x65\xc2\xc9\x92\x47\xcd\x1c\x47\x4b\x1a\x35\x53\x6a\x2e\x69\xd4\x69\xaf\x32\x96\x31\xe1\xc9\x0a\x68\xd6\xa8\x6a\xea\x50\x20\x12\x21\xdb\x12\x71\x44\x75\x0b\xd4\x5d\x52\x6c\xba\xfe\xf0\x47\xf8\xcf\xf1\xac\xa0\xa3\x04\x8a\x8c\x07\x66\xc2\x45\x1a\x9e\x6a\xbd\xda\xff\x01\x00\x00\xff\xff\x57\xfb\x9f\xa7\x8e\x28\x00\x00")
func xiangTablesMenuJsonBytes() ([]byte, error) {
return bindataRead(
_xiangTablesMenuJson,
"xiang/tables/menu.json",
)
}
func xiangTablesMenuJson() (*asset, error) {
bytes, err := xiangTablesMenuJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "xiang/tables/menu.json", size: 10382, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -536,7 +578,7 @@ func xiangTablesUserJson() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "xiang/tables/user.json", size: 1422, mode: os.FileMode(420), modTime: time.Unix(1633218942, 0)}
info := bindataFileInfo{name: "xiang/tables/user.json", size: 1422, mode: os.FileMode(420), modTime: time.Unix(1633995598, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -594,6 +636,7 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"ui/index.html": uiIndexHtml,
"xiang/.DS_Store": xiangDs_store,
"xiang/apis/README.md": xiangApisReadmeMd,
"xiang/apis/table.http.json": xiangApisTableHttpJson,
"xiang/apis/user.http.json": xiangApisUserHttpJson,
@ -610,6 +653,7 @@ var _bindata = map[string]func() (*asset, error){
"xiang/models/menu.json": xiangModelsMenuJson,
"xiang/models/user.json": xiangModelsUserJson,
"xiang/tables/README.md": xiangTablesReadmeMd,
"xiang/tables/menu.json": xiangTablesMenuJson,
"xiang/tables/user.json": xiangTablesUserJson,
}
@ -658,6 +702,7 @@ var _bintree = &bintree{nil, map[string]*bintree{
"index.html": {uiIndexHtml, map[string]*bintree{}},
}},
"xiang": {nil, map[string]*bintree{
".DS_Store": {xiangDs_store, map[string]*bintree{}},
"apis": {nil, map[string]*bintree{
"README.md": {xiangApisReadmeMd, map[string]*bintree{}},
"table.http.json": {xiangApisTableHttpJson, map[string]*bintree{}},
@ -687,6 +732,7 @@ var _bintree = &bintree{nil, map[string]*bintree{
}},
"tables": {nil, map[string]*bintree{
"README.md": {xiangTablesReadmeMd, map[string]*bintree{}},
"menu.json": {xiangTablesMenuJson, map[string]*bintree{}},
"user.json": {xiangTablesUserJson, map[string]*bintree{}},
}},
}},

81
global/app.go Normal file
View file

@ -0,0 +1,81 @@
package global
import (
jsoniter "github.com/json-iterator/go"
"github.com/yaoapp/kun/exception"
"github.com/yaoapp/xiang/data"
"github.com/yaoapp/xiang/xfs"
)
// App 应用信息
var App AppInfo
// AppInfo 应用信息
type AppInfo struct {
Name string `json:"name,omitempty"`
Short string `json:"short,omitempty"`
Version string `json:"version,omitempty"`
Description string `json:"description,omitempty"`
Icons map[string]string `json:"icons,omitempty"`
Storage AppStorage `json:"storage,omitempty"`
Option map[string]interface{} `json:"option,omitempty"`
}
// AppStorage 应用存储
type AppStorage struct {
Default string `json:"default"`
Buckets map[string]string `json:"buckets,omitempty"`
S3 map[string]interface{} `json:"s3,omitempty"`
OSS map[string]interface{} `json:"oss,omitempty"`
COS map[string]interface{} `json:"cos,omitempty"`
}
// LoadAppInfo 读取应用信息
func LoadAppInfo(root string) {
info := defaultAppInfo()
fs := xfs.New(root)
if fs.MustExists("/app.json") {
err := jsoniter.Unmarshal(fs.MustReadFile("/app.json"), &info)
if err != nil {
exception.New("解析应用失败 %s", 500, err).Throw()
}
}
if fs.MustExists("/xiang/icons/icon.icns") {
info.Icons["icns"] = xfs.Encode(fs.MustReadFile("/xiang/icons/icon.icns"))
}
if fs.MustExists("/xiang/icons/icon.ico") {
info.Icons["ico"] = xfs.Encode(fs.MustReadFile("/xiang/icons/icon.ico"))
}
if fs.MustExists("/xiang/icons/icon.png") {
info.Icons["png"] = xfs.Encode(fs.MustReadFile("/xiang/icons/icon.png"))
}
App = info
}
// defaultAppInfo 读取默认应用信息
func defaultAppInfo() AppInfo {
info := AppInfo{}
err := jsoniter.Unmarshal(data.MustAsset("xiang/data/app.json"), &info)
if err != nil {
exception.New("解析默认应用失败 %s", 500, err).Throw()
}
info.Version = VERSION
info.Icons["icns"] = xfs.Encode(data.MustAsset("xiang/data/icons/icon.icns"))
info.Icons["ico"] = xfs.Encode(data.MustAsset("xiang/data/icons/icon.ico"))
info.Icons["png"] = xfs.Encode(data.MustAsset("xiang/data/icons/icon.png"))
return info
}
// Public 输出公共信息
func (app AppInfo) Public() AppInfo {
app.Storage.COS = nil
app.Storage.OSS = nil
app.Storage.S3 = nil
return app
}

View file

@ -9,13 +9,11 @@ import (
"path/filepath"
"strings"
jsoniter "github.com/json-iterator/go"
"github.com/yaoapp/gou"
"github.com/yaoapp/kun/exception"
"github.com/yaoapp/xiang/config"
"github.com/yaoapp/xiang/data"
"github.com/yaoapp/xiang/table"
"github.com/yaoapp/xiang/xfs"
"github.com/yaoapp/xun/capsule"
)
@ -39,19 +37,6 @@ type AppRoot struct {
Data string
}
// AppInfo 应用信息
type AppInfo struct {
Name string `json:"name,omitempty"`
Short string `json:"short,omitempty"`
Version string `json:"version,omitempty"`
Description string `json:"description,omitempty"`
Icons map[string]string `json:"icons,omitempty"`
Option map[string]interface{} `json:"option,omitempty"`
}
// App 应用信息
var App AppInfo
// Load 根据配置加载 API, FLow, Model, Plugin
func Load(cfg config.Config) {
@ -121,55 +106,14 @@ func AppInit(cfg config.Config) {
}
}
if _, err := os.Stat(cfg.RootTable); os.IsNotExist(err) {
err := os.MkdirAll(cfg.RootTable, os.ModePerm)
if _, err := os.Stat(cfg.RootData); os.IsNotExist(err) {
err := os.MkdirAll(cfg.RootData, os.ModePerm)
if err != nil {
log.Panicf("创建目录失败(%s) %s", cfg.RootTable, err)
log.Panicf("创建目录失败(%s) %s", cfg.RootData, err)
}
}
}
// LoadAppInfo 读取应用信息
func LoadAppInfo(root string) {
info := defaultAppInfo()
fs := xfs.New(root)
if fs.MustExists("/app.json") {
err := jsoniter.Unmarshal(fs.MustReadFile("/app.json"), &info)
if err != nil {
exception.New("解析应用失败 %s", 500, err).Throw()
}
}
if fs.MustExists("/xiang/icons/icon.icns") {
info.Icons["icns"] = xfs.Encode(fs.MustReadFile("/xiang/icons/icon.icns"))
}
if fs.MustExists("/xiang/icons/icon.ico") {
info.Icons["ico"] = xfs.Encode(fs.MustReadFile("/xiang/icons/icon.ico"))
}
if fs.MustExists("/xiang/icons/icon.png") {
info.Icons["png"] = xfs.Encode(fs.MustReadFile("/xiang/icons/icon.png"))
}
App = info
}
// defaultAppInfo 读取默认应用信息
func defaultAppInfo() AppInfo {
info := AppInfo{}
err := jsoniter.Unmarshal(data.MustAsset("xiang/data/app.json"), &info)
if err != nil {
exception.New("解析默认应用失败 %s", 500, err).Throw()
}
info.Version = VERSION
info.Icons["icns"] = xfs.Encode(data.MustAsset("xiang/data/icons/icon.icns"))
info.Icons["ico"] = xfs.Encode(data.MustAsset("xiang/data/icons/icon.ico"))
info.Icons["png"] = xfs.Encode(data.MustAsset("xiang/data/icons/icon.png"))
return info
}
// LoadEngine 加载引擎的 API, Flow, Model 配置
func LoadEngine(from string) {

View file

@ -29,7 +29,7 @@ func processPing(process *gou.Process) interface{} {
// processInspect 返回系统信息
func processInspect(process *gou.Process) interface{} {
App.Icons["favicon"] = "/api/xiang/favicon.ico"
return App
return App.Public()
}
// processFavicon 运行模型 MustCreate

85
xfs/process.go Normal file
View file

@ -0,0 +1,85 @@
package xfs
import (
"crypto/md5"
"encoding/hex"
"fmt"
"os"
"path/filepath"
"strings"
"time"
"github.com/yaoapp/gou"
"github.com/yaoapp/kun/exception"
"github.com/yaoapp/kun/maps"
"github.com/yaoapp/xun"
)
func init() {
// 注册处理器
gou.RegisterProcessHandler("xiang.fs.Upload", processUpload)
gou.RegisterProcessHandler("xiang.fs.GetToken", processGetToken)
gou.RegisterProcessHandler("xiang.fs.GetURL", processGetURL)
gou.RegisterProcessHandler("xiang.fs.ReadFile", processReadFile)
}
// processUpload 上传文件到本地服务器
func processUpload(process *gou.Process) interface{} {
process.ValidateArgNums(1)
tmpfile, ok := process.Args[0].(xun.UploadFile)
if !ok {
exception.New("上传文件参数错误", 400, process.Args[0]).Throw()
}
hash := md5.Sum([]byte(time.Now().Format("20060102-15:04:05")))
fingerprint := string(hex.EncodeToString(hash[:]))
fingerprint = strings.ToUpper(fingerprint)
dir := time.Now().Format("20060102")
ext := filepath.Ext(tmpfile.Name)
filename := filepath.Join(dir, fmt.Sprintf("%s%s", fingerprint, ext))
Stor.MustMkdirAll(dir, os.ModePerm)
content, err := New("/").ReadFile(tmpfile.TempFile)
if err != nil {
exception.New("不能读取上传文件 %s", 500, err.Error()).Throw()
}
Stor.MustWriteFile(filename, content, os.ModePerm)
return filename
}
// processGetContent 返回文件正文
func processReadFile(process *gou.Process) interface{} {
process.ValidateArgNums(1)
filename := process.ArgsString(0)
encode := process.ArgsBool(1, true)
stats, err := Stor.Stat(filename)
if err != nil {
exception.New("读取文件信息失败 %s", 500, err.Error()).Throw()
}
var content string
body := Stor.MustReadFile(filename)
if encode {
content = Encode(body)
} else {
content = string(body)
}
return maps.Map{
"size": stats.Size(),
"content": content,
}
}
// processGetToken 上传文件到腾讯云对象存储 COS
func processGetToken(process *gou.Process) interface{} {
return nil
}
// processGetURL 返回文件CDN地址
func processGetURL(process *gou.Process) interface{} {
return nil
}

View file

@ -39,7 +39,7 @@ type File interface {
}
func init() {
Stor = New(config.Conf.Storage.Path)
Stor = New(config.Conf.RootData)
}
// New 创建文件系统

View file

@ -0,0 +1,42 @@
{
"name": "存储接口",
"version": "1.0.0",
"description": "存储接口API",
"group": "xiang/storage",
"guard": "bearer-jwt",
"paths": [
{
"path": "/upload",
"method": "POST",
"guard": "-",
"process": "xiang.fs.Upload",
"in": ["$file.file"],
"out": {
"status": 200,
"type": "application/json"
}
},
{
"path": "/readfile",
"method": "GET",
"guard": "-",
"process": "xiang.fs.ReadFile",
"in": ["$query.name", "$query.encode"],
"out": {
"status": 200,
"type": "application/json"
}
},
{
"path": "/token",
"method": "GET",
"guard": "-",
"process": "xiang.fs.processGetToken",
"in": ["$query.name", "$query.bucket"],
"out": {
"status": 200,
"type": "application/json"
}
}
]
}

View file

@ -4,5 +4,11 @@
"version": "0.6.5",
"description": "象传应用引擎管理后台",
"icons": {},
"storage": {
"default": "oss",
"oss": {},
"cos": {},
"s3": {}
},
"option": {}
}