From 33e8cb71035303905c9e777331add71ffcf53066 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Sun, 3 Nov 2024 11:46:55 +0100 Subject: [PATCH] fix: change source type in messages to integration type --- pkg/es/messages.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/es/messages.go b/pkg/es/messages.go index c57be5b..ce41b0d 100644 --- a/pkg/es/messages.go +++ b/pkg/es/messages.go @@ -1,10 +1,9 @@ package es import ( + "github.com/opengovern/og-util/pkg/integration" "regexp" "strings" - - "github.com/opengovern/og-util/pkg/source" ) const ( @@ -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 @@ -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. @@ -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 }