Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endorsement ¶
type Endorsement struct {
Proposal *peer.Proposal
Responses []*peer.ProposalResponse
}
Endorsement is a simple wrapper around the signed proposal that was sent to the endorsers and their responses.
type Logger ¶
type Logger interface {
Debugf(template string, args ...any)
Infof(template string, args ...any)
Warnf(template string, args ...any)
Errorf(template string, args ...any)
}
Logger is the logging interface used throughout the SDK. This interface is compatible with the fabric logger from fabric-lib-go.
Users can provide any logger implementation that supports formatted logging at different levels.
func NewStdLogger ¶
NewStdLogger creates a new logger that uses the standard library log package. All log messages will be prefixed with the given component name.
type NoOpLogger ¶
type NoOpLogger struct{}
NoOpLogger is a logger implementation that discards all log output. Use this when you want to disable logging entirely.
func (NoOpLogger) Debugf ¶
func (NoOpLogger) Debugf(template string, args ...any)
func (NoOpLogger) Errorf ¶
func (NoOpLogger) Errorf(template string, args ...any)
func (NoOpLogger) Infof ¶
func (NoOpLogger) Infof(template string, args ...any)
func (NoOpLogger) Warnf ¶
func (NoOpLogger) Warnf(template string, args ...any)
type Signer ¶
Signer signs messages and serializes the signing identity into bytes that can be embedded in a Fabric transaction envelope.
type StdLogger ¶
type StdLogger struct {
// contains filtered or unexported fields
}
StdLogger is a logger implementation that uses Go's standard library log package. It prefixes all messages with the component name and log level.
type TestLogger ¶
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger is a logger implementation that uses testing.T's Log function. Use this in tests to have log output captured and displayed by the test runner.
func (*TestLogger) Debugf ¶
func (l *TestLogger) Debugf(template string, args ...any)
func (*TestLogger) Errorf ¶
func (l *TestLogger) Errorf(template string, args ...any)
func (*TestLogger) Infof ¶
func (l *TestLogger) Infof(template string, args ...any)
func (*TestLogger) Warnf ¶
func (l *TestLogger) Warnf(template string, args ...any)
Directories
¶
| Path | Synopsis |
|---|---|
|
package blocks has the tools to parse Fabric or Fabric-X blocks.
|
package blocks has the tools to parse Fabric or Fabric-X blocks. |
|
package endorsement can read a Fabric-style SignedProposal (the request made to a peer to execute chaincode).
|
package endorsement can read a Fabric-style SignedProposal (the request made to a peer to execute chaincode). |
|
package fabrictest mimics a minimal in-memory Fabric or Fabric-X network for tests.
|
package fabrictest mimics a minimal in-memory Fabric or Fabric-X network for tests. |
|
package identity has the bare minimum for Fabric ecdsa identities.
|
package identity has the bare minimum for Fabric ecdsa identities. |
|
package local can be used to mock a fabric backend for testing.
|
package local can be used to mock a fabric backend for testing. |
|
package network has clients for peers and orderers, along with simple wrappers to submit a transaction and to synchronize a local database with a committer.
|
package network has clients for peers and orderers, along with simple wrappers to submit a transaction and to synchronize a local database with a committer. |
|
Package notification provides two complementary ways to receive committed transaction events from the Fabric-X sidecar Notification Service:
|
Package notification provides two complementary ways to receive committed transaction events from the Fabric-X sidecar Notification Service: |
|
package state provides a versioned insert-only database that can be used to construct a local world state.
|
package state provides a versioned insert-only database that can be used to construct a local world state. |
|
sqlite
Package sqlite provides a production-ready SQLite database opener with sensible defaults for both write and read-only access patterns.
|
Package sqlite provides a production-ready SQLite database opener with sensible defaults for both write and read-only access patterns. |