github.com/suchongming/fabric@v2.1.1+incompatible/integration/nwo/crypto_template.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package nwo 8 9 const DefaultCryptoTemplate = `--- 10 {{ with $w := . -}} 11 OrdererOrgs:{{ range .OrdererOrgs }} 12 - Name: {{ .Name }} 13 Domain: {{ .Domain }} 14 EnableNodeOUs: {{ .EnableNodeOUs }} 15 {{- if .CA }} 16 CA:{{ if .CA.Hostname }} 17 Hostname: {{ .CA.Hostname }} 18 {{- end -}} 19 {{- end }} 20 Specs:{{ range $w.OrderersInOrg .Name }} 21 - Hostname: {{ .Name }} 22 SANS: 23 - localhost 24 - 127.0.0.1 25 - ::1 26 {{- end }} 27 {{- end }} 28 29 PeerOrgs:{{ range .PeerOrgs }} 30 - Name: {{ .Name }} 31 Domain: {{ .Domain }} 32 EnableNodeOUs: {{ .EnableNodeOUs }} 33 {{- if .CA }} 34 CA:{{ if .CA.Hostname }} 35 hostname: {{ .CA.Hostname }} 36 SANS: 37 - localhost 38 - 127.0.0.1 39 - ::1 40 {{- end }} 41 {{- end }} 42 Users: 43 Count: {{ .Users }} 44 Specs:{{ range $w.PeersInOrg .Name }} 45 - Hostname: {{ .Name }} 46 SANS: 47 - localhost 48 - 127.0.0.1 49 - ::1 50 {{- end }} 51 {{- end }} 52 {{- end }} 53 ` 54 const OrgUpdateCryptoTemplate = `--- 55 {{ with $w := . -}} 56 PeerOrgs:{{ range .PeerOrgs }} 57 - Name: {{ .Name }} 58 Domain: {{ .Domain }} 59 EnableNodeOUs: {{ .EnableNodeOUs }} 60 {{- if .CA }} 61 CA:{{ if .CA.Hostname }} 62 hostname: {{ .CA.Hostname }} 63 SANS: 64 - localhost 65 - 127.0.0.1 66 - ::1 67 {{- end }} 68 {{- end }} 69 Users: 70 Count: {{ .Users }} 71 Specs:{{ range $w.PeersInOrg .Name }} 72 - Hostname: {{ .Name }} 73 SANS: 74 - localhost 75 - 127.0.0.1 76 - ::1 77 {{- end }} 78 {{- end }} 79 {{ end }} 80 `