Documentation
¶
Index ¶
- type SimpleContract
- func (sc *SimpleContract) Create(ctx contractapi.TransactionContextInterface, key string) error
- func (sc *SimpleContract) Read(ctx contractapi.TransactionContextInterface, key string) (string, error)
- func (sc *SimpleContract) Update(ctx contractapi.TransactionContextInterface, key string, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleContract ¶
type SimpleContract struct {
contractapi.Contract
}
SimpleContract with biz logic
func (*SimpleContract) Create ¶
func (sc *SimpleContract) Create(ctx contractapi.TransactionContextInterface, key string) error
Create - Initialises a key value pair with the given ID in the world state
func (*SimpleContract) Read ¶
func (sc *SimpleContract) Read(ctx contractapi.TransactionContextInterface, key string) (string, error)
Read - Returns value of a key with given ID from world state as string
func (*SimpleContract) Update ¶
func (sc *SimpleContract) Update(ctx contractapi.TransactionContextInterface, key string, value string) error
Update - Updates a key with given ID in the world state
Click to show internal directories.
Click to hide internal directories.