refactor(RemoteStoage): Added String() func
This commit is contained in:
parent
922255624d
commit
36175632e0
1 changed files with 18 additions and 3 deletions
|
|
@ -1,9 +1,24 @@
|
||||||
package SQL
|
package SQL
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
type RemoteStorageType int64
|
type RemoteStorageType int64
|
||||||
|
|
||||||
const(
|
const (
|
||||||
REMOTE_AZURE_FILE = 1
|
REMOTE_AZURE_FILE = 1
|
||||||
REMOTE_AZURE_BLOB = 2
|
REMOTE_AZURE_BLOB = 2
|
||||||
REMOTE_NONE = 3
|
REMOTE_NONE = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (e RemoteStorageType) String() string {
|
||||||
|
switch e {
|
||||||
|
case REMOTE_AZURE_FILE:
|
||||||
|
return "AZURE-FILE"
|
||||||
|
case REMOTE_AZURE_BLOB:
|
||||||
|
return "AZURE-BLOB"
|
||||||
|
case REMOTE_NONE:
|
||||||
|
return "NONE"
|
||||||
|
default:
|
||||||
|
return fmt.Sprintf("%d", e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Reference in a new issue