From bd549d7c00bddb0f8753c07a2b81ef818b0db5cf Mon Sep 17 00:00:00 2001 From: Jason Yellick Date: Tue, 7 Feb 2017 16:28:28 -0500 Subject: [PATCH] [FAB-2107] Define application config schema https://jira.hyperledger.org/browse/FAB-2107 Initial pass defining the structures which are currently populated into the application config. Change-Id: Ica72acd4ac95a7821f077e0e222b79fd5685d396 Signed-off-by: Jason Yellick --- .../handlers/application/sharedconfig.go | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/common/configtx/handlers/application/sharedconfig.go b/common/configtx/handlers/application/sharedconfig.go index 6ecf2db722a..81eacac0274 100644 --- a/common/configtx/handlers/application/sharedconfig.go +++ b/common/configtx/handlers/application/sharedconfig.go @@ -26,6 +26,28 @@ import ( "github.com/op/go-logging" ) +var orgSchema = &cb.ConfigGroupSchema{ + Groups: map[string]*cb.ConfigGroupSchema{}, + Values: map[string]*cb.ConfigValueSchema{ + "MSP": nil, // TODO, consolidate into a constant once common org code exists + }, + Policies: map[string]*cb.ConfigPolicySchema{ + // TODO, set appropriately once hierarchical policies are implemented + }, +} + +var Schema = &cb.ConfigGroupSchema{ + Groups: map[string]*cb.ConfigGroupSchema{ + "": orgSchema, + }, + Values: map[string]*cb.ConfigValueSchema{ + AnchorPeersKey: nil, + }, + Policies: map[string]*cb.ConfigPolicySchema{ + // TODO, set appropriately once hierarchical policies are implemented + }, +} + // Peer config keys const ( // AnchorPeersKey is the cb.ConfigItem type key name for the AnchorPeers message