Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions core/asset/type.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package asset

const (
TypeTable Type = "table"
TypeJob Type = "job"
TypeDashboard Type = "dashboard"
TypeTopic Type = "topic"
TypeTable Type = "table"
TypeJob Type = "job"
TypeDashboard Type = "dashboard"
TypeTopic Type = "topic"
TypeFeatureTable Type = "feature_table"
)

// AllSupportedTypes holds a list of all supported types struct
Expand All @@ -13,6 +14,7 @@ var AllSupportedTypes = []Type{
TypeJob,
TypeDashboard,
TypeTopic,
TypeFeatureTable,
}

// Type specifies a supported type name
Expand All @@ -26,7 +28,7 @@ func (t Type) String() string {
// IsValid will validate whether the typename is valid or not
func (t Type) IsValid() bool {
switch t {
case TypeTable, TypeJob, TypeDashboard, TypeTopic:
case TypeTable, TypeJob, TypeDashboard, TypeTopic, TypeFeatureTable:
return true
}
return false
Expand Down
4 changes: 4 additions & 0 deletions internal/server/v1beta1/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ func TestGetTypes(t *testing.T) {
Name: "topic",
Count: 30,
},
{
Name: "feature_table",
Count: 0,
},
},
}

Expand Down