Documentation ¶
Index ¶
- type MapLedger
- type SimpleView
- func (v *SimpleView) Delete(owner, controller, key string) error
- func (v *SimpleView) DropDelta()
- func (v *SimpleView) Get(owner, controller, key string) (flow.RegisterValue, error)
- func (v *SimpleView) MergeView(o state.View) error
- func (v *SimpleView) NewChild() state.View
- func (v *SimpleView) Set(owner, controller, key string, value flow.RegisterValue) error
- func (v *SimpleView) Touch(owner, controller, key string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapLedger ¶
type MapLedger struct { Registers map[string]flow.RegisterEntry RegisterTouches map[string]bool }
A MapLedger is a naive ledger storage implementation backed by a simple map.
This implementation is designed for testing purposes.
func NewMapLedger ¶
func NewMapLedger() *MapLedger
NewMapLedger returns an instance of map ledger (should only be used for testing)
func (*MapLedger) Get ¶
func (m *MapLedger) Get(owner, controller, key string) (flow.RegisterValue, error)
type SimpleView ¶
type SimpleView struct { Parent *SimpleView Ledger *MapLedger }
SimpleView provides a simple view for testing purposes.
func NewSimpleView ¶
func NewSimpleView() *SimpleView
func (*SimpleView) Delete ¶
func (v *SimpleView) Delete(owner, controller, key string) error
func (*SimpleView) DropDelta ¶
func (v *SimpleView) DropDelta()
func (*SimpleView) Get ¶
func (v *SimpleView) Get(owner, controller, key string) (flow.RegisterValue, error)
func (*SimpleView) NewChild ¶
func (v *SimpleView) NewChild() state.View
func (*SimpleView) Set ¶
func (v *SimpleView) Set(owner, controller, key string, value flow.RegisterValue) error
func (*SimpleView) Touch ¶
func (v *SimpleView) Touch(owner, controller, key string) error
Click to show internal directories.
Click to hide internal directories.