-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request !2 from dowflyon/develop
- Loading branch information
Showing
64 changed files
with
5,486 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
只支持POST,业务处理端口 | ||
|
||
查询文件列表:/api/query/file | ||
|
||
{ | ||
"lpszTimeStart":"开始时间,可NULL", | ||
"lpszTimeEnd":"结束时间,可NULL", | ||
"lpszFileName":"文件名,可NULL", | ||
"lpszFileHash":"文件HASH,可NULL" | ||
} | ||
|
||
NGINX上传代理接口:/api/event/upfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,104 @@ | ||
# XEngine_Storage | ||
|
||
#### Description | ||
c c++ 存储服务 | ||
c c++ storage service | ||
|
||
#### Software Architecture | ||
Software architecture description | ||
|
||
#### Installation | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
|
||
#### Instructions | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
|
||
#### Contribution | ||
|
||
1. Fork the repository | ||
2. Create Feat_xxx branch | ||
3. Commit your code | ||
4. Create Pull Request | ||
|
||
|
||
#### Gitee Feature | ||
|
||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md | ||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com) | ||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) | ||
4. The most valuable open source project [GVP](https://gitee.com/gvp) | ||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) | ||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) | ||
# XEngine_Storage | ||
|
||
## Introduction | ||
c c++ 存储服务 c c++ 文件存储服务 | ||
c c++ file storage service | ||
This is an api gateway for uploading and downloading. | ||
The service is for users who have business needs for upload and download services (such as developers who need to upload and download servers). | ||
|
||
## Software feature | ||
The purpose of development and implementation based on libXEngine is a cross-platform network storage service | ||
This repository has a development and master branch. If you want to use it, please use the master branch | ||
|
||
feature list: | ||
1. support file http upload and download(use put and get method) | ||
2. support http api notify of event and management api interface(planning) | ||
3. support encrypt data transimission(planning) | ||
4. support mysql record infomation. | ||
5. support load banace(planning) | ||
6. supprot http and private auth(planning) | ||
7. support log and config | ||
8. supprot speeds contral | ||
9. supprot task start and end proxy forwarding(planning) | ||
10.support p2p,bt and many more(planning) | ||
11.support second pass | ||
12.support nginx download proxy_pass | ||
13.support nginx upload module proxy_pass | ||
|
||
## install | ||
|
||
#### Requirements | ||
support system above windows 7sp1 and linux(ubuntu20.04,centos8) | ||
XEngine need V7.13 or above | ||
vcpkg need 2021.05.11 or above | ||
|
||
#### Windows | ||
use vs2019 x86 open and complie | ||
You need to configure the environment in the following way, otherwise you may need to set the library directory in the project yourself | ||
|
||
##### install Dependent library | ||
vcpkg:https://github.com/microsoft/vcpkg | ||
vcpkg.exe install jsoncpp | ||
vcpkg integrate install | ||
you can not use vcpkg and config jsoncpp development for youself | ||
|
||
##### XEngine | ||
XEngine can be download with mine repository,whe you downloaded xengine,you have to add value to you user environment | ||
- XEngine_Include header file path | ||
- XEngine_Library library file path | ||
|
||
#### Linux | ||
Linux use Makefile to complie | ||
supproted ubuntu or centos | ||
|
||
##### install Dependent library | ||
install jsoncpp to your system | ||
ubuntu20.04 | ||
sudo apt install libjsoncpp-devel | ||
Centos8.x | ||
sudo dnf install jsoncpp-devel | ||
|
||
##### XEngine Install | ||
you can install xengine env to your system by shell | ||
like this:sudo XEngine_RunEnv.sh -c 3 | ||
##### complie | ||
execute command in XEngine_Source path | ||
make complie | ||
make FLAGS=InstallAll install | ||
make FLAGS=CleanAll clear | ||
|
||
#### use | ||
|
||
1. Switch to the MASTER branch | ||
2. download code | ||
3. complie | ||
4. install | ||
5. run | ||
6. use curl or postman test upload and download | ||
|
||
## api list | ||
POST Method used as api server | ||
it is used as manage service.api format use to url,such as:POST /api/query/file | ||
The three-segment format is fixed,first api is a fixed,second api of query is a type,third api of file is a name | ||
support api list reference:apilist.txt | ||
|
||
## second pass | ||
The Second pass is not realized by the server, it is by the client | ||
upload file second pass is first check the HASH file is on the server, if has file on the server, it will directly prompt the upload is successful. | ||
The realization of downloading second transmission is to first query the local file save path through HASH, and download it directly if it exists. | ||
|
||
## directory struct | ||
- XEngine_Docment docment directory | ||
- XEngine_Release install directory | ||
- XEngine_Source code directory | ||
|
||
## Participate in contribution | ||
|
||
1. Fork this code | ||
2. Create new Feat_xxx branch | ||
3. Submit the code | ||
4. New Pull Request | ||
|
||
## post issues | ||
|
||
if you have eny quest.post issues... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
Navicat Premium Data Transfer | ||
Source Server : 192.168.1.9 | ||
Source Server Type : MySQL | ||
Source Server Version : 80025 | ||
Source Host : 192.168.1.9:3306 | ||
Source Schema : XEngine | ||
Target Server Type : MySQL | ||
Target Server Version : 80025 | ||
File Encoding : 65001 | ||
Date: 17/06/2021 17:19:26 | ||
*/ | ||
|
||
SET NAMES utf8mb4; | ||
SET FOREIGN_KEY_CHECKS = 0; | ||
|
||
-- ---------------------------- | ||
-- Table structure for XStorage_Count | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `XStorage_Count`; | ||
CREATE TABLE `XStorage_Count` ( | ||
`ID` int NOT NULL AUTO_INCREMENT COMMENT 'ID', | ||
`FileCount` bigint NULL DEFAULT NULL COMMENT '文件总个数', | ||
`FileSize` bigint NULL DEFAULT NULL COMMENT '文件总大小', | ||
PRIMARY KEY (`ID`) USING BTREE | ||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; | ||
|
||
-- ---------------------------- | ||
-- Table structure for XStorage_User | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `XStorage_User`; | ||
CREATE TABLE `XStorage_User` ( | ||
`ID` int NOT NULL AUTO_INCREMENT COMMENT 'ID', | ||
`UserName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名', | ||
`UserPass` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码', | ||
`FileCount` bigint NOT NULL COMMENT '文件个数', | ||
`FileSize` bigint NOT NULL COMMENT '占用大小', | ||
`PhoneNumber` bigint NOT NULL COMMENT '电话号码', | ||
`IDNumber` bigint NOT NULL COMMENT '身份证号码', | ||
`PermissionLeave` tinyint NOT NULL COMMENT '权限级别', | ||
`Status` tinyint NULL DEFAULT NULL COMMENT '状态', | ||
`xhToken` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户临时句柄', | ||
`EMailAddr` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电子邮件地址', | ||
`IPAddr` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后登录IP地址', | ||
`CreateTime` datetime NOT NULL COMMENT '创建时间', | ||
PRIMARY KEY (`ID`) USING BTREE | ||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; | ||
|
||
SET FOREIGN_KEY_CHECKS = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Navicat Premium Data Transfer | ||
Source Server : 192.168.1.9 | ||
Source Server Type : MySQL | ||
Source Server Version : 80025 | ||
Source Host : 192.168.1.9:3306 | ||
Source Schema : XEngine_Storage | ||
Target Server Type : MySQL | ||
Target Server Version : 80025 | ||
File Encoding : 65001 | ||
Date: 17/06/2021 17:19:07 | ||
*/ | ||
|
||
SET NAMES utf8mb4; | ||
SET FOREIGN_KEY_CHECKS = 0; | ||
|
||
-- ---------------------------- | ||
-- Table structure for XStorage_File | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS `XStorage_File`; | ||
CREATE TABLE `XStorage_File` ( | ||
`ID` int NOT NULL AUTO_INCREMENT COMMENT 'ID序号', | ||
`FilePath` varchar(260) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件路径', | ||
`FileName` varchar(260) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名称', | ||
`FileHash` varchar(260) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件HASH', | ||
`FileUser` varchar(260) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件所属用户', | ||
`FileSize` bigint NOT NULL COMMENT '文件大小', | ||
`FileTime` datetime NOT NULL COMMENT '插入时间', | ||
PRIMARY KEY (`ID`) USING BTREE | ||
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; | ||
|
||
SET FOREIGN_KEY_CHECKS = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
qyt create sql file | ||
*/ | ||
|
||
|
||
CREATE DATABASE `XEngine` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_general_ci; | ||
CREATE DATABASE `XEngine_Storage` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_general_ci; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.