From 26849dbc477ad782fd44ffa54236666d118a7c5a Mon Sep 17 00:00:00 2001 From: vmilovanovicc Date: Mon, 13 Nov 2023 16:00:21 +0100 Subject: [PATCH] Addressing review comments --- cmd/gateway.go | 3 ++- internal/release/services/release/release.go | 21 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/gateway.go b/cmd/gateway.go index 101b2e0..73222d4 100644 --- a/cmd/gateway.go +++ b/cmd/gateway.go @@ -7,6 +7,7 @@ import ( "github.com/terrariumcloud/terrarium/internal/module/services/storage" "github.com/terrariumcloud/terrarium/internal/module/services/tag_manager" "github.com/terrariumcloud/terrarium/internal/module/services/version_manager" + "github.com/terrariumcloud/terrarium/internal/release/services/release" "github.com/spf13/cobra" ) @@ -25,7 +26,7 @@ func init() { gatewayCmd.Flags().StringVarP(&version_manager.VersionManagerEndpoint, "version-manager", "", version_manager.DefaultVersionManagerEndpoint, "GRPC Endpoint for Version Manager Service") gatewayCmd.Flags().StringVarP(&storage.StorageServiceEndpoint, "storage", "", storage.DefaultStorageServiceDefaultEndpoint, "GRPC Endpoint for Storage Service") gatewayCmd.Flags().StringVarP(&tag_manager.TagManagerEndpoint, "tag-manager", "", tag_manager.DefaultTagManagerEndpoint, "GRPC Endpoint for Tag Service") - //gatewayCmd.Flags().StringVarP(&release.ReleaseEndpoint, "tag", "", release.DefaultReleaseEndpoint, "GRPC Endpoint for Tag Service") + gatewayCmd.Flags().StringVarP(&release.ReleaseServiceEndpoint, "tag", "", release.DefaultReleaseServiceEndpoint, "GRPC Endpoint for Release Service") } func runGateway(cmd *cobra.Command, args []string) { diff --git a/internal/release/services/release/release.go b/internal/release/services/release/release.go index 758a212..8de7445 100644 --- a/internal/release/services/release/release.go +++ b/internal/release/services/release/release.go @@ -15,14 +15,14 @@ import ( ) const ( - DefaultReleaseTableName = "terrarium-module-releases" - //DefaultReleaseEndpoint = "release:3001" + DefaultReleaseTableName = "terrarium-releases" + DefaultReleaseServiceEndpoint = "release:3001" ) var ( ReleaseTableName = DefaultReleaseTableName ReleaseTableInitializationError = status.Error(codes.Unknown, "Failed to initialize table for releases.") - //ReleaseEndpoint = DefaultReleaseEndpoint + ReleaseServiceEndpoint = DefaultReleaseServiceEndpoint ) type ReleaseService struct { @@ -33,14 +33,13 @@ type ReleaseService struct { } type ReleaseInfo struct { - Type string `json:"type" bson:"type" dynamodbav:"type"` - Name string `json:"name" bson:"name" dynamodbav:"name"` - Version string `json:"version" bson:"version" dynamodbav:"version"` - Date string `json:"date" bson:"date" dynamodbav:"date"` - Link release.Link `json:"link" bson:"link" dynamodbav:"link"` - ShortDescription string `json:"short_description" bson:"short_description" dynamodbav:"short_description"` - CreatedOn string `json:"created_on" bson:"created_on" dynamodbav:"created_on"` - ModifiedOn string `json:"modified_on" bson:"modified_on" dynamodbav:"modified_on"` + Type string `json:"type" bson:"type" dynamodbav:"type"` + Organization string `json:"organization" bson:"organization" dynamodbav:"organization"` + Name string `json:"name" bson:"name" dynamodbav:"name"` + Version string `json:"version" bson:"version" dynamodbav:"version"` + Description string `json:"description" bson:"description" dynamodbav:"description"` + Link release.Link `json:"link" bson:"link" dynamodbav:"link"` + CreatedOn string `json:"created_on" bson:"created_on" dynamodbav:"created_on"` } // Registers ReleaseService with grpc server