db

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 15 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 AssociatedWallet

type AssociatedWallet struct {
	ID          int32            `json:"id"`
	UserID      int32            `json:"user_id"`
	Wallet      string           `json:"wallet"`
	Chain       string           `json:"chain"`
	IsCurrent   bool             `json:"is_current"`
	IsDelete    bool             `json:"is_delete"`
	Blockhash   string           `json:"blockhash"`
	Blocknumber pgtype.Int4      `json:"blocknumber"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	UpdatedAt   pgtype.Timestamp `json:"updated_at"`
}

type Block

type Block struct {
	Blockhash  string      `json:"blockhash"`
	Parenthash pgtype.Text `json:"parenthash"`
	IsCurrent  pgtype.Bool `json:"is_current"`
	Number     pgtype.Int4 `json:"number"`
}

type Comment

type Comment struct {
	CommentID       int32            `json:"comment_id"`
	Text            string           `json:"text"`
	UserID          int32            `json:"user_id"`
	EntityID        int32            `json:"entity_id"`
	EntityType      string           `json:"entity_type"`
	TrackTimestampS pgtype.Int4      `json:"track_timestamp_s"`
	CreatedAt       pgtype.Timestamp `json:"created_at"`
	UpdatedAt       pgtype.Timestamp `json:"updated_at"`
	IsDelete        pgtype.Bool      `json:"is_delete"`
	IsVisible       pgtype.Bool      `json:"is_visible"`
	IsEdited        pgtype.Bool      `json:"is_edited"`
	Txhash          string           `json:"txhash"`
	Blockhash       string           `json:"blockhash"`
	Blocknumber     int32            `json:"blocknumber"`
}

type CommentMention

type CommentMention struct {
	CommentID   int32            `json:"comment_id"`
	UserID      int32            `json:"user_id"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	UpdatedAt   pgtype.Timestamp `json:"updated_at"`
	IsDelete    bool             `json:"is_delete"`
	Txhash      string           `json:"txhash"`
	Blockhash   string           `json:"blockhash"`
	Blocknumber int32            `json:"blocknumber"`
}

type CommentNotificationSetting

type CommentNotificationSetting struct {
	UserID     int32            `json:"user_id"`
	EntityID   int32            `json:"entity_id"`
	EntityType string           `json:"entity_type"`
	IsMuted    pgtype.Bool      `json:"is_muted"`
	CreatedAt  pgtype.Timestamp `json:"created_at"`
	UpdatedAt  pgtype.Timestamp `json:"updated_at"`
}

type CommentReaction

type CommentReaction struct {
	CommentID   int32            `json:"comment_id"`
	UserID      int32            `json:"user_id"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	UpdatedAt   pgtype.Timestamp `json:"updated_at"`
	IsDelete    bool             `json:"is_delete"`
	Txhash      string           `json:"txhash"`
	Blockhash   string           `json:"blockhash"`
	Blocknumber int32            `json:"blocknumber"`
}

type CommentReport

type CommentReport struct {
	CommentID   int32            `json:"comment_id"`
	UserID      int32            `json:"user_id"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	UpdatedAt   pgtype.Timestamp `json:"updated_at"`
	IsDelete    bool             `json:"is_delete"`
	Txhash      string           `json:"txhash"`
	Blockhash   string           `json:"blockhash"`
	Blocknumber int32            `json:"blocknumber"`
}

type CommentThread

type CommentThread struct {
	ParentCommentID int32 `json:"parent_comment_id"`
	CommentID       int32 `json:"comment_id"`
}

type CoreIndexedBlock

type CoreIndexedBlock struct {
	Blockhash  string      `json:"blockhash"`
	Parenthash pgtype.Text `json:"parenthash"`
	ChainID    string      `json:"chain_id"`
	Height     int32       `json:"height"`
	PlaysSlot  pgtype.Int4 `json:"plays_slot"`
	EmBlock    pgtype.Int4 `json:"em_block"`
}

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 DashboardWalletUser

type DashboardWalletUser struct {
	Wallet      string           `json:"wallet"`
	UserID      int32            `json:"user_id"`
	IsDelete    bool             `json:"is_delete"`
	Txhash      string           `json:"txhash"`
	Blockhash   string           `json:"blockhash"`
	Blocknumber pgtype.Int4      `json:"blocknumber"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	UpdatedAt   pgtype.Timestamp `json:"updated_at"`
}

type DeregisterValidatorParams

type DeregisterValidatorParams struct {
	DeregisteredAt pgtype.Int8      `json:"deregistered_at"`
	UpdatedAt      pgtype.Timestamp `json:"updated_at"`
	Status         string           `json:"status"`
	CometAddress   string           `json:"comet_address"`
}

type DeveloperApp

type DeveloperApp struct {
	Address          string           `json:"address"`
	Blockhash        pgtype.Text      `json:"blockhash"`
	Blocknumber      pgtype.Int4      `json:"blocknumber"`
	UserID           pgtype.Int4      `json:"user_id"`
	Name             string           `json:"name"`
	IsPersonalAccess bool             `json:"is_personal_access"`
	IsDelete         bool             `json:"is_delete"`
	CreatedAt        pgtype.Timestamp `json:"created_at"`
	Txhash           string           `json:"txhash"`
	IsCurrent        bool             `json:"is_current"`
	UpdatedAt        pgtype.Timestamp `json:"updated_at"`
	Description      pgtype.Text      `json:"description"`
	ImageUrl         pgtype.Text      `json:"image_url"`
}

type EmailAccess

type EmailAccess struct {
	EmailOwnerUserID int32            `json:"email_owner_user_id"`
	ReceivingUserID  int32            `json:"receiving_user_id"`
	GrantorUserID    int32            `json:"grantor_user_id"`
	EncryptedKey     string           `json:"encrypted_key"`
	CreatedAt        pgtype.Timestamp `json:"created_at"`
	UpdatedAt        pgtype.Timestamp `json:"updated_at"`
}

type EncryptedEmail

type EncryptedEmail struct {
	EmailOwnerUserID int32            `json:"email_owner_user_id"`
	EncryptedEmail   string           `json:"encrypted_email"`
	CreatedAt        pgtype.Timestamp `json:"created_at"`
	UpdatedAt        pgtype.Timestamp `json:"updated_at"`
}

type EtlAddress

type EtlAddress struct {
	ID                   int32            `json:"id"`
	Address              string           `json:"address"`
	PubKey               []byte           `json:"pub_key"`
	FirstSeenBlockHeight pgtype.Int8      `json:"first_seen_block_height"`
	CreatedAt            pgtype.Timestamp `json:"created_at"`
}

type EtlBlock

type EtlBlock struct {
	ID              int32            `json:"id"`
	ProposerAddress string           `json:"proposer_address"`
	BlockHeight     int64            `json:"block_height"`
	BlockTime       pgtype.Timestamp `json:"block_time"`
}

type EtlManageEntity

type EtlManageEntity struct {
	ID          int32            `json:"id"`
	Address     string           `json:"address"`
	EntityType  string           `json:"entity_type"`
	EntityID    int64            `json:"entity_id"`
	Action      string           `json:"action"`
	Metadata    pgtype.Text      `json:"metadata"`
	Signature   string           `json:"signature"`
	Signer      string           `json:"signer"`
	Nonce       string           `json:"nonce"`
	BlockHeight int64            `json:"block_height"`
	TxHash      string           `json:"tx_hash"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type EtlPlay

type EtlPlay struct {
	ID          int32            `json:"id"`
	UserID      string           `json:"user_id"`
	TrackID     string           `json:"track_id"`
	City        string           `json:"city"`
	Region      string           `json:"region"`
	Country     string           `json:"country"`
	PlayedAt    pgtype.Timestamp `json:"played_at"`
	BlockHeight int64            `json:"block_height"`
	TxHash      string           `json:"tx_hash"`
	ListenedAt  pgtype.Timestamp `json:"listened_at"`
	RecordedAt  pgtype.Timestamp `json:"recorded_at"`
}

type EtlSlaNodeReport

type EtlSlaNodeReport struct {
	ID                 int32            `json:"id"`
	SlaRollupID        int32            `json:"sla_rollup_id"`
	Address            string           `json:"address"`
	NumBlocksProposed  int32            `json:"num_blocks_proposed"`
	ChallengesReceived int32            `json:"challenges_received"`
	ChallengesFailed   int32            `json:"challenges_failed"`
	BlockHeight        int64            `json:"block_height"`
	TxHash             string           `json:"tx_hash"`
	CreatedAt          pgtype.Timestamp `json:"created_at"`
}

type EtlSlaRollup

type EtlSlaRollup struct {
	ID             int32            `json:"id"`
	BlockStart     int64            `json:"block_start"`
	BlockEnd       int64            `json:"block_end"`
	BlockHeight    int64            `json:"block_height"`
	ValidatorCount int32            `json:"validator_count"`
	BlockQuota     int32            `json:"block_quota"`
	Bps            float64          `json:"bps"`
	Tps            float64          `json:"tps"`
	TxHash         string           `json:"tx_hash"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
}

type EtlStorageProof

type EtlStorageProof struct {
	ID              int32            `json:"id"`
	Height          int64            `json:"height"`
	Address         string           `json:"address"`
	ProverAddresses []string         `json:"prover_addresses"`
	Cid             string           `json:"cid"`
	ProofSignature  []byte           `json:"proof_signature"`
	Proof           []byte           `json:"proof"`
	Status          interface{}      `json:"status"`
	BlockHeight     int64            `json:"block_height"`
	TxHash          string           `json:"tx_hash"`
	CreatedAt       pgtype.Timestamp `json:"created_at"`
}

type EtlStorageProofVerification

type EtlStorageProofVerification struct {
	ID          int32            `json:"id"`
	Height      int64            `json:"height"`
	Proof       []byte           `json:"proof"`
	BlockHeight int64            `json:"block_height"`
	TxHash      string           `json:"tx_hash"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type EtlTransaction

type EtlTransaction struct {
	ID          int32            `json:"id"`
	TxHash      string           `json:"tx_hash"`
	BlockHeight int64            `json:"block_height"`
	TxIndex     int32            `json:"tx_index"`
	TxType      string           `json:"tx_type"`
	Address     pgtype.Text      `json:"address"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type EtlValidator

type EtlValidator struct {
	ID             int32            `json:"id"`
	Address        string           `json:"address"`
	Endpoint       string           `json:"endpoint"`
	CometAddress   string           `json:"comet_address"`
	NodeType       string           `json:"node_type"`
	Spid           string           `json:"spid"`
	VotingPower    int64            `json:"voting_power"`
	Status         string           `json:"status"`
	RegisteredAt   int64            `json:"registered_at"`
	DeregisteredAt pgtype.Int8      `json:"deregistered_at"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	UpdatedAt      pgtype.Timestamp `json:"updated_at"`
}

type EtlValidatorDeregistration

type EtlValidatorDeregistration struct {
	ID           int32  `json:"id"`
	CometAddress string `json:"comet_address"`
	CometPubkey  []byte `json:"comet_pubkey"`
	BlockHeight  int64  `json:"block_height"`
	TxHash       string `json:"tx_hash"`
}

type EtlValidatorMisbehaviorDeregistration

type EtlValidatorMisbehaviorDeregistration struct {
	ID           int32            `json:"id"`
	CometAddress string           `json:"comet_address"`
	PubKey       []byte           `json:"pub_key"`
	BlockHeight  int64            `json:"block_height"`
	TxHash       string           `json:"tx_hash"`
	CreatedAt    pgtype.Timestamp `json:"created_at"`
}

type EtlValidatorRegistration

type EtlValidatorRegistration struct {
	ID           int32  `json:"id"`
	Address      string `json:"address"`
	Endpoint     string `json:"endpoint"`
	CometAddress string `json:"comet_address"`
	EthBlock     string `json:"eth_block"`
	NodeType     string `json:"node_type"`
	Spid         string `json:"spid"`
	CometPubkey  []byte `json:"comet_pubkey"`
	VotingPower  int64  `json:"voting_power"`
	BlockHeight  int64  `json:"block_height"`
	TxHash       string `json:"tx_hash"`
}

type Event

type Event struct {
	EventID     int32            `json:"event_id"`
	EventType   string           `json:"event_type"`
	UserID      int32            `json:"user_id"`
	EntityType  pgtype.Text      `json:"entity_type"`
	EntityID    pgtype.Int4      `json:"entity_id"`
	EndDate     pgtype.Timestamp `json:"end_date"`
	EventData   []byte           `json:"event_data"`
	IsDeleted   bool             `json:"is_deleted"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	UpdatedAt   pgtype.Timestamp `json:"updated_at"`
	Txhash      string           `json:"txhash"`
	Blockhash   string           `json:"blockhash"`
	Blocknumber pgtype.Int4      `json:"blocknumber"`
}

type Follow

type Follow struct {
	Blockhash      pgtype.Text      `json:"blockhash"`
	Blocknumber    pgtype.Int4      `json:"blocknumber"`
	FollowerUserID int32            `json:"follower_user_id"`
	FolloweeUserID int32            `json:"followee_user_id"`
	IsCurrent      bool             `json:"is_current"`
	IsDelete       bool             `json:"is_delete"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	Txhash         string           `json:"txhash"`
	Slot           pgtype.Int4      `json:"slot"`
}

type GetActiveValidatorsParams

type GetActiveValidatorsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetAllActiveValidatorsWithRecentRollupsRow

type GetAllActiveValidatorsWithRecentRollupsRow struct {
	ID                 int32            `json:"id"`
	Address            string           `json:"address"`
	Endpoint           string           `json:"endpoint"`
	CometAddress       string           `json:"comet_address"`
	NodeType           string           `json:"node_type"`
	Spid               string           `json:"spid"`
	VotingPower        int64            `json:"voting_power"`
	Status             string           `json:"status"`
	RegisteredAt       int64            `json:"registered_at"`
	DeregisteredAt     pgtype.Int8      `json:"deregistered_at"`
	CreatedAt          pgtype.Timestamp `json:"created_at"`
	UpdatedAt          pgtype.Timestamp `json:"updated_at"`
	SlaRollupID        pgtype.Int4      `json:"sla_rollup_id"`
	NumBlocksProposed  pgtype.Int4      `json:"num_blocks_proposed"`
	ChallengesReceived pgtype.Int4      `json:"challenges_received"`
	ChallengesFailed   pgtype.Int4      `json:"challenges_failed"`
	ReportBlockHeight  pgtype.Int8      `json:"report_block_height"`
	ReportCreatedAt    pgtype.Timestamp `json:"report_created_at"`
}

type GetBlockRangeFirstParams

type GetBlockRangeFirstParams struct {
	BlockTime   pgtype.Timestamp `json:"block_time"`
	BlockTime_2 pgtype.Timestamp `json:"block_time_2"`
}

type GetBlockRangeLastParams

type GetBlockRangeLastParams struct {
	BlockTime   pgtype.Timestamp `json:"block_time"`
	BlockTime_2 pgtype.Timestamp `json:"block_time_2"`
}

type GetBlocksByPageParams

type GetBlocksByPageParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetChallengeStatisticsForBlockRangeParams

type GetChallengeStatisticsForBlockRangeParams struct {
	Height   int64 `json:"height"`
	Height_2 int64 `json:"height_2"`
}

type GetChallengeStatisticsForBlockRangeRow

type GetChallengeStatisticsForBlockRangeRow struct {
	Address            string `json:"address"`
	ChallengesReceived int64  `json:"challenges_received"`
	ChallengesFailed   int64  `json:"challenges_failed"`
}

type GetHealthyValidatorCountsForRollupsRow

type GetHealthyValidatorCountsForRollupsRow struct {
	RollupID          int32       `json:"rollup_id"`
	HealthyValidators interface{} `json:"healthy_validators"`
}

type GetManageEntitiesByBlockHeightCursorParams

type GetManageEntitiesByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetPlaysByBlockHeightCursorParams

type GetPlaysByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetSlaNodeReportsByAddressParams

type GetSlaNodeReportsByAddressParams struct {
	Lower string `json:"lower"`
	Limit int32  `json:"limit"`
}

type GetSlaNodeReportsByBlockHeightCursorParams

type GetSlaNodeReportsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetSlaRollupsByBlockHeightCursorParams

type GetSlaRollupsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetSlaRollupsWithPaginationParams

type GetSlaRollupsWithPaginationParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetStorageProofVerificationsByBlockHeightCursorParams

type GetStorageProofVerificationsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetStorageProofsByBlockHeightCursorParams

type GetStorageProofsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetTransactionCountByAddressParams

type GetTransactionCountByAddressParams struct {
	Lower   string           `json:"lower"`
	Column2 interface{}      `json:"column_2"`
	Column3 pgtype.Timestamp `json:"column_3"`
	Column4 pgtype.Timestamp `json:"column_4"`
}

type GetTransactionsByAddressParams

type GetTransactionsByAddressParams struct {
	Lower   string           `json:"lower"`
	Column2 interface{}      `json:"column_2"`
	Column3 pgtype.Timestamp `json:"column_3"`
	Column4 pgtype.Timestamp `json:"column_4"`
	Limit   int32            `json:"limit"`
	Offset  int32            `json:"offset"`
}

type GetTransactionsByAddressRow

type GetTransactionsByAddressRow struct {
	ID          int32            `json:"id"`
	TxHash      string           `json:"tx_hash"`
	BlockHeight int64            `json:"block_height"`
	TxIndex     int32            `json:"tx_index"`
	TxType      string           `json:"tx_type"`
	Address     pgtype.Text      `json:"address"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	Relation    interface{}      `json:"relation"`
}

type GetTransactionsByBlockHeightCursorParams

type GetTransactionsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetTransactionsByPageParams

type GetTransactionsByPageParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetValidatorDeregistrationsByBlockHeightCursorParams

type GetValidatorDeregistrationsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetValidatorDeregistrationsParams

type GetValidatorDeregistrationsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetValidatorDeregistrationsRow

type GetValidatorDeregistrationsRow struct {
	ID           int32       `json:"id"`
	CometAddress string      `json:"comet_address"`
	CometPubkey  []byte      `json:"comet_pubkey"`
	BlockHeight  int64       `json:"block_height"`
	TxHash       string      `json:"tx_hash"`
	Endpoint     pgtype.Text `json:"endpoint"`
	NodeType     pgtype.Text `json:"node_type"`
	Spid         pgtype.Text `json:"spid"`
	VotingPower  pgtype.Int8 `json:"voting_power"`
	Status       pgtype.Text `json:"status"`
}

type GetValidatorMisbehaviorDeregistrationsByBlockHeightCursorParams

type GetValidatorMisbehaviorDeregistrationsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetValidatorRegistrationsByBlockHeightCursorParams

type GetValidatorRegistrationsByBlockHeightCursorParams struct {
	BlockHeight int64 `json:"block_height"`
	ID          int32 `json:"id"`
	Limit       int32 `json:"limit"`
}

type GetValidatorRegistrationsParams

type GetValidatorRegistrationsParams struct {
	Limit  int32 `json:"limit"`
	Offset int32 `json:"offset"`
}

type GetValidatorRegistrationsRow

type GetValidatorRegistrationsRow struct {
	ID            int32       `json:"id"`
	Address       string      `json:"address"`
	Endpoint      string      `json:"endpoint"`
	CometAddress  string      `json:"comet_address"`
	EthBlock      string      `json:"eth_block"`
	NodeType      string      `json:"node_type"`
	Spid          string      `json:"spid"`
	CometPubkey   []byte      `json:"comet_pubkey"`
	VotingPower   int64       `json:"voting_power"`
	BlockHeight   int64       `json:"block_height"`
	TxHash        string      `json:"tx_hash"`
	Endpoint_2    pgtype.Text `json:"endpoint_2"`
	NodeType_2    pgtype.Text `json:"node_type_2"`
	Spid_2        pgtype.Text `json:"spid_2"`
	VotingPower_2 pgtype.Int8 `json:"voting_power_2"`
	Status        pgtype.Text `json:"status"`
}

type GetValidatorsForSlaRollupRow

type GetValidatorsForSlaRollupRow struct {
	ID                 int32            `json:"id"`
	Address            string           `json:"address"`
	Endpoint           string           `json:"endpoint"`
	CometAddress       string           `json:"comet_address"`
	NodeType           string           `json:"node_type"`
	Spid               string           `json:"spid"`
	VotingPower        int64            `json:"voting_power"`
	Status             string           `json:"status"`
	RegisteredAt       int64            `json:"registered_at"`
	DeregisteredAt     pgtype.Int8      `json:"deregistered_at"`
	CreatedAt          pgtype.Timestamp `json:"created_at"`
	UpdatedAt          pgtype.Timestamp `json:"updated_at"`
	NumBlocksProposed  pgtype.Int4      `json:"num_blocks_proposed"`
	ChallengesReceived pgtype.Int4      `json:"challenges_received"`
	ChallengesFailed   pgtype.Int4      `json:"challenges_failed"`
}

type Grant

type Grant struct {
	Blockhash      pgtype.Text      `json:"blockhash"`
	Blocknumber    pgtype.Int4      `json:"blocknumber"`
	GranteeAddress string           `json:"grantee_address"`
	UserID         int32            `json:"user_id"`
	IsRevoked      bool             `json:"is_revoked"`
	IsCurrent      bool             `json:"is_current"`
	IsApproved     pgtype.Bool      `json:"is_approved"`
	UpdatedAt      pgtype.Timestamp `json:"updated_at"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	Txhash         string           `json:"txhash"`
}

type InsertAddressParams

type InsertAddressParams struct {
	Address              string           `json:"address"`
	PubKey               []byte           `json:"pub_key"`
	FirstSeenBlockHeight pgtype.Int8      `json:"first_seen_block_height"`
	CreatedAt            pgtype.Timestamp `json:"created_at"`
}

type InsertBlockParams

type InsertBlockParams struct {
	ProposerAddress string           `json:"proposer_address"`
	BlockHeight     int64            `json:"block_height"`
	BlockTime       pgtype.Timestamp `json:"block_time"`
}

type InsertFailedStorageProofParams

type InsertFailedStorageProofParams struct {
	Height      int64            `json:"height"`
	Address     string           `json:"address"`
	BlockHeight int64            `json:"block_height"`
	TxHash      string           `json:"tx_hash"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type InsertManageEntityParams

type InsertManageEntityParams struct {
	Address     string           `json:"address"`
	EntityType  string           `json:"entity_type"`
	EntityID    int64            `json:"entity_id"`
	Action      string           `json:"action"`
	Metadata    pgtype.Text      `json:"metadata"`
	Signature   string           `json:"signature"`
	Signer      string           `json:"signer"`
	Nonce       string           `json:"nonce"`
	BlockHeight int64            `json:"block_height"`
	TxHash      string           `json:"tx_hash"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type InsertPlayParams

type InsertPlayParams struct {
	UserID      string           `json:"user_id"`
	TrackID     string           `json:"track_id"`
	City        string           `json:"city"`
	Region      string           `json:"region"`
	Country     string           `json:"country"`
	PlayedAt    pgtype.Timestamp `json:"played_at"`
	BlockHeight int64            `json:"block_height"`
	TxHash      string           `json:"tx_hash"`
	ListenedAt  pgtype.Timestamp `json:"listened_at"`
	RecordedAt  pgtype.Timestamp `json:"recorded_at"`
}

type InsertPlaysParams

type InsertPlaysParams struct {
	Column1  []string           `json:"column_1"`
	Column2  []string           `json:"column_2"`
	Column3  []string           `json:"column_3"`
	Column4  []string           `json:"column_4"`
	Column5  []string           `json:"column_5"`
	Column6  []pgtype.Timestamp `json:"column_6"`
	Column7  []int64            `json:"column_7"`
	Column8  []string           `json:"column_8"`
	Column9  []pgtype.Timestamp `json:"column_9"`
	Column10 []pgtype.Timestamp `json:"column_10"`
}

type InsertSlaNodeReportParams

type InsertSlaNodeReportParams struct {
	SlaRollupID        int32            `json:"sla_rollup_id"`
	Address            string           `json:"address"`
	NumBlocksProposed  int32            `json:"num_blocks_proposed"`
	ChallengesReceived int32            `json:"challenges_received"`
	ChallengesFailed   int32            `json:"challenges_failed"`
	BlockHeight        int64            `json:"block_height"`
	TxHash             string           `json:"tx_hash"`
	CreatedAt          pgtype.Timestamp `json:"created_at"`
}

type InsertSlaRollupParams

type InsertSlaRollupParams struct {
	BlockStart     int64            `json:"block_start"`
	BlockEnd       int64            `json:"block_end"`
	BlockHeight    int64            `json:"block_height"`
	ValidatorCount int32            `json:"validator_count"`
	BlockQuota     int32            `json:"block_quota"`
	Bps            float64          `json:"bps"`
	Tps            float64          `json:"tps"`
	TxHash         string           `json:"tx_hash"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
}

type InsertSlaRollupReturningIdParams

type InsertSlaRollupReturningIdParams struct {
	BlockStart     int64            `json:"block_start"`
	BlockEnd       int64            `json:"block_end"`
	BlockHeight    int64            `json:"block_height"`
	ValidatorCount int32            `json:"validator_count"`
	BlockQuota     int32            `json:"block_quota"`
	Bps            float64          `json:"bps"`
	Tps            float64          `json:"tps"`
	TxHash         string           `json:"tx_hash"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
}

type InsertStorageProofParams

type InsertStorageProofParams struct {
	Height          int64            `json:"height"`
	Address         string           `json:"address"`
	ProverAddresses []string         `json:"prover_addresses"`
	Cid             string           `json:"cid"`
	ProofSignature  []byte           `json:"proof_signature"`
	Proof           []byte           `json:"proof"`
	Status          interface{}      `json:"status"`
	BlockHeight     int64            `json:"block_height"`
	TxHash          string           `json:"tx_hash"`
	CreatedAt       pgtype.Timestamp `json:"created_at"`
}

type InsertStorageProofVerificationParams

type InsertStorageProofVerificationParams struct {
	Height      int64            `json:"height"`
	Proof       []byte           `json:"proof"`
	BlockHeight int64            `json:"block_height"`
	TxHash      string           `json:"tx_hash"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type InsertTransactionParams

type InsertTransactionParams struct {
	TxHash      string           `json:"tx_hash"`
	BlockHeight int64            `json:"block_height"`
	TxIndex     int32            `json:"tx_index"`
	TxType      string           `json:"tx_type"`
	Address     pgtype.Text      `json:"address"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
}

type InsertValidatorDeregistrationParams

type InsertValidatorDeregistrationParams struct {
	CometAddress string `json:"comet_address"`
	CometPubkey  []byte `json:"comet_pubkey"`
	BlockHeight  int64  `json:"block_height"`
	TxHash       string `json:"tx_hash"`
}

type InsertValidatorMisbehaviorDeregistrationParams

type InsertValidatorMisbehaviorDeregistrationParams struct {
	CometAddress string           `json:"comet_address"`
	PubKey       []byte           `json:"pub_key"`
	BlockHeight  int64            `json:"block_height"`
	TxHash       string           `json:"tx_hash"`
	CreatedAt    pgtype.Timestamp `json:"created_at"`
}

type InsertValidatorRegistrationParams

type InsertValidatorRegistrationParams struct {
	Address      string `json:"address"`
	Endpoint     string `json:"endpoint"`
	CometAddress string `json:"comet_address"`
	EthBlock     string `json:"eth_block"`
	NodeType     string `json:"node_type"`
	Spid         string `json:"spid"`
	CometPubkey  []byte `json:"comet_pubkey"`
	VotingPower  int64  `json:"voting_power"`
	BlockHeight  int64  `json:"block_height"`
	TxHash       string `json:"tx_hash"`
}

type MaterializedViewManager

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

MaterializedViewManager handles refreshing materialized views for optimal performance

func NewMaterializedViewManager

func NewMaterializedViewManager(db *pgxpool.Pool, logger *slog.Logger) *MaterializedViewManager

NewMaterializedViewManager creates a new manager for materialized views

func (*MaterializedViewManager) ForceRefreshIfStale

func (m *MaterializedViewManager) ForceRefreshIfStale(ctx context.Context, maxAge time.Duration) error

ForceRefreshIfStale refreshes views if they haven't been refreshed recently

func (*MaterializedViewManager) GetViewRefreshStatus

func (m *MaterializedViewManager) GetViewRefreshStatus(ctx context.Context) (map[string]time.Time, error)

GetViewRefreshStatus returns information about when views were last refreshed

func (*MaterializedViewManager) HealthCheck

func (m *MaterializedViewManager) HealthCheck(ctx context.Context) error

Health check for materialized views - useful for monitoring

func (*MaterializedViewManager) RefreshSlaRollupViews

func (m *MaterializedViewManager) RefreshSlaRollupViews(ctx context.Context) error

RefreshSlaRollupViews refreshes all SLA rollup related materialized views

func (*MaterializedViewManager) StartPeriodicRefresh

func (m *MaterializedViewManager) StartPeriodicRefresh(ctx context.Context, interval time.Duration)

StartPeriodicRefresh starts a background goroutine that refreshes materialized views periodically

type MutedUser

type MutedUser struct {
	MutedUserID int32            `json:"muted_user_id"`
	UserID      int32            `json:"user_id"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	UpdatedAt   pgtype.Timestamp `json:"updated_at"`
	IsDelete    pgtype.Bool      `json:"is_delete"`
	Txhash      string           `json:"txhash"`
	Blockhash   string           `json:"blockhash"`
	Blocknumber int32            `json:"blocknumber"`
}

type MvDashboardTransactionStat

type MvDashboardTransactionStat struct {
	Transactions24h         int64 `json:"transactions_24h"`
	TransactionsPrevious24h int64 `json:"transactions_previous_24h"`
	Transactions7d          int64 `json:"transactions_7d"`
	Transactions30d         int64 `json:"transactions_30d"`
	TotalTransactions       int64 `json:"total_transactions"`
}

type MvDashboardTransactionType

type MvDashboardTransactionType struct {
	TxType           string `json:"tx_type"`
	TransactionCount int64  `json:"transaction_count"`
}

type Notification

type Notification struct {
	ID          int32            `json:"id"`
	Specifier   string           `json:"specifier"`
	GroupID     string           `json:"group_id"`
	Type        string           `json:"type"`
	Slot        pgtype.Int4      `json:"slot"`
	Blocknumber pgtype.Int4      `json:"blocknumber"`
	Timestamp   pgtype.Timestamp `json:"timestamp"`
	Data        []byte           `json:"data"`
	UserIds     []int32          `json:"user_ids"`
	TypeV2      pgtype.Text      `json:"type_v2"`
}

type NotificationSeen

type NotificationSeen struct {
	UserID      int32            `json:"user_id"`
	SeenAt      pgtype.Timestamp `json:"seen_at"`
	Blocknumber pgtype.Int4      `json:"blocknumber"`
	Blockhash   pgtype.Text      `json:"blockhash"`
	Txhash      pgtype.Text      `json:"txhash"`
}

type Playlist

type Playlist struct {
	Blockhash                   pgtype.Text      `json:"blockhash"`
	Blocknumber                 pgtype.Int4      `json:"blocknumber"`
	PlaylistID                  int32            `json:"playlist_id"`
	PlaylistOwnerID             int32            `json:"playlist_owner_id"`
	IsAlbum                     bool             `json:"is_album"`
	IsPrivate                   bool             `json:"is_private"`
	PlaylistName                pgtype.Text      `json:"playlist_name"`
	PlaylistContents            []byte           `json:"playlist_contents"`
	PlaylistImageMultihash      pgtype.Text      `json:"playlist_image_multihash"`
	IsCurrent                   bool             `json:"is_current"`
	IsDelete                    bool             `json:"is_delete"`
	Description                 pgtype.Text      `json:"description"`
	CreatedAt                   pgtype.Timestamp `json:"created_at"`
	Upc                         pgtype.Text      `json:"upc"`
	UpdatedAt                   pgtype.Timestamp `json:"updated_at"`
	PlaylistImageSizesMultihash pgtype.Text      `json:"playlist_image_sizes_multihash"`
	Txhash                      string           `json:"txhash"`
	LastAddedTo                 pgtype.Timestamp `json:"last_added_to"`
	Slot                        pgtype.Int4      `json:"slot"`
	MetadataMultihash           pgtype.Text      `json:"metadata_multihash"`
	IsImageAutogenerated        bool             `json:"is_image_autogenerated"`
	IsStreamGated               bool             `json:"is_stream_gated"`
	StreamConditions            []byte           `json:"stream_conditions"`
	DdexApp                     pgtype.Text      `json:"ddex_app"`
	DdexReleaseIds              []byte           `json:"ddex_release_ids"`
	Artists                     []byte           `json:"artists"`
	CopyrightLine               []byte           `json:"copyright_line"`
	ProducerCopyrightLine       []byte           `json:"producer_copyright_line"`
	ParentalWarningType         pgtype.Text      `json:"parental_warning_type"`
	IsScheduledRelease          bool             `json:"is_scheduled_release"`
	ReleaseDate                 pgtype.Timestamp `json:"release_date"`
}

type PlaylistRoute

type PlaylistRoute struct {
	Slug        string `json:"slug"`
	TitleSlug   string `json:"title_slug"`
	CollisionID int32  `json:"collision_id"`
	OwnerID     int32  `json:"owner_id"`
	PlaylistID  int32  `json:"playlist_id"`
	IsCurrent   bool   `json:"is_current"`
	Blockhash   string `json:"blockhash"`
	Blocknumber int32  `json:"blocknumber"`
	Txhash      string `json:"txhash"`
}

type PlaylistSeen

type PlaylistSeen struct {
	IsCurrent   bool             `json:"is_current"`
	UserID      int32            `json:"user_id"`
	PlaylistID  int32            `json:"playlist_id"`
	SeenAt      pgtype.Timestamp `json:"seen_at"`
	Blocknumber pgtype.Int4      `json:"blocknumber"`
	Blockhash   pgtype.Text      `json:"blockhash"`
	Txhash      pgtype.Text      `json:"txhash"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeregisterValidator

func (q *Queries) DeregisterValidator(ctx context.Context, arg DeregisterValidatorParams) error

func (*Queries) GetActiveValidatorCount

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

func (*Queries) GetActiveValidators

func (q *Queries) GetActiveValidators(ctx context.Context, arg GetActiveValidatorsParams) ([]EtlValidator, error)

func (*Queries) GetAllActiveValidatorsWithRecentRollups

func (q *Queries) GetAllActiveValidatorsWithRecentRollups(ctx context.Context) ([]GetAllActiveValidatorsWithRecentRollupsRow, error)

func (*Queries) GetBlockByHeight

func (q *Queries) GetBlockByHeight(ctx context.Context, blockHeight int64) (EtlBlock, error)

func (*Queries) GetBlockRangeFirst

func (q *Queries) GetBlockRangeFirst(ctx context.Context, arg GetBlockRangeFirstParams) (EtlBlock, error)

func (*Queries) GetBlockRangeLast

func (q *Queries) GetBlockRangeLast(ctx context.Context, arg GetBlockRangeLastParams) (EtlBlock, error)

func (*Queries) GetBlockTransactionCount

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

func (*Queries) GetBlocksByPage

func (q *Queries) GetBlocksByPage(ctx context.Context, arg GetBlocksByPageParams) ([]EtlBlock, error)

func (*Queries) GetDashboardTransactionStats

func (q *Queries) GetDashboardTransactionStats(ctx context.Context) (MvDashboardTransactionStat, error)

Dashboard materialized view queries

func (*Queries) GetDashboardTransactionTypes

func (q *Queries) GetDashboardTransactionTypes(ctx context.Context) ([]MvDashboardTransactionType, error)

func (*Queries) GetHealthyValidatorCountsForRollups

func (q *Queries) GetHealthyValidatorCountsForRollups(ctx context.Context, dollar_1 []int32) ([]GetHealthyValidatorCountsForRollupsRow, error)

func (*Queries) GetLatestIndexedBlock

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

get latest indexed block height

func (*Queries) GetLatestSlaRollup

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

func (*Queries) GetManageEntitiesByBlockHeightCursor

func (q *Queries) GetManageEntitiesByBlockHeightCursor(ctx context.Context, arg GetManageEntitiesByBlockHeightCursorParams) ([]EtlManageEntity, error)

func (*Queries) GetManageEntityByTxHash

func (q *Queries) GetManageEntityByTxHash(ctx context.Context, txHash string) (EtlManageEntity, error)

func (*Queries) GetPlaysByBlockHeightCursor

func (q *Queries) GetPlaysByBlockHeightCursor(ctx context.Context, arg GetPlaysByBlockHeightCursorParams) ([]EtlPlay, error)

func (*Queries) GetPlaysByTxHash

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

Transaction content queries by hash

func (*Queries) GetRelationTypesByAddress

func (q *Queries) GetRelationTypesByAddress(ctx context.Context, lower string) ([]interface{}, error)

func (*Queries) GetSlaNodeReportsByAddress

func (q *Queries) GetSlaNodeReportsByAddress(ctx context.Context, arg GetSlaNodeReportsByAddressParams) ([]EtlSlaNodeReport, error)

func (*Queries) GetSlaNodeReportsByBlockHeightCursor

func (q *Queries) GetSlaNodeReportsByBlockHeightCursor(ctx context.Context, arg GetSlaNodeReportsByBlockHeightCursorParams) ([]EtlSlaNodeReport, error)

func (*Queries) GetSlaRollupById

func (q *Queries) GetSlaRollupById(ctx context.Context, id int32) (EtlSlaRollup, error)

func (*Queries) GetSlaRollupByTxHash

func (q *Queries) GetSlaRollupByTxHash(ctx context.Context, txHash string) (EtlSlaRollup, error)

func (*Queries) GetSlaRollupsByBlockHeightCursor

func (q *Queries) GetSlaRollupsByBlockHeightCursor(ctx context.Context, arg GetSlaRollupsByBlockHeightCursorParams) ([]EtlSlaRollup, error)

func (*Queries) GetSlaRollupsWithPagination

func (q *Queries) GetSlaRollupsWithPagination(ctx context.Context, arg GetSlaRollupsWithPaginationParams) ([]EtlSlaRollup, error)

func (*Queries) GetStorageProofByTxHash

func (q *Queries) GetStorageProofByTxHash(ctx context.Context, txHash string) (EtlStorageProof, error)

func (*Queries) GetStorageProofVerificationByTxHash

func (q *Queries) GetStorageProofVerificationByTxHash(ctx context.Context, txHash string) (EtlStorageProofVerification, error)

func (*Queries) GetStorageProofsByBlockHeightCursor

func (q *Queries) GetStorageProofsByBlockHeightCursor(ctx context.Context, arg GetStorageProofsByBlockHeightCursorParams) ([]EtlStorageProof, error)

func (*Queries) GetStorageProofsForHeight

func (q *Queries) GetStorageProofsForHeight(ctx context.Context, height int64) ([]EtlStorageProof, error)

Storage proof consensus queries

func (*Queries) GetTotalTransactions

func (q *Queries) GetTotalTransactions(ctx context.Context) (int32, error)

func (*Queries) GetTransactionByHash

func (q *Queries) GetTransactionByHash(ctx context.Context, txHash string) (EtlTransaction, error)

func (*Queries) GetTransactionCountByAddress

func (q *Queries) GetTransactionCountByAddress(ctx context.Context, arg GetTransactionCountByAddressParams) (int64, error)

func (*Queries) GetTransactionsByAddress

func (q *Queries) GetTransactionsByAddress(ctx context.Context, arg GetTransactionsByAddressParams) ([]GetTransactionsByAddressRow, error)

Account transaction queries

func (*Queries) GetTransactionsByBlockHeightCursor

func (q *Queries) GetTransactionsByBlockHeightCursor(ctx context.Context, arg GetTransactionsByBlockHeightCursorParams) ([]EtlTransaction, error)

func (*Queries) GetTransactionsByPage

func (q *Queries) GetTransactionsByPage(ctx context.Context, arg GetTransactionsByPageParams) ([]EtlTransaction, error)

func (*Queries) GetValidatorByAddress

func (q *Queries) GetValidatorByAddress(ctx context.Context, lower string) (EtlValidator, error)

func (*Queries) GetValidatorDeregistrationByTxHash

func (q *Queries) GetValidatorDeregistrationByTxHash(ctx context.Context, txHash string) (EtlValidatorDeregistration, error)

func (*Queries) GetValidatorRegistrationByTxHash

func (q *Queries) GetValidatorRegistrationByTxHash(ctx context.Context, txHash string) (EtlValidatorRegistration, error)

func (*Queries) GetValidatorRegistrations

func (q *Queries) GetValidatorRegistrations(ctx context.Context, arg GetValidatorRegistrationsParams) ([]GetValidatorRegistrationsRow, error)

func (*Queries) GetValidatorsForSlaRollup

func (q *Queries) GetValidatorsForSlaRollup(ctx context.Context, slaRollupID int32) ([]GetValidatorsForSlaRollupRow, error)

func (*Queries) InsertAddress

func (q *Queries) InsertAddress(ctx context.Context, arg InsertAddressParams) error

func (*Queries) InsertBlock

func (q *Queries) InsertBlock(ctx context.Context, arg InsertBlockParams) error

func (*Queries) InsertFailedStorageProof

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

func (*Queries) InsertManageEntity

func (q *Queries) InsertManageEntity(ctx context.Context, arg InsertManageEntityParams) error

func (*Queries) InsertPlay

func (q *Queries) InsertPlay(ctx context.Context, arg InsertPlayParams) error

func (*Queries) InsertPlays

func (q *Queries) InsertPlays(ctx context.Context, arg InsertPlaysParams) error

func (*Queries) InsertSlaNodeReport

func (q *Queries) InsertSlaNodeReport(ctx context.Context, arg InsertSlaNodeReportParams) error

func (*Queries) InsertSlaRollup

func (q *Queries) InsertSlaRollup(ctx context.Context, arg InsertSlaRollupParams) error

func (*Queries) InsertSlaRollupReturningId

func (q *Queries) InsertSlaRollupReturningId(ctx context.Context, arg InsertSlaRollupReturningIdParams) (int32, error)

func (*Queries) InsertStorageProof

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

func (*Queries) InsertStorageProofVerification

func (q *Queries) InsertStorageProofVerification(ctx context.Context, arg InsertStorageProofVerificationParams) error

func (*Queries) InsertTransaction

func (q *Queries) InsertTransaction(ctx context.Context, arg InsertTransactionParams) error

func (*Queries) InsertValidatorDeregistration

func (q *Queries) InsertValidatorDeregistration(ctx context.Context, arg InsertValidatorDeregistrationParams) error

func (*Queries) InsertValidatorMisbehaviorDeregistration

func (q *Queries) InsertValidatorMisbehaviorDeregistration(ctx context.Context, arg InsertValidatorMisbehaviorDeregistrationParams) error

func (*Queries) InsertValidatorRegistration

func (q *Queries) InsertValidatorRegistration(ctx context.Context, arg InsertValidatorRegistrationParams) error

func (*Queries) RegisterValidator

func (q *Queries) RegisterValidator(ctx context.Context, arg RegisterValidatorParams) error

func (*Queries) UpdateStorageProofStatus

func (q *Queries) UpdateStorageProofStatus(ctx context.Context, arg UpdateStorageProofStatusParams) error

func (*Queries) UpsertValidatorFromPeer

func (q *Queries) UpsertValidatorFromPeer(ctx context.Context, arg UpsertValidatorFromPeerParams) error

func (*Queries) WithTx

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

type Reaction

type Reaction struct {
	ID            int32            `json:"id"`
	ReactionValue int32            `json:"reaction_value"`
	SenderWallet  string           `json:"sender_wallet"`
	ReactionType  string           `json:"reaction_type"`
	ReactedTo     string           `json:"reacted_to"`
	Timestamp     pgtype.Timestamp `json:"timestamp"`
	Blocknumber   int32            `json:"blocknumber"`
}

type RegisterValidatorParams

type RegisterValidatorParams struct {
	Address        string           `json:"address"`
	Endpoint       string           `json:"endpoint"`
	CometAddress   string           `json:"comet_address"`
	NodeType       string           `json:"node_type"`
	Spid           string           `json:"spid"`
	VotingPower    int64            `json:"voting_power"`
	Status         string           `json:"status"`
	RegisteredAt   int64            `json:"registered_at"`
	DeregisteredAt pgtype.Int8      `json:"deregistered_at"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	UpdatedAt      pgtype.Timestamp `json:"updated_at"`
}

type Repost

type Repost struct {
	Blockhash        pgtype.Text      `json:"blockhash"`
	Blocknumber      pgtype.Int4      `json:"blocknumber"`
	UserID           int32            `json:"user_id"`
	RepostItemID     int32            `json:"repost_item_id"`
	RepostType       interface{}      `json:"repost_type"`
	IsCurrent        bool             `json:"is_current"`
	IsDelete         bool             `json:"is_delete"`
	CreatedAt        pgtype.Timestamp `json:"created_at"`
	Txhash           string           `json:"txhash"`
	Slot             pgtype.Int4      `json:"slot"`
	IsRepostOfRepost bool             `json:"is_repost_of_repost"`
}

type Safe

type Safe struct {
	Blockhash      pgtype.Text      `json:"blockhash"`
	Blocknumber    pgtype.Int4      `json:"blocknumber"`
	UserID         int32            `json:"user_id"`
	SaveItemID     int32            `json:"save_item_id"`
	SaveType       interface{}      `json:"save_type"`
	IsCurrent      bool             `json:"is_current"`
	IsDelete       bool             `json:"is_delete"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	Txhash         string           `json:"txhash"`
	Slot           pgtype.Int4      `json:"slot"`
	IsSaveOfRepost bool             `json:"is_save_of_repost"`
}

type Share

type Share struct {
	Blockhash   pgtype.Text      `json:"blockhash"`
	Blocknumber pgtype.Int4      `json:"blocknumber"`
	UserID      int32            `json:"user_id"`
	ShareItemID int32            `json:"share_item_id"`
	ShareType   interface{}      `json:"share_type"`
	CreatedAt   pgtype.Timestamp `json:"created_at"`
	Txhash      string           `json:"txhash"`
	Slot        pgtype.Int4      `json:"slot"`
}

type Subscription

type Subscription struct {
	Blockhash    pgtype.Text      `json:"blockhash"`
	Blocknumber  pgtype.Int4      `json:"blocknumber"`
	SubscriberID int32            `json:"subscriber_id"`
	UserID       int32            `json:"user_id"`
	IsCurrent    bool             `json:"is_current"`
	IsDelete     bool             `json:"is_delete"`
	CreatedAt    pgtype.Timestamp `json:"created_at"`
	Txhash       string           `json:"txhash"`
}

type Track

type Track struct {
	Blockhash                          pgtype.Text      `json:"blockhash"`
	TrackID                            int32            `json:"track_id"`
	IsCurrent                          bool             `json:"is_current"`
	IsDelete                           bool             `json:"is_delete"`
	OwnerID                            int32            `json:"owner_id"`
	Title                              pgtype.Text      `json:"title"`
	CoverArt                           pgtype.Text      `json:"cover_art"`
	Tags                               pgtype.Text      `json:"tags"`
	Genre                              pgtype.Text      `json:"genre"`
	Mood                               pgtype.Text      `json:"mood"`
	CreditsSplits                      pgtype.Text      `json:"credits_splits"`
	CreateDate                         pgtype.Text      `json:"create_date"`
	FileType                           pgtype.Text      `json:"file_type"`
	MetadataMultihash                  pgtype.Text      `json:"metadata_multihash"`
	Blocknumber                        pgtype.Int4      `json:"blocknumber"`
	CreatedAt                          pgtype.Timestamp `json:"created_at"`
	Description                        pgtype.Text      `json:"description"`
	Isrc                               pgtype.Text      `json:"isrc"`
	Iswc                               pgtype.Text      `json:"iswc"`
	License                            pgtype.Text      `json:"license"`
	UpdatedAt                          pgtype.Timestamp `json:"updated_at"`
	CoverArtSizes                      pgtype.Text      `json:"cover_art_sizes"`
	IsUnlisted                         bool             `json:"is_unlisted"`
	FieldVisibility                    []byte           `json:"field_visibility"`
	RouteID                            pgtype.Text      `json:"route_id"`
	StemOf                             []byte           `json:"stem_of"`
	RemixOf                            []byte           `json:"remix_of"`
	Txhash                             string           `json:"txhash"`
	Slot                               pgtype.Int4      `json:"slot"`
	IsAvailable                        bool             `json:"is_available"`
	IsStreamGated                      bool             `json:"is_stream_gated"`
	StreamConditions                   []byte           `json:"stream_conditions"`
	TrackCid                           pgtype.Text      `json:"track_cid"`
	IsPlaylistUpload                   bool             `json:"is_playlist_upload"`
	Duration                           pgtype.Int4      `json:"duration"`
	AiAttributionUserID                pgtype.Int4      `json:"ai_attribution_user_id"`
	PreviewCid                         pgtype.Text      `json:"preview_cid"`
	AudioUploadID                      pgtype.Text      `json:"audio_upload_id"`
	PreviewStartSeconds                pgtype.Float8    `json:"preview_start_seconds"`
	ReleaseDate                        pgtype.Timestamp `json:"release_date"`
	TrackSegments                      []byte           `json:"track_segments"`
	IsScheduledRelease                 bool             `json:"is_scheduled_release"`
	IsDownloadable                     bool             `json:"is_downloadable"`
	IsDownloadGated                    bool             `json:"is_download_gated"`
	DownloadConditions                 []byte           `json:"download_conditions"`
	IsOriginalAvailable                bool             `json:"is_original_available"`
	OrigFileCid                        pgtype.Text      `json:"orig_file_cid"`
	OrigFilename                       pgtype.Text      `json:"orig_filename"`
	PlaylistsContainingTrack           []int32          `json:"playlists_containing_track"`
	PlacementHosts                     pgtype.Text      `json:"placement_hosts"`
	DdexApp                            pgtype.Text      `json:"ddex_app"`
	DdexReleaseIds                     []byte           `json:"ddex_release_ids"`
	Artists                            []byte           `json:"artists"`
	ResourceContributors               []byte           `json:"resource_contributors"`
	IndirectResourceContributors       []byte           `json:"indirect_resource_contributors"`
	RightsController                   []byte           `json:"rights_controller"`
	CopyrightLine                      []byte           `json:"copyright_line"`
	ProducerCopyrightLine              []byte           `json:"producer_copyright_line"`
	ParentalWarningType                pgtype.Text      `json:"parental_warning_type"`
	PlaylistsPreviouslyContainingTrack []byte           `json:"playlists_previously_containing_track"`
	AllowedApiKeys                     []string         `json:"allowed_api_keys"`
	Bpm                                pgtype.Float8    `json:"bpm"`
	MusicalKey                         pgtype.Text      `json:"musical_key"`
	AudioAnalysisErrorCount            int32            `json:"audio_analysis_error_count"`
	IsCustomBpm                        pgtype.Bool      `json:"is_custom_bpm"`
	IsCustomMusicalKey                 pgtype.Bool      `json:"is_custom_musical_key"`
	CommentsDisabled                   pgtype.Bool      `json:"comments_disabled"`
	PinnedCommentID                    pgtype.Int4      `json:"pinned_comment_id"`
	CoverOriginalSongTitle             pgtype.Text      `json:"cover_original_song_title"`
	CoverOriginalArtist                pgtype.Text      `json:"cover_original_artist"`
	IsOwnedByUser                      bool             `json:"is_owned_by_user"`
	NoAiUse                            pgtype.Bool      `json:"no_ai_use"`
}

type TrackDownload

type TrackDownload struct {
	Txhash        string           `json:"txhash"`
	Blocknumber   pgtype.Int4      `json:"blocknumber"`
	ParentTrackID int32            `json:"parent_track_id"`
	TrackID       int32            `json:"track_id"`
	UserID        int32            `json:"user_id"`
	City          pgtype.Text      `json:"city"`
	Region        pgtype.Text      `json:"region"`
	Country       pgtype.Text      `json:"country"`
	CreatedAt     pgtype.Timestamp `json:"created_at"`
}

type TrackRoute

type TrackRoute struct {
	Slug        string `json:"slug"`
	TitleSlug   string `json:"title_slug"`
	CollisionID int32  `json:"collision_id"`
	OwnerID     int32  `json:"owner_id"`
	TrackID     int32  `json:"track_id"`
	IsCurrent   bool   `json:"is_current"`
	Blockhash   string `json:"blockhash"`
	Blocknumber int32  `json:"blocknumber"`
	Txhash      string `json:"txhash"`
}

type UpdateStorageProofStatusParams

type UpdateStorageProofStatusParams struct {
	Status  interface{} `json:"status"`
	Proof   []byte      `json:"proof"`
	Height  int64       `json:"height"`
	Address string      `json:"address"`
}

type UpsertValidatorFromPeerParams

type UpsertValidatorFromPeerParams struct {
	Address      string `json:"address"`
	Endpoint     string `json:"endpoint"`
	CometAddress string `json:"comet_address"`
	NodeType     string `json:"node_type"`
	Spid         string `json:"spid"`
	VotingPower  int64  `json:"voting_power"`
}

type User

type User struct {
	Blockhash              pgtype.Text      `json:"blockhash"`
	UserID                 int32            `json:"user_id"`
	IsCurrent              bool             `json:"is_current"`
	Handle                 pgtype.Text      `json:"handle"`
	Wallet                 pgtype.Text      `json:"wallet"`
	Name                   pgtype.Text      `json:"name"`
	ProfilePicture         pgtype.Text      `json:"profile_picture"`
	CoverPhoto             pgtype.Text      `json:"cover_photo"`
	Bio                    pgtype.Text      `json:"bio"`
	Location               pgtype.Text      `json:"location"`
	MetadataMultihash      pgtype.Text      `json:"metadata_multihash"`
	CreatorNodeEndpoint    pgtype.Text      `json:"creator_node_endpoint"`
	Blocknumber            pgtype.Int4      `json:"blocknumber"`
	IsVerified             bool             `json:"is_verified"`
	CreatedAt              pgtype.Timestamp `json:"created_at"`
	UpdatedAt              pgtype.Timestamp `json:"updated_at"`
	HandleLc               pgtype.Text      `json:"handle_lc"`
	CoverPhotoSizes        pgtype.Text      `json:"cover_photo_sizes"`
	ProfilePictureSizes    pgtype.Text      `json:"profile_picture_sizes"`
	PrimaryID              pgtype.Int4      `json:"primary_id"`
	SecondaryIds           []int32          `json:"secondary_ids"`
	ReplicaSetUpdateSigner pgtype.Text      `json:"replica_set_update_signer"`
	HasCollectibles        bool             `json:"has_collectibles"`
	Txhash                 string           `json:"txhash"`
	PlaylistLibrary        []byte           `json:"playlist_library"`
	IsDeactivated          bool             `json:"is_deactivated"`
	Slot                   pgtype.Int4      `json:"slot"`
	UserStorageAccount     pgtype.Text      `json:"user_storage_account"`
	UserAuthorityAccount   pgtype.Text      `json:"user_authority_account"`
	ArtistPickTrackID      pgtype.Int4      `json:"artist_pick_track_id"`
	IsAvailable            bool             `json:"is_available"`
	IsStorageV2            bool             `json:"is_storage_v2"`
	AllowAiAttribution     bool             `json:"allow_ai_attribution"`
	TwitterHandle          pgtype.Text      `json:"twitter_handle"`
	InstagramHandle        pgtype.Text      `json:"instagram_handle"`
	TiktokHandle           pgtype.Text      `json:"tiktok_handle"`
	VerifiedWithTwitter    pgtype.Bool      `json:"verified_with_twitter"`
	VerifiedWithInstagram  pgtype.Bool      `json:"verified_with_instagram"`
	VerifiedWithTiktok     pgtype.Bool      `json:"verified_with_tiktok"`
}

type UserTip

type UserTip struct {
	Slot           int32            `json:"slot"`
	Signature      string           `json:"signature"`
	SenderUserID   int32            `json:"sender_user_id"`
	ReceiverUserID int32            `json:"receiver_user_id"`
	Amount         int64            `json:"amount"`
	CreatedAt      pgtype.Timestamp `json:"created_at"`
	UpdatedAt      pgtype.Timestamp `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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