25 lines
398 B
Go
25 lines
398 B
Go
package domain
|
|
|
|
import "fmt"
|
|
|
|
type StorageType int
|
|
|
|
const (
|
|
StorageTypeFS StorageType = iota
|
|
StorageTypeS3
|
|
)
|
|
|
|
const (
|
|
fslinkTemplate = "fs:///%s"
|
|
)
|
|
|
|
func GetFSConverter(storageType StorageType) func(fslink string) string {
|
|
switch storageType {
|
|
default:
|
|
// TODO s3 converter
|
|
return func(fslink string) string {
|
|
return fmt.Sprintf(fslinkTemplate, fslink)
|
|
}
|
|
}
|
|
}
|