entity

package
v0.0.0-...-8a61662 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: Apache-2.0 Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ALLINFO = iota
	OUTINFO
	ERRINFO
)

Variables

View Source
var (
	OrdererDir = filepath.Join(configDir, "orderer")
)

Functions

func ExecChainCode

func ExecChainCode(cmdInfo map[string]string) string

func ExecChannel

func ExecChannel(cmdInfo map[string]string) string

func ExecOrderer

func ExecOrderer(cmdInfo map[string]string) string

func ExecPeer

func ExecPeer(cmdInfo map[string]string) string

func GetCA

func GetCA(commonName string, organization Organization) (*ca.CA, string, error)

func GetEntityInstance

func GetEntityInstance(name string) interface{}

func Init

func Init()

func LoadSigner

func LoadSigner(rawKey string) (bccsp.Key, crypto.Signer, error)

func MapToEntity

func MapToEntity(i interface{}, entityName string) interface{}

func Path

func Path(paths ...string) string

func Seek

func Seek(cmdInfo map[string]string) string

func SimpleWrite

func SimpleWrite(path string, fileName string, b []byte) error

func WindowsBin

func WindowsBin(bin string) string

Types

type Action

type Action interface {
	Create() error
}

type CMD

type CMD interface {
	Exec(map[string]string) string
}

type ChainCode

type ChainCode struct {
	Name     string
	Lang     string
	Version  string
	Path     string
	PeerName string
	Init     string
	Invoke   string
	Query    string
	State    string
}

func (*ChainCode) Exec

func (o *ChainCode) Exec(cmdInfo map[string]string) string

func (*ChainCode) GetEntity

func (o *ChainCode) GetEntity() error

type Channel

type Channel struct {
	Name            string
	Consortium      string
	Desc            string
	OrdererName     string
	OrdererEndpoint string
	State           string
}

func (*Channel) Create

func (c *Channel) Create() error

func (*Channel) Exec

func (c *Channel) Exec(cmdInfo map[string]string) string

type Consortium

type Consortium struct {
	//OrderName string
	Name     string
	Type     string
	Desc     string
	MspNames []string
}

type Get

type Get interface {
	GetEntity() error
}

type MSP

type MSP struct {
	Name string
	Path string
	Type string
	Role string
}

type Orderer

type Orderer struct {
	Name          string
	LedgerType    string
	OrdererType   string
	ListenAddress string
	ListenPort    uint16
	LocalMSPID    string
	Consortiums   []string
}

func (*Orderer) Create

func (o *Orderer) Create() error

func (*Orderer) Exec

func (o *Orderer) Exec(cmdInfo map[string]string) string

type Organization

type Organization struct {
	Country            string
	Province           string
	Locality           string
	Organization       string
	CommonName         string
	OrganizationalUnit string
	StreetAddress      string
	PostalCode         string
	PEMs               []PEM
	MSPs               []MSP
}

func (*Organization) Create

func (o *Organization) Create() error

type PEM

type PEM struct {
	Name string
	Key  string
	Cert string
	Type string
}

type Peer

type Peer struct {
	Name                string
	ListenAddress       string
	ListenPort          uint16
	ChainCodeListenPort uint16
	LocalMSPID          string
	AdminMSPID          string
	EventListenPort     uint16
}

func (*Peer) Create

func (p *Peer) Create() error

func (*Peer) Exec

func (p *Peer) Exec(cmdInfo map[string]string) string

Jump to

Keyboard shortcuts

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