Skip to content

Commit

Permalink
feat: allow feature_table as an asset type (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-suhas authored Oct 27, 2022
1 parent 414593a commit b18d570
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
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

0 comments on commit b18d570

Please sign in to comment.