fabric

package
v0.0.0-...-1a1319b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRYPTO_SM    = "SM2"
	CRYPTO_ECDSA = "ECDSA"
)

Variables

This section is empty.

Functions

func Extend

func Extend(jsonConfig string, srcDir string, cryptoType string) bool

func Generate

func Generate(jsonConfig string, outDir string, cryptoType string) bool

func JsonToYaml

func JsonToYaml(jsonString string) (bool, string)

Types

type Config

type Config struct {
	OrdererOrgs []OrgSpec `yaml:"OrdererOrgs"`
	PeerOrgs    []OrgSpec `yaml:"PeerOrgs"`
}

type HostnameData

type HostnameData struct {
	Prefix string
	Index  int
	Domain string
}

type NodeSpec

type NodeSpec struct {
	Hostname           string   `yaml:"Hostname"`
	CommonName         string   `yaml:"CommonName"`
	Country            string   `yaml:"Country"`
	Province           string   `yaml:"Province"`
	Locality           string   `yaml:"Locality"`
	OrganizationalUnit string   `yaml:"OrganizationalUnit"`
	StreetAddress      string   `yaml:"StreetAddress"`
	PostalCode         string   `yaml:"PostalCode"`
	SANS               []string `yaml:"SANS"`
}

type NodeTemplate

type NodeTemplate struct {
	Count    int      `yaml:"Count"`
	Start    int      `yaml:"Start"`
	Hostname string   `yaml:"Hostname"`
	SANS     []string `yaml:"SANS"`
}

type OrgSpec

type OrgSpec struct {
	Name          string       `yaml:"Name"`
	Domain        string       `yaml:"Domain"`
	EnableNodeOUs bool         `yaml:"EnableNodeOUs"`
	CA            NodeSpec     `yaml:"CA"`
	Template      NodeTemplate `yaml:"Template"`
	Specs         []NodeSpec   `yaml:"Specs"`
	Users         UsersSpec    `yaml:"Users"`
}

type SpecData

type SpecData struct {
	Hostname   string
	Domain     string
	CommonName string
}

type UsersSpec

type UsersSpec struct {
	Count int `yaml:"Count"`
}

Directories

Path Synopsis
gopkg.in
alecthomas/kingpin.v2
Package kingpin provides command line interfaces like this:
Package kingpin provides command line interfaces like this:
alecthomas/template
Package template implements data-driven templates for generating textual output.
Package template implements data-driven templates for generating textual output.
alecthomas/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
Package parse builds parse trees for templates as defined by text/template and html/template.
alecthomas/units
Package units provides helpful unit multipliers and functions for Go.
Package units provides helpful unit multipliers and functions for Go.
yaml.v2
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL