Versions in this module Expand all Collapse all v0 v0.0.21 Oct 31, 2022 Changes in this version + var NotFound = errors.New("store not found") + type Appender interface + Append func(ord uint64, key string, value []byte) + type ConditionalKeySetter interface + SetBytesIfNotExists func(ord uint64, key string, value []byte) + SetIfNotExists func(ord uint64, key string, value string) + type Config struct + func NewConfig(name string, moduleInitialBlock uint64, moduleHash string, ...) (*Config, error) + func (c *Config) ListSnapshotFiles(ctx context.Context) (files []*FileInfo, err error) + func (c *Config) ModuleInitialBlock() uint64 + func (c *Config) Name() string + func (c *Config) NewFullKV(logger *zap.Logger) *FullKV + func (c *Config) NewPartialKV(initialBlock uint64, logger *zap.Logger) *PartialKV + type ConfigMap map[string]*Config + type Deleter interface + DeletePrefix func(ord uint64, prefix string) + type DeltaAccessor interface + ApplyDeltasReverse func(deltas []*pbsubstreams.StoreDelta) + GetDeltas func() []*pbsubstreams.StoreDelta + SetDeltas func([]*pbsubstreams.StoreDelta) + type FileInfo struct + EndBlock uint64 + Filename string + Partial bool + StartBlock uint64 + type FileWriter struct + func (f *FileWriter) Write(ctx context.Context) error + type FullKV struct + func (b FullKV) Append(ord uint64, key string, value []byte) + func (b FullKV) ApplyDelta(delta *pbsubstreams.StoreDelta) + func (b FullKV) ApplyDeltasReverse(deltas []*pbsubstreams.StoreDelta) + func (b FullKV) DeletePrefix(ord uint64, prefix string) + func (b FullKV) GetAt(ord uint64, key string) (out []byte, found bool) + func (b FullKV) GetDeltas() []*pbsubstreams.StoreDelta + func (b FullKV) GetFirst(key string) ([]byte, bool) + func (b FullKV) GetLast(key string) ([]byte, bool) + func (b FullKV) InitialBlock() uint64 + func (b FullKV) Iter(f func(key string, value []byte) error) error + func (b FullKV) Length() uint64 + func (b FullKV) MarshalLogObject(enc zapcore.ObjectEncoder) error + func (b FullKV) Merge(kvPartialStore *PartialKV) error + func (b FullKV) Name() string + func (b FullKV) Set(ord uint64, key string, value string) + func (b FullKV) SetBytes(ord uint64, key string, value []byte) + func (b FullKV) SetBytesIfNotExists(ord uint64, key string, value []byte) + func (b FullKV) SetDeltas(in []*pbsubstreams.StoreDelta) + func (b FullKV) SetIfNotExists(ord uint64, key string, value string) + func (b FullKV) SetMaxBigDecimal(ord uint64, key string, value *big.Float) + func (b FullKV) SetMaxBigInt(ord uint64, key string, value *big.Int) + func (b FullKV) SetMaxFloat64(ord uint64, key string, value float64) + func (b FullKV) SetMaxInt64(ord uint64, key string, value int64) + func (b FullKV) SetMinBigDecimal(ord uint64, key string, value *big.Float) + func (b FullKV) SetMinBigInt(ord uint64, key string, value *big.Int) + func (b FullKV) SetMinFloat64(ord uint64, key string, value float64) + func (b FullKV) SetMinInt64(ord uint64, key string, value int64) + func (b FullKV) String() string + func (b FullKV) SumBigDecimal(ord uint64, key string, value *big.Float) + func (b FullKV) SumBigInt(ord uint64, key string, value *big.Int) + func (b FullKV) SumFloat64(ord uint64, key string, value float64) + func (b FullKV) SumInt64(ord uint64, key string, value int64) + func (s *FullKV) DerivePartialStore(initialBlock uint64) *PartialKV + func (s *FullKV) Load(ctx context.Context, exclusiveEndBlock uint64) error + func (s *FullKV) Marshaller() marshaller.Marshaller + func (s *FullKV) Reset() + func (s *FullKV) Save(endBoundaryBlock uint64) (*block.Range, *FileWriter, error) + type Getter interface + All func() map[string]Store + Get func(name string) (Store, bool) + type Iterable interface + Iter func(func(key string, value []byte) error) error + Length func() uint64 + type Loadable interface + Load func(ctx context.Context, atBlock uint64) error + type Map map[string]Store + func NewMap() Map + func (m Map) All() map[string]Store + func (m Map) Get(name string) (Store, bool) + func (m Map) MarshalLogObject(enc zapcore.ObjectEncoder) error + func (m Map) Set(s Store) + type MaxBigDecimalSetter interface + SetMaxBigDecimal func(ord uint64, key string, value *big.Float) + type MaxBigIntSetter interface + SetMaxBigInt func(ord uint64, key string, value *big.Int) + type MaxFloat64Setter interface + SetMaxFloat64 func(ord uint64, key string, value float64) + type MaxInt64Setter interface + SetMaxInt64 func(ord uint64, key string, value int64) + type MinBigDecimalSetter interface + SetMinBigDecimal func(ord uint64, key string, value *big.Float) + type MinBigIntSetter interface + SetMinBigInt func(ord uint64, key string, value *big.Int) + type MinFloat64Setter interface + SetMinFloat64 func(ord uint64, key string, value float64) + type MinInt64Setter interface + SetMinInt64 func(ord uint64, key string, value int64) + type PartialKV struct + DeletedPrefixes []string + func (b PartialKV) Append(ord uint64, key string, value []byte) + func (b PartialKV) ApplyDelta(delta *pbsubstreams.StoreDelta) + func (b PartialKV) ApplyDeltasReverse(deltas []*pbsubstreams.StoreDelta) + func (b PartialKV) GetAt(ord uint64, key string) (out []byte, found bool) + func (b PartialKV) GetDeltas() []*pbsubstreams.StoreDelta + func (b PartialKV) GetFirst(key string) ([]byte, bool) + func (b PartialKV) GetLast(key string) ([]byte, bool) + func (b PartialKV) Iter(f func(key string, value []byte) error) error + func (b PartialKV) Length() uint64 + func (b PartialKV) MarshalLogObject(enc zapcore.ObjectEncoder) error + func (b PartialKV) Merge(kvPartialStore *PartialKV) error + func (b PartialKV) Name() string + func (b PartialKV) Reset() + func (b PartialKV) Set(ord uint64, key string, value string) + func (b PartialKV) SetBytes(ord uint64, key string, value []byte) + func (b PartialKV) SetBytesIfNotExists(ord uint64, key string, value []byte) + func (b PartialKV) SetDeltas(in []*pbsubstreams.StoreDelta) + func (b PartialKV) SetIfNotExists(ord uint64, key string, value string) + func (b PartialKV) SetMaxBigDecimal(ord uint64, key string, value *big.Float) + func (b PartialKV) SetMaxBigInt(ord uint64, key string, value *big.Int) + func (b PartialKV) SetMaxFloat64(ord uint64, key string, value float64) + func (b PartialKV) SetMaxInt64(ord uint64, key string, value int64) + func (b PartialKV) SetMinBigDecimal(ord uint64, key string, value *big.Float) + func (b PartialKV) SetMinBigInt(ord uint64, key string, value *big.Int) + func (b PartialKV) SetMinFloat64(ord uint64, key string, value float64) + func (b PartialKV) SetMinInt64(ord uint64, key string, value int64) + func (b PartialKV) String() string + func (b PartialKV) SumBigDecimal(ord uint64, key string, value *big.Float) + func (b PartialKV) SumBigInt(ord uint64, key string, value *big.Int) + func (b PartialKV) SumFloat64(ord uint64, key string, value float64) + func (b PartialKV) SumInt64(ord uint64, key string, value int64) + func (p *PartialKV) DeletePrefix(ord uint64, prefix string) + func (p *PartialKV) DeleteStore(ctx context.Context, endBlock uint64) (err error) + func (p *PartialKV) InitialBlock() uint64 + func (p *PartialKV) Load(ctx context.Context, exclusiveEndBlock uint64) error + func (p *PartialKV) Roll(lastBlock uint64) + func (p *PartialKV) Save(endBoundaryBlock uint64) (*block.Range, *FileWriter, error) + type PartialStore interface + Roll func(lastBlock uint64) + type Reader interface + GetAt func(ord uint64, key string) ([]byte, bool) + GetFirst func(key string) ([]byte, bool) + GetLast func(key string) ([]byte, bool) + type Resettable interface + Reset func() + type Savable interface + Save func(endBoundaryBlock uint64) (*block.Range, *FileWriter, error) + type Setter interface + Set func(name string, s Store) + type Store interface + InitialBlock func() uint64 + Name func() string + type SumBigDecimalSetter interface + SumBigDecimal func(ord uint64, key string, value *big.Float) + type SumBigIntSetter interface + SumBigInt func(ord uint64, key string, value *big.Int) + type SumFloat64Setter interface + SumFloat64 func(ord uint64, key string, value float64) + type SumInt64Setter interface + SumInt64 func(ord uint64, key string, value int64) + type UpdateKeySetter interface + Set func(ord uint64, key string, value string) + SetBytes func(ord uint64, key string, value []byte)