Skip to content

Commit

Permalink
feat: make config.properties use filter (#375)
Browse files Browse the repository at this point in the history
* feat: make config.properties use filter

* chore: just copy the links of the property
  • Loading branch information
adityathebe authored Jan 31, 2024
1 parent 3fe69e4 commit a0e238f
Show file tree
Hide file tree
Showing 15 changed files with 619 additions and 617 deletions.
8 changes: 7 additions & 1 deletion api/v1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ func (t Transform) String() string {
return s
}

type ConfigProperties struct {
types.Property `yaml:",inline" json:",inline"`

Filter string `json:"filter,omitempty"`
}

type BaseScraper struct {
// A static value or JSONPath expression to use as the ID for the resource.
ID string `json:"id,omitempty"`
Expand Down Expand Up @@ -157,7 +163,7 @@ type BaseScraper struct {

// Properties are custom templatable properties for the scraped config items
// grouped by the config type.
Properties map[string]types.Properties `json:"properties,omitempty" template:"true"`
Properties []ConfigProperties `json:"properties,omitempty" template:"true"`
}

func (base BaseScraper) String() string {
Expand Down
36 changes: 19 additions & 17 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a0e238f

Please sign in to comment.