cloud tier: support for Alibaba Cloud OSS (#6466)

This commit is contained in:
ludwigxia
2025-01-22 16:48:55 +08:00
committed by GitHub
parent ca4dca14d8
commit 5452405a81
3 changed files with 22 additions and 5 deletions

View File

@@ -28,6 +28,18 @@ func ParseUint64(text string, defaultValue uint64) uint64 {
return count
}
func ParseBool(s string, defaultValue bool) bool {
value, err := strconv.ParseBool(s)
if err != nil {
return defaultValue
}
return value
}
func BoolToString(b bool) string {
return strconv.FormatBool(b)
}
func ParseFilerUrl(entryPath string) (filerServer string, filerPort int64, path string, err error) {
if !strings.HasPrefix(entryPath, "http://") && !strings.HasPrefix(entryPath, "https://") {
entryPath = "http://" + entryPath