light modification
This commit is contained in:
@@ -9,15 +9,6 @@ import (
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
)
|
||||
|
||||
// enum of public private or licenced data
|
||||
type DataLicense int
|
||||
|
||||
const (
|
||||
PUBLIC DataLicense = iota
|
||||
PRIVATE
|
||||
LICENCED
|
||||
)
|
||||
|
||||
/*
|
||||
* DataResource is a struct that represents a data resource
|
||||
* it defines the resource data
|
||||
@@ -70,6 +61,14 @@ const (
|
||||
PER_KB_DOWNLOADED
|
||||
)
|
||||
|
||||
func (t DataResourcePricingStrategy) String() string {
|
||||
return [...]string{"PER DOWNLOAD", "PER TB DOWNLOADED", "PER GB DOWNLOADED", "PER MB DOWNLOADED", "PER KB DOWNLOADED"}[t]
|
||||
}
|
||||
|
||||
func DataResourcePricingStrategyList() []DataResourcePricingStrategy {
|
||||
return []DataResourcePricingStrategy{PER_DOWNLOAD, PER_TB_DOWNLOADED, PER_GB_DOWNLOADED, PER_MB_DOWNLOADED, PER_KB_DOWNLOADED}
|
||||
}
|
||||
|
||||
func ToDataResourcePricingStrategy(i int) DataResourcePricingStrategy {
|
||||
return DataResourcePricingStrategy(i)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user