File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ require (
1111 github.com/hashicorp/go-hclog v1.6.3
1212 github.com/hashicorp/go-plugin v1.6.0
1313 github.com/nats-io/nats.go v1.36.0
14- github.com/opengovern/og-util v1.11 .0
14+ github.com/opengovern/og-util v1.12 .0
1515 github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7
1616 github.com/spf13/cobra v1.8.1
1717 github.com/turbot/steampipe-plugin-sdk/v5 v5.10.4
Original file line number Diff line number Diff line change @@ -717,8 +717,8 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
717717github.com/oklog/run v1.1.0 /go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU =
718718github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec =
719719github.com/olekukonko/tablewriter v0.0.5 /go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY =
720- github.com/opengovern/og-util v1.11 .0 h1:Amct1bHXDF5TBnymstPUEWpWaC+Lji5dnJ8Mr6fkbMA =
721- github.com/opengovern/og-util v1.11 .0 /go.mod h1:9uNpGalixRoQkUzPPBdT+JG1epg8FTRx/qmkfTyUZHE =
720+ github.com/opengovern/og-util v1.12 .0 h1:D/1khsUlO2LZGBN+YrSbupjJ5MxsZeg7z9Mg+o9I3eU =
721+ github.com/opengovern/og-util v1.12 .0 /go.mod h1:9uNpGalixRoQkUzPPBdT+JG1epg8FTRx/qmkfTyUZHE =
722722github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ =
723723github.com/opensearch-project/opensearch-go/v2 v2.3.0 /go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8 =
724724github.com/pganalyze/pg_query_go/v4 v4.2.3 h1:cNLqyiVMasV7YGWyYV+fkXyHp32gDfXVNCqoHztEGNk =
Original file line number Diff line number Diff line change @@ -55,18 +55,22 @@ func (i *Integration) DiscoverIntegrations(jsonData []byte) ([]integration.Integ
5555 return integrations , nil
5656}
5757
58- func (i * Integration ) GetResourceTypesByLabels (labels map [string ]string ) (map [ string ]interfaces.ResourceTypeConfiguration , error ) {
59- resourceTypesMap := make ( map [ string ]interfaces.ResourceTypeConfiguration )
58+ func (i * Integration ) GetResourceTypesByLabels (labels map [string ]string ) ([ ]interfaces.ResourceTypeConfiguration , error ) {
59+ var resourceTypesMap [ ]interfaces.ResourceTypeConfiguration
6060 for _ , resourceType := range maps .ResourceTypesList {
61+ var resource interfaces.ResourceTypeConfiguration
6162 if v , ok := maps .ResourceTypeConfigs [resourceType ]; ok {
62- resourceTypesMap [resourceType ] = * v
63- } else {
64- resourceTypesMap [resourceType ] = interfaces.ResourceTypeConfiguration {}
65- }
63+ resource .Description = v .Description
64+ resource .Params = v .Params
65+ resource .Name = v .Name
66+ resource .IntegrationType = v .IntegrationType
67+ resource .Table = maps .ResourceTypesToTables [v .Name ]
68+ resourceTypesMap = append (resourceTypesMap , resource )
69+
70+ }
6671 }
6772 return resourceTypesMap , nil
6873}
69-
7074func (i * Integration ) GetResourceTypeFromTableName (tableName string ) (string , error ) {
7175 if v , ok := maps .TablesToResourceTypes [tableName ]; ok {
7276 return v , nil
You can’t perform that action at this time.
0 commit comments