From 2d9936ac7502cb5f5c80e97839389263433c48ff Mon Sep 17 00:00:00 2001 From: RealAnna Date: Tue, 7 Jun 2022 08:50:16 +0200 Subject: [PATCH] chore(go-utils): Removed deprecated subscription from uniform Signed-off-by: RealAnna --- pkg/api/models/uniform.go | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/pkg/api/models/uniform.go b/pkg/api/models/uniform.go index 7cede21b..575cd5b8 100644 --- a/pkg/api/models/uniform.go +++ b/pkg/api/models/uniform.go @@ -12,12 +12,9 @@ import ( // and contains the name, id and subscription data as well as other information // needed to register a Keptn service to the control plane type Integration struct { - ID string `json:"id" bson:"_id"` - Name string `json:"name" bson:"name"` - MetaData MetaData `json:"metadata" bson:"metadata"` - // Deprecated: for backwards compatibility Subscription is populated - // but new code shall use Subscriptions - Subscription Subscription `json:"subscription" bson:"subscription"` + ID string `json:"id" bson:"_id"` + Name string `json:"name" bson:"name"` + MetaData MetaData `json:"metadata" bson:"metadata"` Subscriptions []EventSubscription `json:"subscriptions" bson:"subscriptions"` } @@ -32,14 +29,6 @@ type MetaData struct { LastSeen time.Time `json:"lastseen" bson:"lastseen"` } -// Subscription describes to what events the Keptn service is subscribed to -// Deprecated -type Subscription struct { - Topics []string `json:"topics" bson:"topics"` - Status string `json:"status" bson:"status"` - Filter SubscriptionFilter `json:"filter" bson:"filter"` -} - // EventSubscription describes to what events the Keptn service is subscribed to type EventSubscription struct { ID string `json:"id" bson:"id"` @@ -47,14 +36,6 @@ type EventSubscription struct { Filter EventSubscriptionFilter `json:"filter" bson:"filter"` } -// SubscriptionFilter is used to filter subscriptions by project stage or service -// Deprecated -type SubscriptionFilter struct { - Project string `json:"project" bson:"project"` - Stage string `json:"stage" bson:"stage"` - Service string `json:"service" bson:"service"` -} - // EventSubscriptionFilter is used to filter subscriptions by projects stages and/or services type EventSubscriptionFilter struct { Projects []string `json:"projects" bson:"projects"`