Skip to content

Commit

Permalink
feat: add table tp resource types
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Jan 24, 2025
1 parent c16d787 commit 0529dca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/integration/interfaces/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type CloudQLColumn struct {
type IntegrationType interface {
GetIntegrationType() (integration.Type, error)
GetConfiguration() (IntegrationConfiguration, error)
GetResourceTypesByLabels(map[string]string) (map[string]ResourceTypeConfiguration, error)
GetResourceTypesByLabels(map[string]string) ([]ResourceTypeConfiguration, error)
HealthCheck(jsonData []byte, providerId string, labels map[string]string, annotations map[string]string) (bool, error)
DiscoverIntegrations(jsonData []byte) ([]integration.Integration, error)
GetResourceTypeFromTableName(tableName string) (string, error)
Expand Down Expand Up @@ -70,8 +70,8 @@ func (i *IntegrationTypeRPC) GetConfiguration() (IntegrationConfiguration, error
return configuration, nil
}

func (i *IntegrationTypeRPC) GetResourceTypesByLabels(labels map[string]string) (map[string]ResourceTypeConfiguration, error) {
var resourceTypes map[string]ResourceTypeConfiguration
func (i *IntegrationTypeRPC) GetResourceTypesByLabels(labels map[string]string) ([]ResourceTypeConfiguration, error) {
var resourceTypes []ResourceTypeConfiguration
err := i.client.Call("Plugin.GetResourceTypesByLabels", labels, &resourceTypes)
if err != nil {
return nil, err
Expand Down Expand Up @@ -144,7 +144,7 @@ func (i *IntegrationTypeRPCServer) GetConfiguration(_ struct{}, configuration *I
return err
}

func (i *IntegrationTypeRPCServer) GetResourceTypesByLabels(labels map[string]string, resourceTypes *map[string]ResourceTypeConfiguration) error {
func (i *IntegrationTypeRPCServer) GetResourceTypesByLabels(labels map[string]string, resourceTypes *[]ResourceTypeConfiguration) error {
var err error
*resourceTypes, err = i.Impl.GetResourceTypesByLabels(labels)
return err
Expand Down
1 change: 1 addition & 0 deletions pkg/integration/interfaces/resource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type ResourceTypeConfiguration struct {
IntegrationType integration.Type `json:"integration_type"`
Description string `json:"description"`
Params []Param `json:"params"`
Table string `json:"table"`
}

type Param struct {
Expand Down

0 comments on commit 0529dca

Please sign in to comment.