first commit

This commit is contained in:
sprov
2021-05-18 12:59:22 +08:00
parent bc6a518c9a
commit 56ed8f355c
62 changed files with 63166 additions and 0 deletions

56
config/config.go Normal file
View File

@@ -0,0 +1,56 @@
package config
import "fmt"
type LogLevel string
const (
Debug LogLevel = "debug"
Info LogLevel = "info"
Warn LogLevel = "warn"
Error LogLevel = "error"
)
func init() {
}
func GetVersion() string {
return "0.0.1"
}
func GetName() string {
return "x-ui"
}
func GetListen() string {
return ":27827"
}
func GetCertFile() string {
return ""
}
func GetKeyFile() string {
return ""
}
func GetLogLevel() LogLevel {
return Debug
}
func IsDebug() bool {
return true
}
func GetSecret() []byte {
return []byte("")
}
func GetDBPath() string {
return fmt.Sprintf("/etc/%s/%s.db", GetName(), GetName())
}
func GetBasePath() string {
return "/"
}