forked from opentdp/tdp-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
降低对外部库的依赖数量,减少代码量,提高可读性
- Loading branch information
Showing
26 changed files
with
405 additions
and
703 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
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
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
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,16 +1,19 @@ | ||
package args | ||
|
||
// 版本信息 | ||
|
||
const Version = "0.14.5" | ||
const BuildVersion = "231125" | ||
|
||
const AppName = "TDP CLoud" | ||
const AppSummary = "土豆片云面板" | ||
// 更新地址 | ||
|
||
const UpdateUrl = "https://get.opentdp.org/update/cloud" | ||
|
||
const ReadmeText = AppSummary + ` | ||
// 应用描述 | ||
|
||
可以跨平台部署的云资源管理面板 | ||
const AppName = "TDP CLoud" | ||
const AppSummary = "可以跨平台部署的云资源管理面板" | ||
|
||
const ReadmeText = ` | ||
TDP Website: https://www.opentdp.org | ||
Open Source: https://github.com/opentdp` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,77 @@ | ||
package args | ||
|
||
import ( | ||
"embed" | ||
|
||
"github.com/opentdp/go-helper/strutil" | ||
) | ||
|
||
// 调试模式 | ||
|
||
var Debug bool | ||
|
||
// 嵌入文件 | ||
|
||
var Efs *embed.FS | ||
|
||
// 数据存储 | ||
|
||
type IDataset struct { | ||
Dir string | ||
Secret string | ||
} | ||
|
||
var Dataset = IDataset{ | ||
Dir: "var", | ||
Secret: strutil.Rand(32), | ||
} | ||
|
||
// 日志参数 | ||
|
||
type ILogger struct { | ||
Dir string | ||
Level string | ||
Target string | ||
} | ||
|
||
var Logger = ILogger{ | ||
Dir: ".", | ||
Level: "info", | ||
Target: "stdout", | ||
} | ||
|
||
// 数据库参数 | ||
|
||
type IDatabase struct { | ||
Type string | ||
Host string | ||
User string | ||
Passwd string | ||
Name string | ||
Option string | ||
} | ||
|
||
var Database = IDatabase{ | ||
Type: "sqlite", | ||
Name: "server.db", | ||
} | ||
|
||
// 主节点参数 | ||
|
||
type IServer struct { | ||
Listen string | ||
JwtKey string | ||
} | ||
|
||
var Server = IServer{ | ||
Listen: ":7800", | ||
JwtKey: strutil.Rand(32), | ||
} | ||
|
||
// 子节点参数 | ||
|
||
type IWorker struct { | ||
Remote string | ||
} | ||
|
||
var Worker = IWorker{} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.