init
This commit is contained in:
35
pkg/constant/constant.go
Normal file
35
pkg/constant/constant.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package constant
|
||||
|
||||
const ProxyGitUrl = "https://git.kain.io.vn/api/v1/repos/Firefly-Shelter/Firefly_Proxy/releases"
|
||||
const ServerGitUrl = "https://git.kain.io.vn/api/v1/repos/Firefly-Shelter/FireflyGo_Local_Archive/releases"
|
||||
const ServerStorageUrl = "./server"
|
||||
const ProxyStorageUrl = "./proxy"
|
||||
const ServerZipFile = "prebuild_win_x86.zip"
|
||||
const ProxyZipFile = "64bit.zip"
|
||||
const TempUrl = "./temp"
|
||||
|
||||
type ToolFile string
|
||||
|
||||
const (
|
||||
Tool7zaExe ToolFile = "bin/7za.exe"
|
||||
Tool7zaDLL ToolFile = "bin/7za.dll"
|
||||
Tool7zxaDLL ToolFile = "bin/7zxa.dll"
|
||||
ToolHPatchzExe ToolFile = "bin/hpatchz.exe"
|
||||
ToolHDiffzExe ToolFile = "bin/hdiffz.exe"
|
||||
)
|
||||
|
||||
var RequiredFiles = map[ToolFile]string{
|
||||
Tool7zaExe: "assets/7zip/7za.exe",
|
||||
Tool7zaDLL: "assets/7zip/7za.dll",
|
||||
Tool7zxaDLL: "assets/7zip/7zxa.dll",
|
||||
ToolHPatchzExe: "assets/HDiffPatch/hpatchz.exe",
|
||||
ToolHDiffzExe: "assets/HDiffPatch/hdiffz.exe",
|
||||
}
|
||||
|
||||
func (t ToolFile) GetEmbedPath() string {
|
||||
return RequiredFiles[t]
|
||||
}
|
||||
|
||||
func (t ToolFile) String() string {
|
||||
return string(t)
|
||||
}
|
||||
Reference in New Issue
Block a user