client

package
v0.0.0-...-0c843eb Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chaincode

type Chaincode struct {
	// contains filtered or unexported fields
}

func (*Chaincode) Execute

func (c *Chaincode) Execute(function string, arguments [][]byte) *Response

func (*Chaincode) Query

func (c *Chaincode) Query(function string, arguments [][]byte) *Response

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

func (*Channel) Chaincode

func (c *Channel) Chaincode(name string) *Chaincode

func (*Channel) Ledger

func (c *Channel) Ledger() (*Ledger, error)

func (*Channel) Listen

func (c *Channel) Listen(done <-chan struct{}, s Seek, block uint64) (<-chan *common.Block, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(u User) (*Client, error)

func (*Client) Channel

func (c *Client) Channel(name string) (*Channel, error)

func (*Client) Close

func (c *Client) Close()

type Ledger

type Ledger struct {
	// contains filtered or unexported fields
}

func (*Ledger) Block

func (l *Ledger) Block(height uint64) (*common.Block, error)

func (*Ledger) Info

func (l *Ledger) Info() (*fab.BlockchainInfoResponse, error)

type Response

type Response struct {
	Status      int    `json:"status,omitempty"`
	Payload     []byte `json:"payload,omitempty"`
	Message     string `json:"message,omitempty"`
	Transaction string `json:"transaction,omitempty"`

	ErrorMessages []string          `json:"errormessages,omitempty"`
	ErrorStatus   *status.Status    `json:"errorstatus,omitempty"`
	Response      *channel.Response `json:"response,omitempty"`
}

type Seek

type Seek seekMode
const (
	Block Seek = iota
	Start
	End
)

type User

type User struct {
	Name            string
	Organization    string
	Certificate     []byte
	CertificatePath string
	PrivateKey      []byte
	PrivateKeyPath  string
}

Jump to

Keyboard shortcuts

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