From 0f4adeea86bebbe2b6bda36abd6ed5d33b05f674 Mon Sep 17 00:00:00 2001 From: plm Date: Wed, 8 Jan 2025 16:55:42 +0100 Subject: [PATCH 1/2] Same prefix for all builtin microservices in opencloud --- config/conf_loader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/conf_loader.go b/config/conf_loader.go index 5494e3d..7c3bce1 100644 --- a/config/conf_loader.go +++ b/config/conf_loader.go @@ -26,7 +26,7 @@ import ( func GetConfLoader() *onion.Onion { logger := zerolog.New(os.Stdout).With().Timestamp().Logger() AppName := GetAppName() - EnvPrefix := strings.ToUpper(AppName[0:2]+AppName[3:]) + "_" + EnvPrefix := "OC_" defaultConfigFile := "/etc/oc/" + AppName[3:] + ".json" localConfigFile := "./" + AppName[3:] + ".json" var configFile string From fd1c579ec418387a6a2cbf052a9c18dc51ef8bd7 Mon Sep 17 00:00:00 2001 From: plm Date: Fri, 10 Jan 2025 17:39:58 +0100 Subject: [PATCH 2/2] Removing required field on PeerId, see #7 --- models/resource_model/resource_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/resource_model/resource_model.go b/models/resource_model/resource_model.go index 63bf0b6..9255411 100644 --- a/models/resource_model/resource_model.go +++ b/models/resource_model/resource_model.go @@ -25,7 +25,7 @@ type AbstractResource struct { Owner string `json:"owner,omitempty" bson:"owner,omitempty" validate:"required"` // Owner is the owner of the resource OwnerLogo string `json:"owner_logo,omitempty" bson:"owner_logo,omitempty"` // OwnerLogo is the owner logo of the resource SourceUrl string `json:"source_url,omitempty" bson:"source_url,omitempty" validate:"required"` // SourceUrl is the source URL of the resource - PeerID string `json:"peer_id,omitempty" bson:"peer_id,omitempty" validate:"required"` // PeerID is the ID of the peer getting this resource + PeerID string `json:"peer_id,omitempty" bson:"peer_id,omitempty"` // PeerID is the ID of the peer getting this resource Price string `json:"price,omitempty" bson:"price,omitempty"` // Price is the price of access to the resource License string `json:"license,omitempty" bson:"license,omitempty"` // License is the license of the resource ResourceModel *ResourceModel `json:"resource_model,omitempty" bson:"resource_model,omitempty"` // ResourceModel is the model of the resource