github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/integration/nwo/template/crypto_template.go (about) 1 /* 2 Copyright hechain. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package template 8 9 const DefaultCrypto = `--- 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 55 const OrgUpdateCryptoTemplate = `--- 56 {{ with $w := . -}} 57 PeerOrgs:{{ range .PeerOrgs }} 58 - Name: {{ .Name }} 59 Domain: {{ .Domain }} 60 EnableNodeOUs: {{ .EnableNodeOUs }} 61 {{- if .CA }} 62 CA:{{ if .CA.Hostname }} 63 hostname: {{ .CA.Hostname }} 64 SANS: 65 - localhost 66 - 127.0.0.1 67 - ::1 68 {{- end }} 69 {{- end }} 70 Users: 71 Count: {{ .Users }} 72 Specs:{{ range $w.PeersInOrg .Name }} 73 - Hostname: {{ .Name }} 74 SANS: 75 - localhost 76 - 127.0.0.1 77 - ::1 78 {{- end }} 79 {{- end }} 80 {{ end }} 81 `