Skip to content

Commit

Permalink
fix: change source type in messages to integration type
Browse files Browse the repository at this point in the history
  • Loading branch information
artaasadi committed Nov 3, 2024
1 parent 52aac6b commit 33e8cb7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pkg/es/messages.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package es

import (
"github.com/opengovern/og-util/pkg/integration"
"regexp"
"strings"

"github.com/opengovern/og-util/pkg/source"
)

const (
Expand All @@ -28,8 +27,8 @@ type Resource struct {
ARN string `json:"arn"`
// Description is the description of the resource based on the describe call.
Description interface{} `json:"description"`
// SourceType is the type of the source of the resource, i.e. AWS Cloud, Azure Cloud.
SourceType source.Type `json:"source_type"`
// IntegrationType is the type of the integration source of the resource, i.e. AWS Cloud, Azure Cloud.
IntegrationType integration.Type `json:"integration_type"`
// ResourceType is the type of the resource.
ResourceType string `json:"resource_type"`
// ResourceJobID is the DescribeResourceJob ID that described this resource
Expand Down Expand Up @@ -69,8 +68,8 @@ type LookupResource struct {
ResourceID string `json:"resource_id"`
// Name is the name of the resource.
Name string `json:"name"`
// SourceType is the type of the source of the resource, i.e. AWS Cloud, Azure Cloud.
SourceType source.Type `json:"source_type"`
// IntegrationType is the type of the integration source of the resource, i.e. AWS Cloud, Azure Cloud.
IntegrationType integration.Type `json:"integration_type"`
// ResourceType is the type of the resource.
ResourceType string `json:"resource_type"`
// ServiceName is the service of the resource.
Expand Down Expand Up @@ -101,7 +100,7 @@ func (r LookupResource) KeysAndIndex() ([]string, string) {
return []string{
r.ResourceID,
r.SourceID,
string(r.SourceType),
string(r.IntegrationType),
strings.ToLower(r.ResourceType),
}, InventorySummaryIndex
}
Expand Down

0 comments on commit 33e8cb7

Please sign in to comment.