Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
chore(go-utils): Removed deprecated subscription from uniform (#474)
Browse files Browse the repository at this point in the history
Signed-off-by: RealAnna <[email protected]>
  • Loading branch information
RealAnna authored Jun 7, 2022
1 parent a3c50ce commit 647fbac
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions pkg/api/models/uniform.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand All @@ -32,29 +29,13 @@ 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"`
Event string `json:"event" bson:"event"`
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"`
Expand Down

0 comments on commit 647fbac

Please sign in to comment.