db

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigrations

func RunMigrations(logger *zap.Logger, pgConnectionString string, downFirst bool) error

Types

type AccessKey

type AccessKey struct {
	ID      int32
	TrackID string
	PubKey  string
}

type AppendValidatorHistoryParams

type AppendValidatorHistoryParams struct {
	Endpoint     string
	EthAddress   string
	CometAddress string
	SpID         int64
	ServiceType  string
	EventType    ValidatorEventType
	EventTime    pgtype.Timestamp
	EventBlock   int64
}

type CommitSlaNodeReportParams

type CommitSlaNodeReportParams struct {
	SlaRollupID    pgtype.Int4
	Address        string
	BlocksProposed int32
}

type CommitSlaRollupParams

type CommitSlaRollupParams struct {
	Time       pgtype.Timestamp
	TxHash     string
	BlockStart int64
	BlockEnd   int64
}

type CoreAppState

type CoreAppState struct {
	BlockHeight int64
	AppHash     []byte
	CreatedAt   pgtype.Timestamp
}

type CoreBlock

type CoreBlock struct {
	Rowid     int64
	Height    int64
	ChainID   string
	Hash      string
	Proposer  string
	CreatedAt pgtype.Timestamp
}

type CoreDeal

type CoreDeal struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
	CreatedAt   pgtype.Timestamp
}

type CoreErn

type CoreErn struct {
	ID                 int64
	Address            string
	Index              int64
	TxHash             string
	Sender             string
	MessageControlType int16
	RawMessage         []byte
	RawAcknowledgment  []byte
	BlockHeight        int64
}

type CoreEtlTx

type CoreEtlTx struct {
	ID          int64
	BlockHeight int64
	TxIndex     int32
	TxHash      string
	TxType      string
	TxData      []byte
	CreatedAt   pgtype.Timestamptz
}

type CoreEtlTxDuplicate

type CoreEtlTxDuplicate struct {
	ID            int64
	TxHash        string
	TableName     string
	DuplicateType string
	CreatedAt     pgtype.Timestamptz
}

type CoreEtlTxManageEntity

type CoreEtlTxManageEntity struct {
	ID         int64
	TxHash     string
	UserID     int64
	EntityType string
	EntityID   int64
	Action     string
	Metadata   string
	Signature  string
	Signer     string
	Nonce      string
	CreatedAt  pgtype.Timestamptz
}

type CoreEtlTxPlay

type CoreEtlTxPlay struct {
	ID        int64
	TxHash    string
	UserID    string
	TrackID   string
	PlayedAt  pgtype.Timestamptz
	Signature string
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	CreatedAt pgtype.Timestamptz
}

type CoreEtlTxSlaRollup

type CoreEtlTxSlaRollup struct {
	ID         int64
	TxHash     string
	BlockStart int64
	BlockEnd   int64
	Timestamp  pgtype.Timestamptz
	CreatedAt  pgtype.Timestamptz
}

type CoreEtlTxStorageProof

type CoreEtlTxStorageProof struct {
	ID              int64
	TxHash          string
	Height          int64
	Address         string
	Cid             pgtype.Text
	ProofSignature  []byte
	ProverAddresses []string
	CreatedAt       pgtype.Timestamptz
}

type CoreEtlTxStorageProofVerification

type CoreEtlTxStorageProofVerification struct {
	ID        int64
	TxHash    string
	Height    int64
	Proof     []byte
	CreatedAt pgtype.Timestamptz
}

type CoreEtlTxValidatorDeregistration

type CoreEtlTxValidatorDeregistration struct {
	ID           int64
	TxHash       string
	CometAddress string
	PubKey       []byte
	CreatedAt    pgtype.Timestamptz
}

type CoreEtlTxValidatorRegistration

type CoreEtlTxValidatorRegistration struct {
	ID           int64
	TxHash       string
	Endpoint     string
	CometAddress string
	EthBlock     string
	NodeType     string
	SpID         string
	PubKey       []byte
	Power        int64
	CreatedAt    pgtype.Timestamptz
}

type CoreMead

type CoreMead struct {
	ID                int64
	Address           string
	TxHash            string
	Index             int64
	Sender            string
	ResourceAddresses []string
	ReleaseAddresses  []string
	RawMessage        []byte
	RawAcknowledgment []byte
	BlockHeight       int64
}

type CoreParty

type CoreParty struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
	CreatedAt   pgtype.Timestamp
}

type CorePie

type CorePie struct {
	ID                int64
	Address           string
	TxHash            string
	Index             int64
	Sender            string
	PartyAddresses    []string
	RawMessage        []byte
	RawAcknowledgment []byte
	BlockHeight       int64
}

type CoreRelease

type CoreRelease struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
	CreatedAt   pgtype.Timestamp
}

type CoreResource

type CoreResource struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
	CreatedAt   pgtype.Timestamp
}

type CoreReward

type CoreReward struct {
	ID               int64
	Address          string
	Index            int64
	TxHash           string
	Sender           string
	RewardID         string
	Name             string
	Amount           int64
	ClaimAuthorities []string
	RawMessage       []byte
	BlockHeight      int64
	CreatedAt        pgtype.Timestamptz
	UpdatedAt        pgtype.Timestamptz
}

type CoreTransaction

type CoreTransaction struct {
	Rowid       int64
	BlockID     int64
	Index       int32
	TxHash      string
	Transaction []byte
	CreatedAt   pgtype.Timestamp
}

type CoreTxStat

type CoreTxStat struct {
	ID          int32
	TxType      string
	TxHash      string
	BlockHeight int64
	CreatedAt   pgtype.Timestamp
}

type CoreUpload

type CoreUpload struct {
	ID                 int64
	UploaderAddress    string
	Cid                string
	TranscodedCid      string
	Upid               string
	UploadSignature    string
	ValidatorAddress   string
	ValidatorSignature string
	TxHash             string
	BlockHeight        int64
}

type CoreValidator

type CoreValidator struct {
	Rowid        int32
	PubKey       string
	Endpoint     string
	EthAddress   string
	CometAddress string
	EthBlock     string
	NodeType     string
	SpID         string
	CometPubKey  string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetAppStateAtHeightRow

type GetAppStateAtHeightRow struct {
	BlockHeight int64
	AppHash     []byte
}

type GetAvailableCitiesParams

type GetAvailableCitiesParams struct {
	Column1 interface{}
	Column2 interface{}
	Limit   int32
}

type GetAvailableCitiesRow

type GetAvailableCitiesRow struct {
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	PlayCount int64
}

type GetAvailableCountriesRow

type GetAvailableCountriesRow struct {
	Country   pgtype.Text
	PlayCount int64
}

type GetAvailableRegionsParams

type GetAvailableRegionsParams struct {
	Column1 interface{}
	Limit   int32
}

type GetAvailableRegionsRow

type GetAvailableRegionsRow struct {
	Region    pgtype.Text
	Country   pgtype.Text
	PlayCount int64
}

type GetBlocksWithTransactionsRow

type GetBlocksWithTransactionsRow struct {
	BlockRowid     int64
	Height         int64
	ChainID        string
	BlockHash      string
	Proposer       string
	BlockCreatedAt pgtype.Timestamp
	TxRowid        pgtype.Int8
	BlockID        pgtype.Int8
	TxIndex        pgtype.Int4
	TxHash         pgtype.Text
	Transaction    []byte
	TxCreatedAt    pgtype.Timestamp
}

type GetDecodedPlaysByLocationParams

type GetDecodedPlaysByLocationParams struct {
	Column1 interface{}
	Column2 interface{}
	Column3 interface{}
	Limit   int32
}

type GetDecodedPlaysByLocationRow

type GetDecodedPlaysByLocationRow struct {
	TxHash    string
	UserID    string
	TrackID   string
	PlayedAt  pgtype.Timestamptz
	Signature string
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	CreatedAt pgtype.Timestamptz
}

type GetDecodedPlaysByTimeRangeParams

type GetDecodedPlaysByTimeRangeParams struct {
	PlayedAt   pgtype.Timestamptz
	PlayedAt_2 pgtype.Timestamptz
	Limit      int32
}

type GetDecodedPlaysByTimeRangeRow

type GetDecodedPlaysByTimeRangeRow struct {
	TxHash    string
	UserID    string
	TrackID   string
	PlayedAt  pgtype.Timestamptz
	Signature string
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	CreatedAt pgtype.Timestamptz
}

type GetDecodedPlaysByTrackParams

type GetDecodedPlaysByTrackParams struct {
	TrackID string
	Limit   int32
}

type GetDecodedPlaysByTrackRow

type GetDecodedPlaysByTrackRow struct {
	TxHash    string
	UserID    string
	TrackID   string
	PlayedAt  pgtype.Timestamptz
	Signature string
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	CreatedAt pgtype.Timestamptz
}

type GetDecodedPlaysByUserParams

type GetDecodedPlaysByUserParams struct {
	UserID string
	Limit  int32
}

type GetDecodedPlaysByUserRow

type GetDecodedPlaysByUserRow struct {
	TxHash    string
	UserID    string
	TrackID   string
	PlayedAt  pgtype.Timestamptz
	Signature string
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	CreatedAt pgtype.Timestamptz
}

type GetDecodedPlaysRow

type GetDecodedPlaysRow struct {
	TxHash    string
	UserID    string
	TrackID   string
	PlayedAt  pgtype.Timestamptz
	Signature string
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	CreatedAt pgtype.Timestamptz
}

type GetDecodedTxsByTypeParams

type GetDecodedTxsByTypeParams struct {
	TxType string
	Limit  int32
}

type GetERNContainingAddressRow

type GetERNContainingAddressRow struct {
	ErnAddress  string
	Sender      string
	EntityType  string
	EntityIndex int32
	RawMessage  []byte
}

type GetERNReceiptsRow

type GetERNReceiptsRow struct {
	RawAcknowledgment []byte
	Index             int64
}

type GetLatestAppStateRow

type GetLatestAppStateRow struct {
	BlockHeight int64
	AppHash     []byte
}

type GetMEADReceiptsRow

type GetMEADReceiptsRow struct {
	RawAcknowledgment []byte
	Index             int64
}

type GetPIEReceiptsRow

type GetPIEReceiptsRow struct {
	RawAcknowledgment []byte
	Index             int64
}

type GetRecentRollupsForAllNodesParams

type GetRecentRollupsForAllNodesParams struct {
	ID    int32
	Limit int32
}

type GetRecentRollupsForAllNodesRow

type GetRecentRollupsForAllNodesRow struct {
	ID             int32
	TxHash         string
	BlockStart     int64
	BlockEnd       int64
	Time           pgtype.Timestamp
	Address        pgtype.Text
	BlocksProposed pgtype.Int4
}

type GetRecentRollupsForNodeParams

type GetRecentRollupsForNodeParams struct {
	Limit   int32
	Address string
}

type GetRecentRollupsForNodeRow

type GetRecentRollupsForNodeRow struct {
	ID             int32
	TxHash         string
	BlockStart     int64
	BlockEnd       int64
	Time           pgtype.Timestamp
	Address        pgtype.Text
	BlocksProposed pgtype.Int4
}

type GetRollupReportForNodeAndIdParams

type GetRollupReportForNodeAndIdParams struct {
	Address     string
	SlaRollupID pgtype.Int4
}

type GetRollupReportsForNodeInTimeRangeParams

type GetRollupReportsForNodeInTimeRangeParams struct {
	Address string
	Time    pgtype.Timestamp
	Time_2  pgtype.Timestamp
}

type GetRollupReportsForNodeInTimeRangeRow

type GetRollupReportsForNodeInTimeRangeRow struct {
	ID             int32
	TxHash         string
	BlockStart     int64
	BlockEnd       int64
	Time           pgtype.Timestamp
	Address        pgtype.Text
	BlocksProposed pgtype.Int4
	ValidatorCount int64
}

type GetRollupReportsForNodesInTimeRangeParams

type GetRollupReportsForNodesInTimeRangeParams struct {
	Column1 []string
	Time    pgtype.Timestamp
	Time_2  pgtype.Timestamp
}

type GetRollupReportsForNodesInTimeRangeRow

type GetRollupReportsForNodesInTimeRangeRow struct {
	ID             int32
	TxHash         string
	BlockStart     int64
	BlockEnd       int64
	Time           pgtype.Timestamp
	Address        string
	BlocksProposed pgtype.Int4
	ValidatorCount int64
}

type GetStorageProofParams

type GetStorageProofParams struct {
	BlockHeight int64
	Address     string
}

type GetStorageProofRollupForNodeParams

type GetStorageProofRollupForNodeParams struct {
	Address       string
	BlockHeight   int64
	BlockHeight_2 int64
}

type GetStorageProofRollupForNodeRow

type GetStorageProofRollupForNodeRow struct {
	Address     string
	FailedCount int64
	TotalCount  int64
}

type GetStorageProofRollupsParams

type GetStorageProofRollupsParams struct {
	BlockHeight   int64
	BlockHeight_2 int64
}

type GetStorageProofRollupsRow

type GetStorageProofRollupsRow struct {
	Address     string
	FailedCount int64
	TotalCount  int64
}

type GetStorageProofsForNodeInRangeParams

type GetStorageProofsForNodeInRangeParams struct {
	BlockHeight   int64
	BlockHeight_2 int64
	Address       string
}

type GetValidatorHistoryForIDParams

type GetValidatorHistoryForIDParams struct {
	SpID        int64
	ServiceType string
}

type HasAccessToTrackReleaseParams

type HasAccessToTrackReleaseParams struct {
	TrackID string
	PubKey  string
}

type InsertAccessKeyParams

type InsertAccessKeyParams struct {
	TrackID string
	PubKey  string
}

type InsertCoreDealParams

type InsertCoreDealParams struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
}

type InsertCoreERNParams

type InsertCoreERNParams struct {
	Address            string
	TxHash             string
	Index              int64
	Sender             string
	MessageControlType int16
	RawMessage         []byte
	RawAcknowledgment  []byte
	BlockHeight        int64
}

type InsertCoreMEADParams

type InsertCoreMEADParams struct {
	Address           string
	TxHash            string
	Index             int64
	Sender            string
	ResourceAddresses []string
	ReleaseAddresses  []string
	RawMessage        []byte
	RawAcknowledgment []byte
	BlockHeight       int64
}

type InsertCorePIEParams

type InsertCorePIEParams struct {
	Address           string
	TxHash            string
	Index             int64
	Sender            string
	PartyAddresses    []string
	RawMessage        []byte
	RawAcknowledgment []byte
	BlockHeight       int64
}

type InsertCorePartyParams

type InsertCorePartyParams struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
}

type InsertCoreReleaseParams

type InsertCoreReleaseParams struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
}

type InsertCoreResourceParams

type InsertCoreResourceParams struct {
	Address     string
	ErnAddress  string
	EntityType  string
	EntityIndex int32
	TxHash      string
	BlockHeight int64
}

type InsertCoreRewardParams

type InsertCoreRewardParams struct {
	Address          string
	TxHash           string
	Index            int64
	Sender           string
	RewardID         string
	Name             string
	Amount           int64
	ClaimAuthorities []string
	RawMessage       []byte
	BlockHeight      int64
}

type InsertDecodedManageEntityParams

type InsertDecodedManageEntityParams struct {
	TxHash     string
	UserID     int64
	EntityType string
	EntityID   int64
	Action     string
	Metadata   string
	Signature  string
	Signer     string
	Nonce      string
	CreatedAt  pgtype.Timestamptz
}

type InsertDecodedPlayParams

type InsertDecodedPlayParams struct {
	TxHash    string
	UserID    string
	TrackID   string
	PlayedAt  pgtype.Timestamptz
	Signature string
	City      pgtype.Text
	Region    pgtype.Text
	Country   pgtype.Text
	CreatedAt pgtype.Timestamptz
}

type InsertDecodedSlaRollupParams

type InsertDecodedSlaRollupParams struct {
	TxHash     string
	BlockStart int64
	BlockEnd   int64
	Timestamp  pgtype.Timestamptz
	CreatedAt  pgtype.Timestamptz
}

type InsertDecodedStorageProofParams

type InsertDecodedStorageProofParams struct {
	TxHash          string
	Height          int64
	Address         string
	Cid             pgtype.Text
	ProofSignature  []byte
	ProverAddresses []string
	CreatedAt       pgtype.Timestamptz
}

type InsertDecodedStorageProofVerificationParams

type InsertDecodedStorageProofVerificationParams struct {
	TxHash    string
	Height    int64
	Proof     []byte
	CreatedAt pgtype.Timestamptz
}

type InsertDecodedValidatorDeregistrationParams

type InsertDecodedValidatorDeregistrationParams struct {
	TxHash       string
	CometAddress string
	PubKey       []byte
	CreatedAt    pgtype.Timestamptz
}

type InsertDecodedValidatorRegistrationParams

type InsertDecodedValidatorRegistrationParams struct {
	TxHash       string
	Endpoint     string
	CometAddress string
	EthBlock     string
	NodeType     string
	SpID         string
	PubKey       []byte
	Power        int64
	CreatedAt    pgtype.Timestamptz
}

type InsertEtlDuplicateParams

type InsertEtlDuplicateParams struct {
	TxHash        string
	TableName     string
	DuplicateType string
}

type InsertEtlTxParams

type InsertEtlTxParams struct {
	BlockHeight int64
	TxIndex     int32
	TxHash      string
	TxType      string
	TxData      []byte
	CreatedAt   pgtype.Timestamptz
}

type InsertFailedStorageProofParams

type InsertFailedStorageProofParams struct {
	BlockHeight int64
	Address     string
}

type InsertFileUploadParams

type InsertFileUploadParams struct {
	UploaderAddress    string
	Cid                string
	TranscodedCid      string
	Upid               string
	UploadSignature    string
	ValidatorAddress   string
	ValidatorSignature string
	TxHash             string
	BlockHeight        int64
}

type InsertManagementKeyParams

type InsertManagementKeyParams struct {
	TrackID string
	Address string
}

type InsertRegisteredNodeParams

type InsertRegisteredNodeParams struct {
	PubKey       string
	Endpoint     string
	EthAddress   string
	CometAddress string
	CometPubKey  string
	EthBlock     string
	NodeType     string
	SpID         string
}

type InsertSoundRecordingParams

type InsertSoundRecordingParams struct {
	SoundRecordingID string
	TrackID          string
	Cid              string
	EncodingDetails  pgtype.Text
}

type InsertStorageProofParams

type InsertStorageProofParams struct {
	BlockHeight     int64
	Address         string
	Cid             pgtype.Text
	ProofSignature  pgtype.Text
	ProverAddresses []string
}

type InsertStorageProofPeersParams

type InsertStorageProofPeersParams struct {
	BlockHeight     int64
	ProverAddresses []string
}

type InsertTxStatParams

type InsertTxStatParams struct {
	TxType      string
	TxHash      string
	BlockHeight int64
	CreatedAt   pgtype.Timestamp
}

type ManagementKey

type ManagementKey struct {
	ID      int32
	TrackID string
	Address string
}

type NullProofStatus

type NullProofStatus struct {
	ProofStatus ProofStatus
	Valid       bool // Valid is true if ProofStatus is not NULL
}

func (*NullProofStatus) Scan

func (ns *NullProofStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullProofStatus) Value

func (ns NullProofStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type ProofStatus

type ProofStatus string
const (
	ProofStatusUnresolved ProofStatus = "unresolved"
	ProofStatusPass       ProofStatus = "pass"
	ProofStatusFail       ProofStatus = "fail"
)

func (*ProofStatus) Scan

func (e *ProofStatus) Scan(src interface{}) error

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AppendValidatorHistory

func (q *Queries) AppendValidatorHistory(ctx context.Context, arg AppendValidatorHistoryParams) error

func (*Queries) CheckDatabaseExists

func (q *Queries) CheckDatabaseExists(ctx context.Context, datname string) (bool, error)

func (*Queries) ClearUncommittedSlaNodeReports

func (q *Queries) ClearUncommittedSlaNodeReports(ctx context.Context) error

func (*Queries) CommitSlaNodeReport

func (q *Queries) CommitSlaNodeReport(ctx context.Context, arg CommitSlaNodeReportParams) error

func (*Queries) CommitSlaRollup

func (q *Queries) CommitSlaRollup(ctx context.Context, arg CommitSlaRollupParams) (int32, error)

func (*Queries) DeleteCoreReward

func (q *Queries) DeleteCoreReward(ctx context.Context, address string) error

func (*Queries) DeleteRegisteredNode

func (q *Queries) DeleteRegisteredNode(ctx context.Context, cometAddress string) error

func (*Queries) GetActiveRewards

func (q *Queries) GetActiveRewards(ctx context.Context) ([]CoreReward, error)

func (*Queries) GetAllEthAddressesOfRegisteredNodes

func (q *Queries) GetAllEthAddressesOfRegisteredNodes(ctx context.Context) ([]string, error)

func (*Queries) GetAllRegisteredNodes

func (q *Queries) GetAllRegisteredNodes(ctx context.Context) ([]CoreValidator, error)

func (*Queries) GetAllRegisteredNodesSorted

func (q *Queries) GetAllRegisteredNodesSorted(ctx context.Context) ([]CoreValidator, error)

func (*Queries) GetAllRewards

func (q *Queries) GetAllRewards(ctx context.Context) ([]CoreReward, error)

func (*Queries) GetAppStateAtHeight

func (q *Queries) GetAppStateAtHeight(ctx context.Context, blockHeight int64) (GetAppStateAtHeightRow, error)

func (*Queries) GetAvailableCities

func (q *Queries) GetAvailableCities(ctx context.Context, arg GetAvailableCitiesParams) ([]GetAvailableCitiesRow, error)

func (*Queries) GetAvailableCountries

func (q *Queries) GetAvailableCountries(ctx context.Context, limit int32) ([]GetAvailableCountriesRow, error)

func (*Queries) GetAvailableRegions

func (q *Queries) GetAvailableRegions(ctx context.Context, arg GetAvailableRegionsParams) ([]GetAvailableRegionsRow, error)

func (*Queries) GetBlock

func (q *Queries) GetBlock(ctx context.Context, height int64) (CoreBlock, error)

func (*Queries) GetBlockTransactions

func (q *Queries) GetBlockTransactions(ctx context.Context, blockID int64) ([]CoreTransaction, error)

func (*Queries) GetBlocksWithTransactions

func (q *Queries) GetBlocksWithTransactions(ctx context.Context, dollar_1 []int64) ([]GetBlocksWithTransactionsRow, error)

func (*Queries) GetCoreUpload

func (q *Queries) GetCoreUpload(ctx context.Context, cid string) (CoreUpload, error)

func (*Queries) GetDBSize

func (q *Queries) GetDBSize(ctx context.Context) (int64, error)

func (*Queries) GetDecodedPlays

func (q *Queries) GetDecodedPlays(ctx context.Context, limit int32) ([]GetDecodedPlaysRow, error)

func (*Queries) GetDecodedPlaysByLocation

func (q *Queries) GetDecodedPlaysByLocation(ctx context.Context, arg GetDecodedPlaysByLocationParams) ([]GetDecodedPlaysByLocationRow, error)

func (*Queries) GetDecodedPlaysByTimeRange

func (q *Queries) GetDecodedPlaysByTimeRange(ctx context.Context, arg GetDecodedPlaysByTimeRangeParams) ([]GetDecodedPlaysByTimeRangeRow, error)

func (*Queries) GetDecodedPlaysByTrack

func (q *Queries) GetDecodedPlaysByTrack(ctx context.Context, arg GetDecodedPlaysByTrackParams) ([]GetDecodedPlaysByTrackRow, error)

func (*Queries) GetDecodedPlaysByUser

func (q *Queries) GetDecodedPlaysByUser(ctx context.Context, arg GetDecodedPlaysByUserParams) ([]GetDecodedPlaysByUserRow, error)

func (*Queries) GetDecodedTx

func (q *Queries) GetDecodedTx(ctx context.Context, txHash string) (CoreEtlTx, error)

func (*Queries) GetDecodedTxsByBlock

func (q *Queries) GetDecodedTxsByBlock(ctx context.Context, blockHeight int64) ([]CoreEtlTx, error)

func (*Queries) GetDecodedTxsByType

func (q *Queries) GetDecodedTxsByType(ctx context.Context, arg GetDecodedTxsByTypeParams) ([]CoreEtlTx, error)

func (*Queries) GetERN

func (q *Queries) GetERN(ctx context.Context, address string) (CoreErn, error)

func (*Queries) GetERNContainingAddress

func (q *Queries) GetERNContainingAddress(ctx context.Context, dollar_1 string) (GetERNContainingAddressRow, error)

func (*Queries) GetERNDeals

func (q *Queries) GetERNDeals(ctx context.Context, ernAddress string) ([]CoreDeal, error)

func (*Queries) GetERNParties

func (q *Queries) GetERNParties(ctx context.Context, ernAddress string) ([]CoreParty, error)

func (*Queries) GetERNReceipts

func (q *Queries) GetERNReceipts(ctx context.Context, txHash string) ([]GetERNReceiptsRow, error)

func (*Queries) GetERNReleases

func (q *Queries) GetERNReleases(ctx context.Context, ernAddress string) ([]CoreRelease, error)

func (*Queries) GetERNResources

func (q *Queries) GetERNResources(ctx context.Context, ernAddress string) ([]CoreResource, error)

func (*Queries) GetInProgressRollupReports

func (q *Queries) GetInProgressRollupReports(ctx context.Context) ([]SlaNodeReport, error)

func (*Queries) GetLatestAppState

func (q *Queries) GetLatestAppState(ctx context.Context) (GetLatestAppStateRow, error)

func (*Queries) GetLatestBlock

func (q *Queries) GetLatestBlock(ctx context.Context) (CoreBlock, error)

func (*Queries) GetLatestDecodedTxs

func (q *Queries) GetLatestDecodedTxs(ctx context.Context, limit int32) ([]CoreEtlTx, error)

func (*Queries) GetLatestSlaRollup

func (q *Queries) GetLatestSlaRollup(ctx context.Context) (SlaRollup, error)

func (*Queries) GetMEAD

func (q *Queries) GetMEAD(ctx context.Context, address string) (CoreMead, error)

func (*Queries) GetMEADReceipts

func (q *Queries) GetMEADReceipts(ctx context.Context, txHash string) ([]GetMEADReceiptsRow, error)

func (*Queries) GetNodeByEndpoint

func (q *Queries) GetNodeByEndpoint(ctx context.Context, endpoint string) (CoreValidator, error)

func (*Queries) GetNodesByEndpoints

func (q *Queries) GetNodesByEndpoints(ctx context.Context, dollar_1 []string) ([]CoreValidator, error)

func (*Queries) GetPIE

func (q *Queries) GetPIE(ctx context.Context, address string) (CorePie, error)

func (*Queries) GetPIEReceipts

func (q *Queries) GetPIEReceipts(ctx context.Context, txHash string) ([]GetPIEReceiptsRow, error)

func (*Queries) GetPreviousSlaRollupFromId

func (q *Queries) GetPreviousSlaRollupFromId(ctx context.Context, id int32) (SlaRollup, error)

func (*Queries) GetRecentBlocks

func (q *Queries) GetRecentBlocks(ctx context.Context, limit int32) ([]CoreBlock, error)

func (*Queries) GetRecentRollupsForNode

func (q *Queries) GetRecentRollupsForNode(ctx context.Context, arg GetRecentRollupsForNodeParams) ([]GetRecentRollupsForNodeRow, error)

func (*Queries) GetRecentTxs

func (q *Queries) GetRecentTxs(ctx context.Context, limit int32) ([]CoreTransaction, error)

func (*Queries) GetRecordingsForTrack

func (q *Queries) GetRecordingsForTrack(ctx context.Context, trackID string) ([]SoundRecording, error)

func (*Queries) GetRegisteredNodeByCometAddress

func (q *Queries) GetRegisteredNodeByCometAddress(ctx context.Context, cometAddress string) (CoreValidator, error)

func (*Queries) GetRegisteredNodeByEthAddress

func (q *Queries) GetRegisteredNodeByEthAddress(ctx context.Context, ethAddress string) (CoreValidator, error)

func (*Queries) GetRegisteredNodesByCometAddresses

func (q *Queries) GetRegisteredNodesByCometAddresses(ctx context.Context, dollar_1 []string) ([]CoreValidator, error)

func (*Queries) GetRegisteredNodesByEthAddresses

func (q *Queries) GetRegisteredNodesByEthAddresses(ctx context.Context, dollar_1 []string) ([]CoreValidator, error)

func (*Queries) GetRegisteredNodesByType

func (q *Queries) GetRegisteredNodesByType(ctx context.Context, nodeType string) ([]CoreValidator, error)

func (*Queries) GetReward

func (q *Queries) GetReward(ctx context.Context, address string) (CoreReward, error)

func (*Queries) GetRewardByID

func (q *Queries) GetRewardByID(ctx context.Context, rewardID string) (CoreReward, error)

func (*Queries) GetRewardByTxHash

func (q *Queries) GetRewardByTxHash(ctx context.Context, txHash string) (CoreReward, error)

func (*Queries) GetRewardsByClaimAuthority

func (q *Queries) GetRewardsByClaimAuthority(ctx context.Context, dollar_1 string) ([]CoreReward, error)

func (*Queries) GetRollupReportForNodeAndId

func (q *Queries) GetRollupReportForNodeAndId(ctx context.Context, arg GetRollupReportForNodeAndIdParams) (SlaNodeReport, error)

func (*Queries) GetRollupReportsForId

func (q *Queries) GetRollupReportsForId(ctx context.Context, slaRollupID pgtype.Int4) ([]SlaNodeReport, error)

func (*Queries) GetSlaRollupWithBlockEnd

func (q *Queries) GetSlaRollupWithBlockEnd(ctx context.Context, blockEnd int64) (SlaRollup, error)

func (*Queries) GetSlaRollupWithId

func (q *Queries) GetSlaRollupWithId(ctx context.Context, id int32) (SlaRollup, error)

func (*Queries) GetSlaRollupWithTimestamp

func (q *Queries) GetSlaRollupWithTimestamp(ctx context.Context, time pgtype.Timestamp) (SlaRollup, error)

func (*Queries) GetStorageProof

func (q *Queries) GetStorageProof(ctx context.Context, arg GetStorageProofParams) (StorageProof, error)

func (*Queries) GetStorageProofPeers

func (q *Queries) GetStorageProofPeers(ctx context.Context, blockHeight int64) ([]string, error)

func (*Queries) GetStorageProofRollups

func (q *Queries) GetStorageProofRollups(ctx context.Context, arg GetStorageProofRollupsParams) ([]GetStorageProofRollupsRow, error)

func (*Queries) GetStorageProofs

func (q *Queries) GetStorageProofs(ctx context.Context, blockHeight int64) ([]StorageProof, error)

func (*Queries) GetStorageProofsForNodeInRange

func (q *Queries) GetStorageProofsForNodeInRange(ctx context.Context, arg GetStorageProofsForNodeInRangeParams) ([]StorageProof, error)

func (*Queries) GetTx

func (q *Queries) GetTx(ctx context.Context, lower string) (CoreTransaction, error)

func (*Queries) GetValidatorHistoryForID

func (q *Queries) GetValidatorHistoryForID(ctx context.Context, arg GetValidatorHistoryForIDParams) (ValidatorHistory, error)

func (*Queries) HasAccessToTrackRelease

func (q *Queries) HasAccessToTrackRelease(ctx context.Context, arg HasAccessToTrackReleaseParams) (bool, error)

func (*Queries) InsertAccessKey

func (q *Queries) InsertAccessKey(ctx context.Context, arg InsertAccessKeyParams) error

func (*Queries) InsertCoreDeal

func (q *Queries) InsertCoreDeal(ctx context.Context, arg InsertCoreDealParams) error

func (*Queries) InsertCoreERN

func (q *Queries) InsertCoreERN(ctx context.Context, arg InsertCoreERNParams) error

ERN, MEAD, PIE insert queries - using protobuf storage with new schema

func (*Queries) InsertCoreMEAD

func (q *Queries) InsertCoreMEAD(ctx context.Context, arg InsertCoreMEADParams) error

func (*Queries) InsertCorePIE

func (q *Queries) InsertCorePIE(ctx context.Context, arg InsertCorePIEParams) error

func (*Queries) InsertCoreParty

func (q *Queries) InsertCoreParty(ctx context.Context, arg InsertCorePartyParams) error

func (*Queries) InsertCoreRelease

func (q *Queries) InsertCoreRelease(ctx context.Context, arg InsertCoreReleaseParams) error

func (*Queries) InsertCoreResource

func (q *Queries) InsertCoreResource(ctx context.Context, arg InsertCoreResourceParams) error

func (*Queries) InsertCoreReward

func (q *Queries) InsertCoreReward(ctx context.Context, arg InsertCoreRewardParams) error

func (*Queries) InsertDecodedManageEntity

func (q *Queries) InsertDecodedManageEntity(ctx context.Context, arg InsertDecodedManageEntityParams) error

func (*Queries) InsertDecodedPlay

func (q *Queries) InsertDecodedPlay(ctx context.Context, arg InsertDecodedPlayParams) error

func (*Queries) InsertDecodedSlaRollup

func (q *Queries) InsertDecodedSlaRollup(ctx context.Context, arg InsertDecodedSlaRollupParams) error

func (*Queries) InsertDecodedStorageProof

func (q *Queries) InsertDecodedStorageProof(ctx context.Context, arg InsertDecodedStorageProofParams) error

func (*Queries) InsertDecodedStorageProofVerification

func (q *Queries) InsertDecodedStorageProofVerification(ctx context.Context, arg InsertDecodedStorageProofVerificationParams) error

func (*Queries) InsertDecodedValidatorDeregistration

func (q *Queries) InsertDecodedValidatorDeregistration(ctx context.Context, arg InsertDecodedValidatorDeregistrationParams) error

func (*Queries) InsertDecodedValidatorRegistration

func (q *Queries) InsertDecodedValidatorRegistration(ctx context.Context, arg InsertDecodedValidatorRegistrationParams) error

func (*Queries) InsertEtlDuplicate

func (q *Queries) InsertEtlDuplicate(ctx context.Context, arg InsertEtlDuplicateParams) error

func (*Queries) InsertEtlTx

func (q *Queries) InsertEtlTx(ctx context.Context, arg InsertEtlTxParams) error

func (*Queries) InsertFailedStorageProof

func (q *Queries) InsertFailedStorageProof(ctx context.Context, arg InsertFailedStorageProofParams) error

func (*Queries) InsertFileUpload

func (q *Queries) InsertFileUpload(ctx context.Context, arg InsertFileUploadParams) error

func (*Queries) InsertManagementKey

func (q *Queries) InsertManagementKey(ctx context.Context, arg InsertManagementKeyParams) error

func (*Queries) InsertRegisteredNode

func (q *Queries) InsertRegisteredNode(ctx context.Context, arg InsertRegisteredNodeParams) error

func (*Queries) InsertSoundRecording

func (q *Queries) InsertSoundRecording(ctx context.Context, arg InsertSoundRecordingParams) error

func (*Queries) InsertStorageProof

func (q *Queries) InsertStorageProof(ctx context.Context, arg InsertStorageProofParams) error

func (*Queries) InsertStorageProofPeers

func (q *Queries) InsertStorageProofPeers(ctx context.Context, arg InsertStorageProofPeersParams) error

func (*Queries) InsertTrackId

func (q *Queries) InsertTrackId(ctx context.Context, trackID string) error

func (*Queries) InsertTxStat

func (q *Queries) InsertTxStat(ctx context.Context, arg InsertTxStatParams) error

func (*Queries) StoreBlock

func (q *Queries) StoreBlock(ctx context.Context, arg StoreBlockParams) error

func (*Queries) StoreTransaction

func (q *Queries) StoreTransaction(ctx context.Context, arg StoreTransactionParams) error

func (*Queries) ToPgxTimestamp

func (q *Queries) ToPgxTimestamp(t time.Time) pgtype.Timestamp

func (*Queries) TotalBlocks

func (q *Queries) TotalBlocks(ctx context.Context) (int64, error)

func (*Queries) TotalTransactions

func (q *Queries) TotalTransactions(ctx context.Context) (int64, error)

func (*Queries) TotalTransactionsByType

func (q *Queries) TotalTransactionsByType(ctx context.Context, txType string) (int64, error)

func (*Queries) TotalTxResults

func (q *Queries) TotalTxResults(ctx context.Context) (int64, error)

func (*Queries) TotalValidators

func (q *Queries) TotalValidators(ctx context.Context) (int64, error)

func (*Queries) TxsPerHour

func (q *Queries) TxsPerHour(ctx context.Context) ([]TxsPerHourRow, error)

func (*Queries) UpdateCoreReward

func (q *Queries) UpdateCoreReward(ctx context.Context, arg UpdateCoreRewardParams) error

func (*Queries) UpdateStorageProof

func (q *Queries) UpdateStorageProof(ctx context.Context, arg UpdateStorageProofParams) error

func (*Queries) UpsertAppState

func (q *Queries) UpsertAppState(ctx context.Context, arg UpsertAppStateParams) error

func (*Queries) UpsertSlaRollupReport

func (q *Queries) UpsertSlaRollupReport(ctx context.Context, address string) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type SlaNodeReport

type SlaNodeReport struct {
	ID             int32
	Address        string
	BlocksProposed int32
	SlaRollupID    pgtype.Int4
}

type SlaRollup

type SlaRollup struct {
	ID         int32
	TxHash     string
	BlockStart int64
	BlockEnd   int64
	Time       pgtype.Timestamp
}

type SoundRecording

type SoundRecording struct {
	ID               int32
	SoundRecordingID string
	TrackID          string
	Cid              string
	EncodingDetails  pgtype.Text
}

type StorageProof

type StorageProof struct {
	ID              int32
	BlockHeight     int64
	Address         string
	Cid             pgtype.Text
	ProofSignature  pgtype.Text
	Proof           pgtype.Text
	ProverAddresses []string
	Status          ProofStatus
}

type StorageProofPeer

type StorageProofPeer struct {
	ID              int32
	BlockHeight     int64
	ProverAddresses []string
}

type StoreBlockParams

type StoreBlockParams struct {
	Height    int64
	ChainID   string
	Hash      string
	Proposer  string
	CreatedAt pgtype.Timestamp
}

type StoreTransactionParams

type StoreTransactionParams struct {
	BlockID     int64
	Index       int32
	TxHash      string
	Transaction []byte
	CreatedAt   pgtype.Timestamp
}

type TrackRelease

type TrackRelease struct {
	ID      int32
	TrackID string
}

type TxsPerHourRow

type TxsPerHourRow struct {
	Hour    pgtype.Timestamp
	TxType  string
	TxCount int64
}

type UpdateCoreRewardParams

type UpdateCoreRewardParams struct {
	Address          string
	Name             string
	Amount           int64
	ClaimAuthorities []string
	RawMessage       []byte
	BlockHeight      int64
}

type UpdateStorageProofParams

type UpdateStorageProofParams struct {
	Proof       pgtype.Text
	Status      ProofStatus
	BlockHeight int64
	Address     string
}

type UpsertAppStateParams

type UpsertAppStateParams struct {
	BlockHeight int64
	AppHash     []byte
}

type ValidatorEventType

type ValidatorEventType string
const (
	ValidatorEventRegistered   ValidatorEventType = "registered"
	ValidatorEventDeregistered ValidatorEventType = "deregistered"
)

type ValidatorHistory

type ValidatorHistory struct {
	Rowid        int32
	Endpoint     string
	EthAddress   string
	CometAddress string
	SpID         int64
	ServiceType  string
	EventType    ValidatorEventType
	EventTime    pgtype.Timestamp
	EventBlock   int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL