cmd

package
v0.2.0-develop.76 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Subst

func Subst(path string) string

Subst replaces instances of '${VARNAME}' (eg ${GOPATH}) with the variable. Variables names that are not set by the SDK are replaced with the environment variable.

Types

type CACert

type CACert struct {
	PEM  string `json:"pem,omitempty" yaml:"-"`
	Path string `json:"-" yaml:"path,omitempty"`
}

CACert defines attributes of a CA certificate

type CAConfig

type CAConfig struct {
	URL        string  `json:"url" yaml:"url"`
	CAName     string  `json:"caName" yaml:"caName"`
	TLSCACerts *CACert `json:"tlsCACerts" yaml:"tlsCACerts"`
}

CAConfig defines attributes of a fabric CA server

type ChannelConfig

type ChannelConfig struct {
	Peers map[string]*PeerRoles `json:"-" yaml:"peers,omitempty"`
}

ChannelConfig defines attributes of a channel

type ClientConfig

type ClientConfig struct {
	Organization string        `json:"organization" yaml:"organization"`
	CryptoConfig *CryptoConfig `json:"-" yaml:"cryptoconfig,omitempty"`
}

ClientConfig defines attributes of a fabric client

type ConnectionConfig

type ConnectionConfig struct {
	Name                   string                         `json:"name" yaml:"name"`
	Description            string                         `json:"description" yaml:"description"`
	Version                string                         `json:"version" yaml:"version"`
	Client                 *ClientConfig                  `json:"client" yaml:"client"`
	Channels               map[string]*ChannelConfig      `json:"-" yaml:"channels,omitempty"`
	Organizations          map[string]*OrganizationConfig `json:"organizations" yaml:"organizations"`
	Orderers               map[string]*OrdererConfig      `json:"orderers" yaml:"orderers"`
	Peers                  map[string]*PeerConfig         `json:"peers" yaml:"peers"`
	CertificateAuthorities map[string]*CAConfig           `json:"certificateAuthorities" yaml:"certificateAuthorities"`
}

ConnectionConfig defines attributes of fabric connection file exported from IBM Blockchain Platform

type Contract

type Contract struct {
	Name         string                  `json:"name"`
	Transactions map[string]*Transaction `json:"transactions"`
}

Contract describes json schema of a contract

type CryptoConfig

type CryptoConfig struct {
	Path string `json:"-" yaml:"path,omitempty"`
}

CryptoConfig defines attributes of the client crypto root

type GRPCOpt

type GRPCOpt struct {
	SSLTargetNameOverride string `json:"ssl-target-name-override" yaml:"ssl-target-name-override"`
}

GRPCOpt defines attributes of GRPC options

type Info

type Info struct {
	Title   string `json:"title"`
	Version string `json:"version"`
}

Info describes metadata info

type Metadata

type Metadata struct {
	Schema     string                 `json:"$schema"`
	Info       Info                   `json:"info"`
	Contract   *Contract              `json:"contract"`
	Components map[string]SchemaValue `json:"components,omitempty"`
}

Metadata describes smart contracts of an app

type OrdererConfig

type OrdererConfig struct {
	URL        string  `json:"url" yaml:"url"`
	TLSCACerts *CACert `json:"tlsCACerts" yaml:"tlsCACerts"`
}

OrdererConfig defines attributes of a fabric orderer

type OrganizationConfig

type OrganizationConfig struct {
	MSPID                  string   `json:"mspid" yaml:"mspid"`
	CryptoPath             string   `json:"-" yaml:"cryptoPath,omitempty"`
	Peers                  []string `json:"peers" yaml:"peers"`
	CertificateAuthorities []string `json:"certificateAuthorities,omitempty" yaml:"certificateAuthorities,omitempty"`
}

OrganizationConfig defines attributes of a fabric msp

type PeerConfig

type PeerConfig struct {
	URL         string   `json:"url" yaml:"url"`
	TLSCACerts  *CACert  `json:"tlsCACerts" yaml:"tlsCACerts"`
	GRPCOptions *GRPCOpt `json:"grpcOptions" yaml:"grpcOptions"`
}

PeerConfig defines attriubtes of a fabric peer

type PeerRoles

type PeerRoles struct {
	EndorsingPeer  bool `json:"-" yaml:"endorsingPeer"`
	ChaincodeQuery bool `json:"-" yaml:"chaincodeQuery"`
	LedgerQuery    bool `json:"-" yaml:"ledgerQuery"`
	EventSource    bool `json:"-" yaml:"eventSource"`
}

PeerRoles defines roles of a peer for a channel

type SchemaValue

type SchemaValue struct {
	Ref        string          `json:"$id,omitempty"`
	Type       string          `json:"type"`
	Properties json.RawMessage `json:"properties,omitempty"`
	Items      json.RawMessage `json:"items,omitempty"`
}

SchemaValue describes json schema of a parameter value

type Transaction

type Transaction struct {
	Name        string          `json:"name,omitempty"`
	Description string          `json:"description,omitempty"`
	Operation   string          `json:"operation,omitempty"`
	Parameters  json.RawMessage `json:"parameters,omitempty"`
	Transient   json.RawMessage `json:"transient,omitempty"`
	Returns     json.RawMessage `json:"returns,omitempty"`
}

Transaction describes data schemas in metadata of a transaction

Jump to

Keyboard shortcuts

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