Documentation ¶
Index ¶
- func BeginTransaction(ctx context.Context, tx storage.Transactable) (models.Transaction, error)
- type Address
- func (a *Address) ByHash(ctx context.Context, hash []byte) (address storage.Address, err error)
- func (a *Address) ListWithBalance(ctx context.Context, filters storage.AddressListFilter) (result []storage.Address, err error)
- func (a *Address) Messages(ctx context.Context, id uint64, filters storage.AddressMsgsFilter) (msgs []storage.MsgAddress, err error)
- type BlobLog
- func (bl *BlobLog) ByHeight(ctx context.Context, height types.Level, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)
- func (bl *BlobLog) ByNamespace(ctx context.Context, nsId uint64, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)
- func (bl *BlobLog) ByProviders(ctx context.Context, providers []storage.RollupProvider, ...) (logs []storage.BlobLog, err error)
- func (bl *BlobLog) BySigner(ctx context.Context, signerId uint64, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)
- func (bl *BlobLog) ByTxId(ctx context.Context, txId uint64, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)
- func (bl *BlobLog) CountByHeight(ctx context.Context, height types.Level) (int, error)
- func (bl *BlobLog) CountByTxId(ctx context.Context, txId uint64) (int, error)
- type BlockStats
- type Blocks
- func (b *Blocks) ByHash(ctx context.Context, hash []byte) (block storage.Block, err error)
- func (b *Blocks) ByHeight(ctx context.Context, height types.Level) (block storage.Block, err error)
- func (b *Blocks) ByHeightWithStats(ctx context.Context, height types.Level) (block storage.Block, err error)
- func (b *Blocks) ByIdWithRelations(ctx context.Context, id uint64) (block storage.Block, err error)
- func (b *Blocks) Last(ctx context.Context) (block storage.Block, err error)
- func (b *Blocks) ListWithStats(ctx context.Context, limit, offset uint64, order sdk.SortOrder) (blocks []*storage.Block, err error)
- type Constant
- func (constant *Constant) All(ctx context.Context) (c []storage.Constant, err error)
- func (constant *Constant) ByModule(ctx context.Context, module types.ModuleName) (c []storage.Constant, err error)
- func (constant *Constant) Get(ctx context.Context, module types.ModuleName, name string) (c storage.Constant, err error)
- type DenomMetadata
- type Event
- type Message
- func (m *Message) ByAddress(ctx context.Context, addressId uint64, filters storage.AddressMsgsFilter) (msgs []storage.AddressMessageWithTx, err error)
- func (m *Message) ByTxId(ctx context.Context, txId uint64, limit, offset int) (messages []storage.Message, err error)
- func (m *Message) ListWithTx(ctx context.Context, filters storage.MessageListWithTxFilters) (msgs []storage.MessageWithTx, err error)
- type Namespace
- func (n *Namespace) ByNamespaceId(ctx context.Context, namespaceId []byte) (namespace []storage.Namespace, err error)
- func (n *Namespace) ByNamespaceIdAndVersion(ctx context.Context, namespaceId []byte, version byte) (namespace storage.Namespace, err error)
- func (n *Namespace) CountMessagesByHeight(ctx context.Context, height pkgTypes.Level) (int, error)
- func (n *Namespace) CountMessagesByTxId(ctx context.Context, txId uint64) (int, error)
- func (n *Namespace) GetByIds(ctx context.Context, ids ...uint64) (ns []storage.Namespace, err error)
- func (n *Namespace) ListWithSort(ctx context.Context, sortField string, sort sdk.SortOrder, limit, offset int) (ns []storage.Namespace, err error)
- func (n *Namespace) Messages(ctx context.Context, id uint64, limit, offset int) (msgs []storage.NamespaceMessage, err error)
- func (n *Namespace) MessagesByHeight(ctx context.Context, height pkgTypes.Level, limit, offset int) (msgs []storage.NamespaceMessage, err error)
- func (n *Namespace) MessagesByTxId(ctx context.Context, txId uint64, limit, offset int) (msgs []storage.NamespaceMessage, err error)
- type Notificator
- type Price
- type Rollup
- func (r *Rollup) Count(ctx context.Context) (int64, error)
- func (r *Rollup) Leaderboard(ctx context.Context, sortField string, sort sdk.SortOrder, limit, offset int) (rollups []storage.RollupWithStats, err error)
- func (r *Rollup) Namespaces(ctx context.Context, rollupId uint64, limit, offset int) (namespaceIds []uint64, err error)
- func (r *Rollup) Providers(ctx context.Context, rollupId uint64) (providers []storage.RollupProvider, err error)
- func (r *Rollup) Series(ctx context.Context, rollupId uint64, timeframe, column string, ...) (items []storage.HistogramItem, err error)
- func (r *Rollup) Stats(ctx context.Context, rollupId uint64) (stats storage.RollupStats, err error)
- type State
- type Stats
- func (s Stats) Count(ctx context.Context, req storage.CountRequest) (string, error)
- func (s Stats) Histogram(ctx context.Context, req storage.HistogramRequest) (response []storage.HistogramItem, err error)
- func (s Stats) HistogramCount(ctx context.Context, req storage.HistogramCountRequest) (response []storage.HistogramItem, err error)
- func (s Stats) NamespaceSeries(ctx context.Context, timeframe storage.Timeframe, name string, nsId uint64, ...) (response []storage.SeriesItem, err error)
- func (s Stats) Series(ctx context.Context, timeframe storage.Timeframe, name string, ...) (response []storage.SeriesItem, err error)
- func (s Stats) Summary(ctx context.Context, req storage.SummaryRequest) (string, error)
- func (s Stats) TPS(ctx context.Context) (response storage.TPS, err error)
- func (s Stats) TxCountForLast24h(ctx context.Context) (response []storage.TxCountForLast24hItem, err error)
- type Storage
- type Transaction
- func (tx Transaction) DeleteBalances(ctx context.Context, ids []uint64) error
- func (tx Transaction) DeleteProviders(ctx context.Context, rollupId uint64) error
- func (tx Transaction) DeleteRollup(ctx context.Context, rollupId uint64) error
- func (tx Transaction) GetProposerId(ctx context.Context, address string) (id uint64, err error)
- func (tx Transaction) LastAddressAction(ctx context.Context, address []byte) (uint64, error)
- func (tx Transaction) LastBlock(ctx context.Context) (block models.Block, err error)
- func (tx Transaction) LastNamespaceMessage(ctx context.Context, nsId uint64) (msg models.NamespaceMessage, err error)
- func (tx Transaction) Namespace(ctx context.Context, id uint64) (ns models.Namespace, err error)
- func (tx Transaction) RollbackAddresses(ctx context.Context, height types.Level) (address []models.Address, err error)
- func (tx Transaction) RollbackBlobLog(ctx context.Context, height types.Level) (err error)
- func (tx Transaction) RollbackBlock(ctx context.Context, height types.Level) error
- func (tx Transaction) RollbackBlockStats(ctx context.Context, height types.Level) (stats models.BlockStats, err error)
- func (tx Transaction) RollbackEvents(ctx context.Context, height types.Level) (events []models.Event, err error)
- func (tx Transaction) RollbackMessageAddresses(ctx context.Context, msgIds []uint64) (err error)
- func (tx Transaction) RollbackMessages(ctx context.Context, height types.Level) (msgs []models.Message, err error)
- func (tx Transaction) RollbackNamespaceMessages(ctx context.Context, height types.Level) (msgs []models.NamespaceMessage, err error)
- func (tx Transaction) RollbackNamespaces(ctx context.Context, height types.Level) (ns []models.Namespace, err error)
- func (tx Transaction) RollbackSigners(ctx context.Context, txIds []uint64) (err error)
- func (tx Transaction) RollbackTxs(ctx context.Context, height types.Level) (txs []models.Tx, err error)
- func (tx Transaction) RollbackValidators(ctx context.Context, height types.Level) (err error)
- func (tx Transaction) SaveAddresses(ctx context.Context, addresses ...*models.Address) (int64, error)
- func (tx Transaction) SaveBalances(ctx context.Context, balances ...models.Balance) error
- func (tx Transaction) SaveBlobLogs(ctx context.Context, logs ...models.BlobLog) error
- func (tx Transaction) SaveConstants(ctx context.Context, constants ...models.Constant) error
- func (tx Transaction) SaveEvents(ctx context.Context, events ...models.Event) error
- func (tx Transaction) SaveMessages(ctx context.Context, msgs ...*models.Message) error
- func (tx Transaction) SaveMsgAddresses(ctx context.Context, addresses ...models.MsgAddress) error
- func (tx Transaction) SaveNamespaceMessage(ctx context.Context, nsMsgs ...models.NamespaceMessage) error
- func (tx Transaction) SaveNamespaces(ctx context.Context, namespaces ...*models.Namespace) (int64, error)
- func (tx Transaction) SaveProviders(ctx context.Context, providers ...models.RollupProvider) error
- func (tx Transaction) SaveRollup(ctx context.Context, rollup *models.Rollup) error
- func (tx Transaction) SaveSigners(ctx context.Context, addresses ...models.Signer) error
- func (tx Transaction) SaveTransactions(ctx context.Context, txs ...models.Tx) error
- func (tx Transaction) SaveValidators(ctx context.Context, validators ...*models.Validator) error
- func (tx Transaction) State(ctx context.Context, name string) (state models.State, err error)
- func (tx Transaction) UpdateRollup(ctx context.Context, rollup *models.Rollup) error
- type Tx
- func (tx *Tx) ByAddress(ctx context.Context, addressId uint64, fltrs storage.TxFilter) ([]storage.Tx, error)
- func (tx *Tx) ByHash(ctx context.Context, hash []byte) (transaction storage.Tx, err error)
- func (tx *Tx) ByIdWithRelations(ctx context.Context, id uint64) (transaction storage.Tx, err error)
- func (tx *Tx) Filter(ctx context.Context, fltrs storage.TxFilter) (txs []storage.Tx, err error)
- func (tx *Tx) Gas(ctx context.Context, height types.Level) (response []storage.Gas, err error)
- func (tx *Tx) Genesis(ctx context.Context, limit, offset int, sortOrder sdk.SortOrder) (txs []storage.Tx, err error)
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginTransaction ¶
func BeginTransaction(ctx context.Context, tx storage.Transactable) (models.Transaction, error)
Types ¶
type BlobLog ¶ added in v1.2.0
BlobLog -
func (*BlobLog) ByNamespace ¶ added in v1.2.0
func (*BlobLog) ByProviders ¶ added in v1.2.0
func (bl *BlobLog) ByProviders(ctx context.Context, providers []storage.RollupProvider, fltrs storage.BlobLogFilters) (logs []storage.BlobLog, err error)
func (*BlobLog) CountByHeight ¶ added in v1.3.2
type BlockStats ¶
type BlockStats struct {
// contains filtered or unexported fields
}
BlockStats -
func (*BlockStats) ByHeight ¶
func (b *BlockStats) ByHeight(ctx context.Context, height pkgTypes.Level) (stats storage.BlockStats, err error)
ByHeight -
type Blocks ¶
Blocks -
func (*Blocks) ByHeightWithStats ¶
func (b *Blocks) ByHeightWithStats(ctx context.Context, height types.Level) (block storage.Block, err error)
ByHeightWithStats -
func (*Blocks) ByIdWithRelations ¶
ByIdWithRelations -
type Constant ¶
type Constant struct {
// contains filtered or unexported fields
}
Constant -
type DenomMetadata ¶
type DenomMetadata struct {
// contains filtered or unexported fields
}
DenomMetadata -
func (*DenomMetadata) All ¶
func (dm *DenomMetadata) All(ctx context.Context) (metadata []storage.DenomMetadata, err error)
type Event ¶
Event -
type Message ¶
Message -
func (*Message) ByAddress ¶ added in v1.2.0
func (m *Message) ByAddress(ctx context.Context, addressId uint64, filters storage.AddressMsgsFilter) (msgs []storage.AddressMessageWithTx, err error)
func (*Message) ByTxId ¶
func (m *Message) ByTxId(ctx context.Context, txId uint64, limit, offset int) (messages []storage.Message, err error)
ByTxId -
func (*Message) ListWithTx ¶ added in v1.0.4
func (m *Message) ListWithTx(ctx context.Context, filters storage.MessageListWithTxFilters) (msgs []storage.MessageWithTx, err error)
type Namespace ¶
Namespace -
func (*Namespace) ByNamespaceId ¶
func (n *Namespace) ByNamespaceId(ctx context.Context, namespaceId []byte) (namespace []storage.Namespace, err error)
ByNamespaceId -
func (*Namespace) ByNamespaceIdAndVersion ¶
func (n *Namespace) ByNamespaceIdAndVersion(ctx context.Context, namespaceId []byte, version byte) (namespace storage.Namespace, err error)
ByNamespaceIdAndVersion -
func (*Namespace) CountMessagesByHeight ¶
func (*Namespace) CountMessagesByTxId ¶ added in v1.1.5
func (*Namespace) ListWithSort ¶ added in v1.1.2
func (*Namespace) Messages ¶
func (n *Namespace) Messages(ctx context.Context, id uint64, limit, offset int) (msgs []storage.NamespaceMessage, err error)
Messages -
func (*Namespace) MessagesByHeight ¶
func (n *Namespace) MessagesByHeight(ctx context.Context, height pkgTypes.Level, limit, offset int) (msgs []storage.NamespaceMessage, err error)
MessagesByHeight -
func (*Namespace) MessagesByTxId ¶ added in v1.1.5
type Notificator ¶
type Notificator struct {
// contains filtered or unexported fields
}
func NewNotificator ¶
func NewNotificator(cfg config.Database, db *bun.DB) *Notificator
func (*Notificator) Close ¶
func (n *Notificator) Close() error
func (*Notificator) Listen ¶
func (n *Notificator) Listen() chan *pq.Notification
type Price ¶ added in v1.2.0
type Price struct {
// contains filtered or unexported fields
}
Price -
type Rollup ¶ added in v1.2.0
Rollup -
func (*Rollup) Leaderboard ¶ added in v1.2.0
func (*Rollup) Namespaces ¶ added in v1.2.0
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
func (Stats) Histogram ¶
func (s Stats) Histogram(ctx context.Context, req storage.HistogramRequest) (response []storage.HistogramItem, err error)
func (Stats) HistogramCount ¶
func (s Stats) HistogramCount(ctx context.Context, req storage.HistogramCountRequest) (response []storage.HistogramItem, err error)
func (Stats) NamespaceSeries ¶ added in v1.1.0
func (Stats) TxCountForLast24h ¶ added in v1.1.0
type Storage ¶
type Storage struct { *postgres.Storage Blocks models.IBlock BlockStats models.IBlockStats BlobLogs models.IBlobLog Constants models.IConstant DenomMetadata models.IDenomMetadata Tx models.ITx Message models.IMessage Event models.IEvent Address models.IAddress Namespace models.INamespace Price models.IPrice State models.IState Stats models.IStats Validator models.IValidator Rollup models.IRollup Notificator *Notificator // contains filtered or unexported fields }
Storage -
func (Storage) CreateListener ¶
type Transaction ¶
type Transaction struct {
storage.Transaction
}
func (Transaction) DeleteBalances ¶
func (tx Transaction) DeleteBalances(ctx context.Context, ids []uint64) error
func (Transaction) DeleteProviders ¶ added in v1.2.0
func (tx Transaction) DeleteProviders(ctx context.Context, rollupId uint64) error
func (Transaction) DeleteRollup ¶ added in v1.2.0
func (tx Transaction) DeleteRollup(ctx context.Context, rollupId uint64) error
func (Transaction) GetProposerId ¶ added in v1.1.0
func (Transaction) LastAddressAction ¶
func (Transaction) LastNamespaceMessage ¶ added in v1.1.0
func (tx Transaction) LastNamespaceMessage(ctx context.Context, nsId uint64) (msg models.NamespaceMessage, err error)
func (Transaction) RollbackAddresses ¶
func (Transaction) RollbackBlobLog ¶ added in v1.2.0
func (Transaction) RollbackBlock ¶
func (Transaction) RollbackBlockStats ¶
func (tx Transaction) RollbackBlockStats(ctx context.Context, height types.Level) (stats models.BlockStats, err error)
func (Transaction) RollbackEvents ¶
func (Transaction) RollbackMessageAddresses ¶
func (tx Transaction) RollbackMessageAddresses(ctx context.Context, msgIds []uint64) (err error)
func (Transaction) RollbackMessages ¶
func (Transaction) RollbackNamespaceMessages ¶
func (tx Transaction) RollbackNamespaceMessages(ctx context.Context, height types.Level) (msgs []models.NamespaceMessage, err error)
func (Transaction) RollbackNamespaces ¶
func (Transaction) RollbackSigners ¶
func (tx Transaction) RollbackSigners(ctx context.Context, txIds []uint64) (err error)
func (Transaction) RollbackTxs ¶
func (Transaction) RollbackValidators ¶
func (Transaction) SaveAddresses ¶
func (Transaction) SaveBalances ¶
func (Transaction) SaveBlobLogs ¶ added in v1.2.0
func (Transaction) SaveConstants ¶
func (Transaction) SaveEvents ¶
func (Transaction) SaveMessages ¶
func (Transaction) SaveMsgAddresses ¶
func (tx Transaction) SaveMsgAddresses(ctx context.Context, addresses ...models.MsgAddress) error
func (Transaction) SaveNamespaceMessage ¶
func (tx Transaction) SaveNamespaceMessage(ctx context.Context, nsMsgs ...models.NamespaceMessage) error
func (Transaction) SaveNamespaces ¶
func (Transaction) SaveProviders ¶ added in v1.2.0
func (tx Transaction) SaveProviders(ctx context.Context, providers ...models.RollupProvider) error
func (Transaction) SaveRollup ¶ added in v1.2.0
func (Transaction) SaveSigners ¶
func (Transaction) SaveTransactions ¶
func (Transaction) SaveValidators ¶
func (Transaction) UpdateRollup ¶ added in v1.2.0
type Tx ¶
Tx -
func (*Tx) ByIdWithRelations ¶
Click to show internal directories.
Click to hide internal directories.