Skip to content

Commit

Permalink
Fix management-server gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
ashera96 committed Oct 11, 2023
1 parent 48febc1 commit 6ded844
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
26 changes: 13 additions & 13 deletions management-server/internal/notification/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func (s *notificationService) CreateApplication(ctx context.Context, application
UUID: application.Uuid,
Name: application.Name,
Owner: application.Owner,
Policy: application.Policy,
// Policy: application.Policy,
Attributes: application.Attributes,
//Keys: application.Keys,
Organization: application.Organization,
// Organization: application.Organization,
TimeStamp: application.TimeStamp,
IsRemoveEvent: false,
}
Expand All @@ -71,10 +71,10 @@ func (s *notificationService) UpdateApplication(ctx context.Context, application
UUID: application.Uuid,
Name: application.Name,
Owner: application.Owner,
Policy: application.Policy,
// Policy: application.Policy,
Attributes: application.Attributes,
//Keys: application.Keys,
Organization: application.Organization,
// Organization: application.Organization,
TimeStamp: application.TimeStamp,
IsRemoveEvent: false,
}
Expand All @@ -88,7 +88,7 @@ func (s *notificationService) DeleteApplication(ctx context.Context, application
var event = internal_types.ApplicationEvent{
Label: config.ReadConfigs().ManagementServer.NodeLabels[0],
UUID: application.Uuid,
Organization: application.Organization,
// Organization: application.Organization,
IsRemoveEvent: true,
}
synchronizer.AddApplicationEventsToChannel(event)
Expand All @@ -101,11 +101,11 @@ func (s *notificationService) CreateSubscription(ctx context.Context, subscripti
var event = internal_types.SubscriptionEvent{
Label: config.ReadConfigs().ManagementServer.NodeLabels[0],
UUID: subscription.Uuid,
ApplicationRef: subscription.ApplicationRef,
APIRef: subscription.ApiRef,
PolicyID: subscription.PolicyId,
// ApplicationRef: subscription.ApplicationRef,
// APIRef: subscription.ApiRef,
// PolicyID: subscription.PolicyId,
SubStatus: subscription.SubStatus,
Subscriber: subscription.Subscriber,
// Subscriber: subscription.Subscriber,
Organization: subscription.Organization,
TimeStamp: subscription.TimeStamp,
IsRemoveEvent: false,
Expand All @@ -120,11 +120,11 @@ func (s *notificationService) UpdateSubscription(ctx context.Context, subscripti
var event = internal_types.SubscriptionEvent{
Label: config.ReadConfigs().ManagementServer.NodeLabels[0],
UUID: subscription.Uuid,
ApplicationRef: subscription.ApplicationRef,
APIRef: subscription.ApiRef,
PolicyID: subscription.PolicyId,
// ApplicationRef: subscription.ApplicationRef,
// APIRef: subscription.ApiRef,
// PolicyID: subscription.PolicyId,
SubStatus: subscription.SubStatus,
Subscriber: subscription.Subscriber,
// Subscriber: subscription.Subscriber,
Organization: subscription.Organization,
TimeStamp: subscription.TimeStamp,
IsRemoveEvent: false,
Expand Down
20 changes: 10 additions & 10 deletions management-server/internal/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@ type ApplicationEvent struct {
UUID string
Name string
Owner string
Policy string
// Policy string
Attributes map[string]string
Keys []*ApplicationKey
// Keys []*ApplicationKey
Organization string
TimeStamp string
IsRemoveEvent bool
}

// ApplicationKey is a data holder for an application key
type ApplicationKey struct {
Key string
KeyManager string
}
// type ApplicationKey struct {
// Key string
// KeyManager string
// }

// SubscriptionEvent is a data holder for a subscription event
type SubscriptionEvent struct {
Label string
UUID string
ApplicationRef string
APIRef string
PolicyID string
// ApplicationRef string
// APIRef string
// PolicyID string
SubStatus string
Subscriber string
// Subscriber string
Organization string
TimeStamp string
IsRemoveEvent bool
Expand Down
28 changes: 14 additions & 14 deletions management-server/internal/xds/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,20 @@ func FeedData() {

// AddSingleApplication will update the Application specified by the UUID to the xds cache
func AddSingleApplication(label string, application internal_types.ApplicationEvent) {
appKeys := make([]*internal_application.Application_Key, len(application.Keys))
for i, key := range application.Keys {
appKeys[i] = &internal_application.Application_Key{
Key: key.Key,
KeyManager: key.KeyManager,
}
}
// appKeys := make([]*internal_application.Application_Key, len(application.Keys))
// for i, key := range application.Keys {
// appKeys[i] = &internal_application.Application_Key{
// Key: key.Key,
// KeyManager: key.KeyManager,
// }
// }
convertedApplication := &internal_application.Application{
Uuid: application.UUID,
Name: application.Name,
Policy: application.Policy,
// Policy: application.Policy,
Owner: application.Owner,
Organization: application.Organization,
Keys: appKeys,
// Organization: application.Organization,
// Keys: appKeys,
Attributes: application.Attributes,
}
logger.LoggerXds.Debugf("Converted Application: %v", convertedApplication)
Expand Down Expand Up @@ -327,12 +327,12 @@ func InitAPKMgtServer() {
func AddSingleSubscription(label string, subscription internal_types.SubscriptionEvent) {
convertedSubscription := &internal_application.Subscription{
Uuid: subscription.UUID,
ApplicationRef: subscription.ApplicationRef,
ApiRef: subscription.APIRef,
// ApplicationRef: subscription.ApplicationRef,
// ApiRef: subscription.APIRef,
SubStatus: subscription.SubStatus,
PolicyId: subscription.PolicyID,
// PolicyId: subscription.PolicyID,
Organization: subscription.Organization,
Subscriber: subscription.Subscriber,
// Subscriber: subscription.Subscriber,
TimeStamp: subscription.TimeStamp,
}
logger.LoggerXds.Debugf("Converted Subscription: %v", convertedSubscription)
Expand Down

0 comments on commit 6ded844

Please sign in to comment.