Documentation
¶
Index ¶
- Constants
- type AppDataHandlerRegistry
- type GossipProvider
- type HelloCC
- func (cc *HelloCC) Chaincode() shim.Chaincode
- func (cc *HelloCC) GetDBArtifacts(collNames []string) map[string]*ccapi.DBArtifacts
- func (cc *HelloCC) Init(stub shim.ChaincodeStubInterface) pb.Response
- func (cc *HelloCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response
- func (cc *HelloCC) Name() string
- func (cc *HelloCC) Version() string
- type StateDBProvider
Constants ¶
View Source
const (
HelloDataType = "Hello!"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppDataHandlerRegistry ¶
AppDataHandlerRegistry is used to register a Gossip handler for application-specific data
type GossipProvider ¶
type GossipProvider interface {
GetGossipService() gossipapi.GossipService
}
GossipProvider provides a Gossip service
type HelloCC ¶
type HelloCC struct { GossipProvider StateDBProvider // contains filtered or unexported fields }
HelloCC is a sample chaincode that broadcasts a Hello message to other peers on a channel and the other peers respond with a hello
func New ¶
func New(name string, handlerRegistry AppDataHandlerRegistry, gossipProvider GossipProvider, stateDBProvider StateDBProvider) *HelloCC
New returns a new Hello chaincode instance
func (*HelloCC) GetDBArtifacts ¶
func (cc *HelloCC) GetDBArtifacts(collNames []string) map[string]*ccapi.DBArtifacts
GetDBArtifacts returns Couch DB indexes (if applicable)
func (*HelloCC) Init ¶
func (cc *HelloCC) Init(stub shim.ChaincodeStubInterface) pb.Response
Init is not used
type StateDBProvider ¶
StateDBProvider returns a state database for a given channel
Click to show internal directories.
Click to hide internal directories.