light modification
This commit is contained in:
@@ -17,6 +17,15 @@ var argoType = [...]string{
|
||||
"Ti",
|
||||
}
|
||||
|
||||
// Size to string
|
||||
func (t StorageSize) String() string {
|
||||
return [...]string{"GB", "MB", "KB", "TB"}[t]
|
||||
}
|
||||
|
||||
func (t StorageSize) SizeList() []StorageSize {
|
||||
return []StorageSize{GB, MB, KB, TB}
|
||||
}
|
||||
|
||||
// New creates a new instance of the StorageResource struct
|
||||
func (dma StorageSize) ToArgo() string {
|
||||
return argoType[dma]
|
||||
@@ -39,3 +48,7 @@ const (
|
||||
func (t StorageType) String() string {
|
||||
return [...]string{"FILE", "STREAM", "API", "DATABASE", "S3", "MEMORY", "HARDWARE"}[t]
|
||||
}
|
||||
|
||||
func (t StorageType) TypeList() []StorageType {
|
||||
return []StorageType{FILE, STREAM, API, DATABASE, S3, MEMORY, HARDWARE}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user