Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SeralizeObject ¶
func SeralizeObject(m StorageObject) ([]byte, error)
func WrapObject ¶
func WrapObject(v interface{}) wrappingObject
Types ¶
type ChaincodeRuntime ¶
type ChaincodeRuntime struct { Storage StateMap Tx TransactionInterface Core CoreInterface }
func NewRuntime ¶
func NewRuntime(root string, stub shim.ChaincodeStubInterface, cfg *Config) *ChaincodeRuntime
func (*ChaincodeRuntime) Stub ¶
func (r *ChaincodeRuntime) Stub() shim.ChaincodeStubInterface
func (*ChaincodeRuntime) SubRuntime ¶
func (r *ChaincodeRuntime) SubRuntime(node string) *ChaincodeRuntime
type CoreInterface ¶
type ExtendedObject ¶
type ExtendedObject struct {
Ext interface{}
}
allowing one or more "extended object" can be persisted When load return this error, the rest bytes is unmarshalled with the object in Ext field, and Load will be called again NOTICE: if there is no any rest bytes, Load is just called with the provided Ext field (without any change), and any failure in Unmarshalling just caused the whole Get process return failure NOTICE: Load return more ExtendedObject when there is no more bytes left will cause Get returun ExtendedObject as an error
func (ExtendedObject) Error ¶
func (ExtendedObject) Error() string
type StateMap ¶
type StateMap interface { SubMap(string) StateMap StoragePath() string GetRaw(string) ([]byte, error) SetRaw(string, []byte) error Get(string, StorageObject) error Set(string, StorageObject) error Delete(string) error }
func NewShimMap ¶
func NewShimMap(root string, stub shim.ChaincodeStubInterface, readOnly bool) StateMap
default
type StateMap_Legacy ¶
type StateMap_Legacy interface { SubMap(string) StateMap_Legacy StoragePath() string GetRaw(string) ([]byte, error) SetRaw(string, []byte) error Get(string, p.Message) error Set(string, p.Message) error }
func NewShimMapLegacy ¶
func NewShimMapLegacy(root string, stub shim.ChaincodeStubInterface, readOnly bool) StateMap_Legacy
default
type StorageObject ¶
type StorageObject interface { GetObject() interface{} Save() interface{} Load(interface{}) error }
Click to show internal directories.
Click to hide internal directories.