Documentation ¶
Index ¶
- type AccountUpdaterService
- type Storage
- func (s *Storage) AddAccount(parent context.Context, layer uint32, address string, balance uint64) error
- func (s *Storage) AddAccountReceived(parent context.Context, layer uint32, address string, amount uint64) error
- func (s *Storage) AddAccountReward(parent context.Context, layer uint32, address string, reward uint64, ...) error
- func (s *Storage) AddAccountSent(parent context.Context, layer uint32, address string, amount uint64) error
- func (s *Storage) Close()
- func (s *Storage) GetAccount(parent context.Context, query *bson.D) (*model.Account, error)
- func (s *Storage) GetAccountSummary(parent context.Context, address string) (uint64, uint64, uint64, uint64, uint32)
- func (s *Storage) GetAccounts(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetAccountsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetActivation(parent context.Context, query *bson.D) (*model.Activation, error)
- func (s *Storage) GetActivations(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetActivationsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetApp(parent context.Context, query *bson.D) (*model.App, error)
- func (s *Storage) GetApps(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetAppsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetBlock(parent context.Context, query *bson.D) (*model.Block, error)
- func (s *Storage) GetBlocks(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetBlocksCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetEpoch(parent context.Context, query *bson.D) (*model.Epoch, error)
- func (s *Storage) GetEpochByNumber(parent context.Context, epochNumber int32) (*model.Epoch, error)
- func (s *Storage) GetEpochForLayer(layer uint32) uint32
- func (s *Storage) GetEpochLayers(epoch int32) (uint32, uint32)
- func (s *Storage) GetEpochLayersFilter(epochNumber int32, key string) *bson.D
- func (s *Storage) GetEpochs(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetEpochsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetEpochsData(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]*model.Epoch, error)
- func (s *Storage) GetLastLayer(parent context.Context) uint32
- func (s *Storage) GetLayer(parent context.Context, query *bson.D) (*model.Layer, error)
- func (s *Storage) GetLayerByNumber(parent context.Context, layerNumber uint32) (*model.Layer, error)
- func (s *Storage) GetLayers(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetLayersCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetLayersRewards(parent context.Context, layerStart uint32, layerEnd uint32) (int64, int64)
- func (s *Storage) GetNetworkInfo(parent context.Context) (*model.NetworkInfo, error)
- func (s *Storage) GetReward(parent context.Context, query *bson.D) (*model.Reward, error)
- func (s *Storage) GetRewards(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetRewardsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetSmesher(parent context.Context, query *bson.D) (*model.Smesher, error)
- func (s *Storage) GetSmesherByCoinbase(parent context.Context, coinbase string) (*model.Smesher, error)
- func (s *Storage) GetSmesherRewards(parent context.Context, smesher string) (int64, int64)
- func (s *Storage) GetSmeshers(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetSmeshersCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) GetTransaction(parent context.Context, query *bson.D) (*model.Transaction, error)
- func (s *Storage) GetTransactions(parent context.Context, query *bson.D, opts ...*options.FindOptions) ([]bson.D, error)
- func (s *Storage) GetTransactionsAmount(parent context.Context, query *bson.D) int64
- func (s *Storage) GetTransactionsCount(parent context.Context, query *bson.D, opts ...*options.CountOptions) int64
- func (s *Storage) InitAccountsStorage(ctx context.Context) error
- func (s *Storage) InitActivationsStorage(ctx context.Context) error
- func (s *Storage) InitAppsStorage(ctx context.Context) error
- func (s *Storage) InitBlocksStorage(ctx context.Context) error
- func (s *Storage) InitEpochsStorage(ctx context.Context) error
- func (s *Storage) InitLayersStorage(ctx context.Context) error
- func (s *Storage) InitRewardsStorage(ctx context.Context) error
- func (s *Storage) InitSmeshersStorage(ctx context.Context) error
- func (s *Storage) InitTransactionsStorage(ctx context.Context) error
- func (s *Storage) IsSmesherExists(parent context.Context, smesher string) bool
- func (s *Storage) IsTransactionExists(parent context.Context, txId string) bool
- func (s *Storage) OnAccount(in *pb.Account)
- func (s *Storage) OnLayer(in *pb.Layer)
- func (s *Storage) OnNetworkInfo(genesisId string, genesisTime uint64, epochNumLayers uint32, ...)
- func (s *Storage) OnNodeStatus(connectedPeers uint64, isSynced bool, syncedLayer uint32, topLayer uint32, ...)
- func (s *Storage) OnReward(in *pb.Reward)
- func (s *Storage) OnTransactionReceipt(in *pb.TransactionReceipt)
- func (s *Storage) Ping() error
- func (s *Storage) SaveAccount(parent context.Context, layer uint32, in *model.Account) error
- func (s *Storage) SaveActivation(parent context.Context, in *model.Activation) error
- func (s *Storage) SaveActivations(parent context.Context, in []*model.Activation) error
- func (s *Storage) SaveApp(parent context.Context, in *model.App) error
- func (s *Storage) SaveBlock(parent context.Context, in *model.Block) error
- func (s *Storage) SaveBlocks(parent context.Context, in []*model.Block) error
- func (s *Storage) SaveEpoch(parent context.Context, epoch *model.Epoch) error
- func (s *Storage) SaveLayer(parent context.Context, in *model.Layer) error
- func (s *Storage) SaveOrUpdateActivations(parent context.Context, in []*model.Activation) error
- func (s *Storage) SaveOrUpdateBlocks(parent context.Context, in []*model.Block) error
- func (s *Storage) SaveOrUpdateEpoch(parent context.Context, epoch *model.Epoch) error
- func (s *Storage) SaveOrUpdateLayer(parent context.Context, in *model.Layer) error
- func (s *Storage) SaveOrUpdateNetworkInfo(parent context.Context, in *model.NetworkInfo) error
- func (s *Storage) SaveReward(parent context.Context, in *model.Reward) error
- func (s *Storage) SaveSmesher(parent context.Context, in *model.Smesher) error
- func (s *Storage) SaveTransaction(parent context.Context, in *model.Transaction) error
- func (s *Storage) SaveTransactions(parent context.Context, in map[string]*model.Transaction) error
- func (s *Storage) UpdateAccount(parent context.Context, address string, balance uint64, counter uint64) error
- func (s *Storage) UpdateSmesher(parent context.Context, smesher string, coinbase string, space uint64, ...) error
- func (s *Storage) UpdateTransaction(parent context.Context, in *model.TransactionReceipt) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountUpdaterService ¶
type Storage ¶
type Storage struct { NetworkInfo model.NetworkInfo AccountUpdater AccountUpdaterService sync.Mutex // contains filtered or unexported fields }
func (*Storage) AddAccount ¶
func (*Storage) AddAccountReceived ¶
func (*Storage) AddAccountReward ¶
func (*Storage) AddAccountSent ¶
func (*Storage) GetAccount ¶
func (*Storage) GetAccountSummary ¶
func (*Storage) GetAccounts ¶
func (*Storage) GetAccountsCount ¶
func (*Storage) GetActivation ¶
func (*Storage) GetActivations ¶
func (*Storage) GetActivationsCount ¶
func (*Storage) GetAppsCount ¶
func (*Storage) GetBlocksCount ¶
func (*Storage) GetEpochByNumber ¶
func (*Storage) GetEpochForLayer ¶
func (*Storage) GetEpochLayersFilter ¶
func (*Storage) GetEpochsCount ¶
func (*Storage) GetEpochsData ¶
func (*Storage) GetLayerByNumber ¶
func (*Storage) GetLayersCount ¶
func (*Storage) GetLayersRewards ¶
func (*Storage) GetNetworkInfo ¶
func (*Storage) GetRewards ¶
func (*Storage) GetRewardsCount ¶
func (*Storage) GetSmesher ¶
func (*Storage) GetSmesherByCoinbase ¶
func (*Storage) GetSmesherRewards ¶
func (*Storage) GetSmeshers ¶
func (*Storage) GetSmeshersCount ¶
func (*Storage) GetTransaction ¶
func (*Storage) GetTransactions ¶
func (*Storage) GetTransactionsAmount ¶
func (*Storage) GetTransactionsCount ¶
func (*Storage) InitAccountsStorage ¶
func (*Storage) InitActivationsStorage ¶
func (*Storage) InitRewardsStorage ¶
func (*Storage) InitSmeshersStorage ¶
func (*Storage) InitTransactionsStorage ¶
func (*Storage) IsSmesherExists ¶
func (*Storage) IsTransactionExists ¶
func (*Storage) OnNetworkInfo ¶
func (*Storage) OnNodeStatus ¶
func (*Storage) OnTransactionReceipt ¶
func (s *Storage) OnTransactionReceipt(in *pb.TransactionReceipt)
func (*Storage) SaveAccount ¶
func (*Storage) SaveActivation ¶
func (*Storage) SaveActivations ¶
func (*Storage) SaveBlocks ¶
func (*Storage) SaveOrUpdateActivations ¶
func (*Storage) SaveOrUpdateBlocks ¶
func (*Storage) SaveOrUpdateEpoch ¶
func (*Storage) SaveOrUpdateLayer ¶
func (*Storage) SaveOrUpdateNetworkInfo ¶
func (*Storage) SaveReward ¶
func (*Storage) SaveSmesher ¶
func (*Storage) SaveTransaction ¶
func (*Storage) SaveTransactions ¶
func (*Storage) UpdateAccount ¶
func (*Storage) UpdateSmesher ¶
func (*Storage) UpdateTransaction ¶
Click to show internal directories.
Click to hide internal directories.