Skip to content

Commit

Permalink
Addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vmilovanovicc committed Nov 13, 2023
1 parent bad1709 commit 26849db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
3 changes: 2 additions & 1 deletion cmd/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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) {
Expand Down
21 changes: 10 additions & 11 deletions internal/release/services/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 26849db

Please sign in to comment.