A question refers to the comment ! And if not Ooopsy
This commit is contained in:
@@ -2,6 +2,7 @@ package utils
|
||||
|
||||
type DataType int
|
||||
|
||||
// DataType - Enum for the different types of resources in db accessible from the outside
|
||||
const (
|
||||
INVALID DataType = iota
|
||||
DATA_RESOURCE
|
||||
@@ -19,6 +20,7 @@ const (
|
||||
BOOKING
|
||||
)
|
||||
|
||||
// Bind the standard API name to the data type
|
||||
var DefaultAPI = [...]string{
|
||||
"",
|
||||
"oc-catalog",
|
||||
@@ -36,6 +38,7 @@ var DefaultAPI = [...]string{
|
||||
"oc-datacenter",
|
||||
}
|
||||
|
||||
// Bind the standard data name to the data type
|
||||
var Str = [...]string{
|
||||
"invalid",
|
||||
"data_resource",
|
||||
@@ -57,11 +60,11 @@ func FromInt(i int) string {
|
||||
return Str[i]
|
||||
}
|
||||
|
||||
func (d DataType) API() string {
|
||||
func (d DataType) API() string { // API - Returns the API name of the data type
|
||||
return DefaultAPI[d]
|
||||
}
|
||||
|
||||
func (d DataType) String() string {
|
||||
func (d DataType) String() string { // String - Returns the string name of the data type
|
||||
return Str[d]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user