github.com/anjalikarhana/fabric@v2.1.1+incompatible/integration/nwo/commands/configtxgen.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package commands 8 9 type OutputBlock struct { 10 ChannelID string 11 Profile string 12 ConfigPath string 13 OutputBlock string 14 } 15 16 func (o OutputBlock) SessionName() string { 17 return "configtxgen-output-block" 18 } 19 20 func (o OutputBlock) Args() []string { 21 return []string{ 22 "-channelID", o.ChannelID, 23 "-profile", o.Profile, 24 "-configPath", o.ConfigPath, 25 "-outputBlock", o.OutputBlock, 26 } 27 } 28 29 type CreateChannelTx struct { 30 ChannelID string 31 Profile string 32 ConfigPath string 33 OutputCreateChannelTx string 34 BaseProfile string 35 } 36 37 func (c CreateChannelTx) SessionName() string { 38 return "configtxgen-create-channel-tx" 39 } 40 41 func (c CreateChannelTx) Args() []string { 42 return []string{ 43 "-channelID", c.ChannelID, 44 "-profile", c.Profile, 45 "-configPath", c.ConfigPath, 46 "-outputCreateChannelTx", c.OutputCreateChannelTx, 47 "-channelCreateTxBaseProfile", c.BaseProfile, 48 } 49 } 50 51 type OutputAnchorPeersUpdate struct { 52 ChannelID string 53 Profile string 54 ConfigPath string 55 AsOrg string 56 OutputAnchorPeersUpdate string 57 } 58 59 func (o OutputAnchorPeersUpdate) SessionName() string { 60 return "configtxgen-output-anchor-peers-update" 61 } 62 63 func (o OutputAnchorPeersUpdate) Args() []string { 64 return []string{ 65 "-channelID", o.ChannelID, 66 "-profile", o.Profile, 67 "-configPath", o.ConfigPath, 68 "-asOrg", o.AsOrg, 69 "-outputAnchorPeersUpdate", o.OutputAnchorPeersUpdate, 70 } 71 } 72 73 type PrintOrg struct { 74 ConfigPath string 75 ChannelID string 76 PrintOrg string 77 } 78 79 func (p PrintOrg) SessionName() string { 80 return "configtxgen-print-org" 81 } 82 83 func (p PrintOrg) Args() []string { 84 return []string{ 85 "-configPath", p.ConfigPath, 86 "-channelID", p.ChannelID, 87 "-printOrg", p.PrintOrg, 88 } 89 }