mirrordb

package
v0.0.0-...-3e181b4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBatchAlreadyClosed = errors.New("batch already closed")
)

Functions

This section is empty.

Types

type BaseContract

type BaseContract struct {
	Address                string     `db:"address" json:"address"`
	SimplehashLookupNftID  string     `db:"simplehash_lookup_nft_id" json:"simplehash_lookup_nft_id"`
	LastSimplehashSync     *time.Time `db:"last_simplehash_sync" json:"last_simplehash_sync"`
	CreatedAt              time.Time  `db:"created_at" json:"created_at"`
	LastUpdated            time.Time  `db:"last_updated" json:"last_updated"`
	Type                   *string    `db:"type" json:"type"`
	Name                   *string    `db:"name" json:"name"`
	Symbol                 *string    `db:"symbol" json:"symbol"`
	DeployedBy             *string    `db:"deployed_by" json:"deployed_by"`
	DeployedViaContract    *string    `db:"deployed_via_contract" json:"deployed_via_contract"`
	OwnedBy                *string    `db:"owned_by" json:"owned_by"`
	HasMultipleCollections *bool      `db:"has_multiple_collections" json:"has_multiple_collections"`
}

type BaseOwner

type BaseOwner struct {
	SimplehashKafkaKey       string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID          *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ContractAddress          *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID                  pgtype.Numeric   `db:"token_id" json:"token_id"`
	OwnerAddress             *persist.Address `db:"owner_address" json:"owner_address"`
	Quantity                 pgtype.Numeric   `db:"quantity" json:"quantity"`
	CollectionID             *string          `db:"collection_id" json:"collection_id"`
	FirstAcquiredDate        *time.Time       `db:"first_acquired_date" json:"first_acquired_date"`
	LastAcquiredDate         *time.Time       `db:"last_acquired_date" json:"last_acquired_date"`
	FirstAcquiredTransaction *string          `db:"first_acquired_transaction" json:"first_acquired_transaction"`
	LastAcquiredTransaction  *string          `db:"last_acquired_transaction" json:"last_acquired_transaction"`
	MintedToThisWallet       *bool            `db:"minted_to_this_wallet" json:"minted_to_this_wallet"`
	AirdroppedToThisWallet   *bool            `db:"airdropped_to_this_wallet" json:"airdropped_to_this_wallet"`
	SoldToThisWallet         *bool            `db:"sold_to_this_wallet" json:"sold_to_this_wallet"`
	CreatedAt                time.Time        `db:"created_at" json:"created_at"`
	LastUpdated              time.Time        `db:"last_updated" json:"last_updated"`
	KafkaOffset              *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition           *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp           *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type BaseToken

type BaseToken struct {
	SimplehashKafkaKey string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID    *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ContractAddress    *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID            pgtype.Numeric   `db:"token_id" json:"token_id"`
	Name               *string          `db:"name" json:"name"`
	Description        *string          `db:"description" json:"description"`
	Previews           pgtype.JSONB     `db:"previews" json:"previews"`
	ImageUrl           *string          `db:"image_url" json:"image_url"`
	VideoUrl           *string          `db:"video_url" json:"video_url"`
	AudioUrl           *string          `db:"audio_url" json:"audio_url"`
	ModelUrl           *string          `db:"model_url" json:"model_url"`
	OtherUrl           *string          `db:"other_url" json:"other_url"`
	BackgroundColor    *string          `db:"background_color" json:"background_color"`
	ExternalUrl        *string          `db:"external_url" json:"external_url"`
	OnChainCreatedDate *time.Time       `db:"on_chain_created_date" json:"on_chain_created_date"`
	Status             *string          `db:"status" json:"status"`
	TokenCount         pgtype.Numeric   `db:"token_count" json:"token_count"`
	OwnerCount         pgtype.Numeric   `db:"owner_count" json:"owner_count"`
	Contract           pgtype.JSONB     `db:"contract" json:"contract"`
	CollectionID       *string          `db:"collection_id" json:"collection_id"`
	LastSale           pgtype.JSONB     `db:"last_sale" json:"last_sale"`
	FirstCreated       pgtype.JSONB     `db:"first_created" json:"first_created"`
	Rarity             pgtype.JSONB     `db:"rarity" json:"rarity"`
	ExtraMetadata      *string          `db:"extra_metadata" json:"extra_metadata"`
	ImageProperties    pgtype.JSONB     `db:"image_properties" json:"image_properties"`
	VideoProperties    pgtype.JSONB     `db:"video_properties" json:"video_properties"`
	AudioProperties    pgtype.JSONB     `db:"audio_properties" json:"audio_properties"`
	ModelProperties    pgtype.JSONB     `db:"model_properties" json:"model_properties"`
	OtherProperties    pgtype.JSONB     `db:"other_properties" json:"other_properties"`
	CreatedAt          time.Time        `db:"created_at" json:"created_at"`
	LastUpdated        time.Time        `db:"last_updated" json:"last_updated"`
	KafkaOffset        *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition     *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp     *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type Collection

type Collection struct {
	ID                           string       `db:"id" json:"id"`
	SimplehashLookupNftID        string       `db:"simplehash_lookup_nft_id" json:"simplehash_lookup_nft_id"`
	LastSimplehashSync           *time.Time   `db:"last_simplehash_sync" json:"last_simplehash_sync"`
	CreatedAt                    time.Time    `db:"created_at" json:"created_at"`
	LastUpdated                  time.Time    `db:"last_updated" json:"last_updated"`
	Name                         *string      `db:"name" json:"name"`
	Description                  *string      `db:"description" json:"description"`
	ImageUrl                     *string      `db:"image_url" json:"image_url"`
	BannerImageUrl               *string      `db:"banner_image_url" json:"banner_image_url"`
	Category                     *string      `db:"category" json:"category"`
	IsNsfw                       *bool        `db:"is_nsfw" json:"is_nsfw"`
	ExternalUrl                  *string      `db:"external_url" json:"external_url"`
	TwitterUsername              *string      `db:"twitter_username" json:"twitter_username"`
	DiscordUrl                   *string      `db:"discord_url" json:"discord_url"`
	InstagramUrl                 *string      `db:"instagram_url" json:"instagram_url"`
	MediumUsername               *string      `db:"medium_username" json:"medium_username"`
	TelegramUrl                  *string      `db:"telegram_url" json:"telegram_url"`
	MarketplacePages             pgtype.JSONB `db:"marketplace_pages" json:"marketplace_pages"`
	MetaplexMint                 *string      `db:"metaplex_mint" json:"metaplex_mint"`
	MetaplexCandyMachine         *string      `db:"metaplex_candy_machine" json:"metaplex_candy_machine"`
	MetaplexFirstVerifiedCreator *string      `db:"metaplex_first_verified_creator" json:"metaplex_first_verified_creator"`
	SpamScore                    *int32       `db:"spam_score" json:"spam_score"`
	Chains                       []string     `db:"chains" json:"chains"`
	TopContracts                 []string     `db:"top_contracts" json:"top_contracts"`
	CollectionRoyalties          pgtype.JSONB `db:"collection_royalties" json:"collection_royalties"`
	SimplehashDeleted            bool         `db:"simplehash_deleted" json:"simplehash_deleted"`
}

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
	SendBatch(context.Context, *pgx.Batch) pgx.BatchResults
}

type EthereumContract

type EthereumContract struct {
	Address                string     `db:"address" json:"address"`
	SimplehashLookupNftID  string     `db:"simplehash_lookup_nft_id" json:"simplehash_lookup_nft_id"`
	LastSimplehashSync     *time.Time `db:"last_simplehash_sync" json:"last_simplehash_sync"`
	CreatedAt              time.Time  `db:"created_at" json:"created_at"`
	LastUpdated            time.Time  `db:"last_updated" json:"last_updated"`
	Type                   *string    `db:"type" json:"type"`
	Name                   *string    `db:"name" json:"name"`
	Symbol                 *string    `db:"symbol" json:"symbol"`
	DeployedBy             *string    `db:"deployed_by" json:"deployed_by"`
	DeployedViaContract    *string    `db:"deployed_via_contract" json:"deployed_via_contract"`
	OwnedBy                *string    `db:"owned_by" json:"owned_by"`
	HasMultipleCollections *bool      `db:"has_multiple_collections" json:"has_multiple_collections"`
}

type EthereumOwner

type EthereumOwner struct {
	SimplehashKafkaKey       string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID          *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ContractAddress          *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID                  pgtype.Numeric   `db:"token_id" json:"token_id"`
	OwnerAddress             *persist.Address `db:"owner_address" json:"owner_address"`
	Quantity                 pgtype.Numeric   `db:"quantity" json:"quantity"`
	CollectionID             *string          `db:"collection_id" json:"collection_id"`
	FirstAcquiredDate        *time.Time       `db:"first_acquired_date" json:"first_acquired_date"`
	LastAcquiredDate         *time.Time       `db:"last_acquired_date" json:"last_acquired_date"`
	FirstAcquiredTransaction *string          `db:"first_acquired_transaction" json:"first_acquired_transaction"`
	LastAcquiredTransaction  *string          `db:"last_acquired_transaction" json:"last_acquired_transaction"`
	MintedToThisWallet       *bool            `db:"minted_to_this_wallet" json:"minted_to_this_wallet"`
	AirdroppedToThisWallet   *bool            `db:"airdropped_to_this_wallet" json:"airdropped_to_this_wallet"`
	SoldToThisWallet         *bool            `db:"sold_to_this_wallet" json:"sold_to_this_wallet"`
	CreatedAt                time.Time        `db:"created_at" json:"created_at"`
	LastUpdated              time.Time        `db:"last_updated" json:"last_updated"`
	KafkaOffset              *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition           *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp           *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type EthereumToken

type EthereumToken struct {
	SimplehashKafkaKey string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID    *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ContractAddress    *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID            pgtype.Numeric   `db:"token_id" json:"token_id"`
	Name               *string          `db:"name" json:"name"`
	Description        *string          `db:"description" json:"description"`
	Previews           pgtype.JSONB     `db:"previews" json:"previews"`
	ImageUrl           *string          `db:"image_url" json:"image_url"`
	VideoUrl           *string          `db:"video_url" json:"video_url"`
	AudioUrl           *string          `db:"audio_url" json:"audio_url"`
	ModelUrl           *string          `db:"model_url" json:"model_url"`
	OtherUrl           *string          `db:"other_url" json:"other_url"`
	BackgroundColor    *string          `db:"background_color" json:"background_color"`
	ExternalUrl        *string          `db:"external_url" json:"external_url"`
	OnChainCreatedDate *time.Time       `db:"on_chain_created_date" json:"on_chain_created_date"`
	Status             *string          `db:"status" json:"status"`
	TokenCount         pgtype.Numeric   `db:"token_count" json:"token_count"`
	OwnerCount         pgtype.Numeric   `db:"owner_count" json:"owner_count"`
	Contract           pgtype.JSONB     `db:"contract" json:"contract"`
	CollectionID       *string          `db:"collection_id" json:"collection_id"`
	LastSale           pgtype.JSONB     `db:"last_sale" json:"last_sale"`
	FirstCreated       pgtype.JSONB     `db:"first_created" json:"first_created"`
	Rarity             pgtype.JSONB     `db:"rarity" json:"rarity"`
	ExtraMetadata      *string          `db:"extra_metadata" json:"extra_metadata"`
	ImageProperties    pgtype.JSONB     `db:"image_properties" json:"image_properties"`
	VideoProperties    pgtype.JSONB     `db:"video_properties" json:"video_properties"`
	AudioProperties    pgtype.JSONB     `db:"audio_properties" json:"audio_properties"`
	ModelProperties    pgtype.JSONB     `db:"model_properties" json:"model_properties"`
	OtherProperties    pgtype.JSONB     `db:"other_properties" json:"other_properties"`
	CreatedAt          time.Time        `db:"created_at" json:"created_at"`
	LastUpdated        time.Time        `db:"last_updated" json:"last_updated"`
	KafkaOffset        *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition     *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp     *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type ProcessBaseOwnerEntryBatchResults

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

func (*ProcessBaseOwnerEntryBatchResults) Close

func (*ProcessBaseOwnerEntryBatchResults) Exec

func (b *ProcessBaseOwnerEntryBatchResults) Exec(f func(int, error))

type ProcessBaseOwnerEntryParams

type ProcessBaseOwnerEntryParams struct {
	SimplehashKafkaKey       string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID          *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	KafkaOffset              *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition           *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp           *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
	ContractAddress          *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID                  pgtype.Numeric   `db:"token_id" json:"token_id"`
	OwnerAddress             *persist.Address `db:"owner_address" json:"owner_address"`
	Quantity                 pgtype.Numeric   `db:"quantity" json:"quantity"`
	CollectionID             *string          `db:"collection_id" json:"collection_id"`
	FirstAcquiredDate        *time.Time       `db:"first_acquired_date" json:"first_acquired_date"`
	LastAcquiredDate         *time.Time       `db:"last_acquired_date" json:"last_acquired_date"`
	FirstAcquiredTransaction *string          `db:"first_acquired_transaction" json:"first_acquired_transaction"`
	LastAcquiredTransaction  *string          `db:"last_acquired_transaction" json:"last_acquired_transaction"`
	MintedToThisWallet       *bool            `db:"minted_to_this_wallet" json:"minted_to_this_wallet"`
	AirdroppedToThisWallet   *bool            `db:"airdropped_to_this_wallet" json:"airdropped_to_this_wallet"`
	SoldToThisWallet         *bool            `db:"sold_to_this_wallet" json:"sold_to_this_wallet"`
	ShouldUpsert             bool             `db:"should_upsert" json:"should_upsert"`
	ShouldDelete             bool             `db:"should_delete" json:"should_delete"`
}

type ProcessBaseTokenEntryBatchResults

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

func (*ProcessBaseTokenEntryBatchResults) Close

func (*ProcessBaseTokenEntryBatchResults) QueryRow

func (b *ProcessBaseTokenEntryBatchResults) QueryRow(f func(int, string, error))

type ProcessBaseTokenEntryParams

type ProcessBaseTokenEntryParams struct {
	SimplehashNftID    string         `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ShouldDelete       bool           `db:"should_delete" json:"should_delete"`
	SimplehashKafkaKey string         `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	ContractAddress    *string        `db:"contract_address" json:"contract_address"`
	ShouldUpsert       bool           `db:"should_upsert" json:"should_upsert"`
	CollectionID       *string        `db:"collection_id" json:"collection_id"`
	TokenID            pgtype.Numeric `db:"token_id" json:"token_id"`
	Name               *string        `db:"name" json:"name"`
	Description        *string        `db:"description" json:"description"`
	Previews           pgtype.JSONB   `db:"previews" json:"previews"`
	ImageUrl           *string        `db:"image_url" json:"image_url"`
	VideoUrl           *string        `db:"video_url" json:"video_url"`
	AudioUrl           *string        `db:"audio_url" json:"audio_url"`
	ModelUrl           *string        `db:"model_url" json:"model_url"`
	OtherUrl           *string        `db:"other_url" json:"other_url"`
	BackgroundColor    *string        `db:"background_color" json:"background_color"`
	ExternalUrl        *string        `db:"external_url" json:"external_url"`
	OnChainCreatedDate *time.Time     `db:"on_chain_created_date" json:"on_chain_created_date"`
	Status             *string        `db:"status" json:"status"`
	TokenCount         pgtype.Numeric `db:"token_count" json:"token_count"`
	OwnerCount         pgtype.Numeric `db:"owner_count" json:"owner_count"`
	Contract           pgtype.JSONB   `db:"contract" json:"contract"`
	LastSale           pgtype.JSONB   `db:"last_sale" json:"last_sale"`
	FirstCreated       pgtype.JSONB   `db:"first_created" json:"first_created"`
	Rarity             pgtype.JSONB   `db:"rarity" json:"rarity"`
	ExtraMetadata      *string        `db:"extra_metadata" json:"extra_metadata"`
	ImageProperties    pgtype.JSONB   `db:"image_properties" json:"image_properties"`
	VideoProperties    pgtype.JSONB   `db:"video_properties" json:"video_properties"`
	AudioProperties    pgtype.JSONB   `db:"audio_properties" json:"audio_properties"`
	ModelProperties    pgtype.JSONB   `db:"model_properties" json:"model_properties"`
	OtherProperties    pgtype.JSONB   `db:"other_properties" json:"other_properties"`
	KafkaOffset        *int64         `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition     *int32         `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp     *time.Time     `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type ProcessEthereumOwnerEntryBatchResults

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

func (*ProcessEthereumOwnerEntryBatchResults) Close

func (*ProcessEthereumOwnerEntryBatchResults) Exec

type ProcessEthereumOwnerEntryParams

type ProcessEthereumOwnerEntryParams struct {
	SimplehashKafkaKey       string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID          *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	KafkaOffset              *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition           *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp           *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
	ContractAddress          *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID                  pgtype.Numeric   `db:"token_id" json:"token_id"`
	OwnerAddress             *persist.Address `db:"owner_address" json:"owner_address"`
	Quantity                 pgtype.Numeric   `db:"quantity" json:"quantity"`
	CollectionID             *string          `db:"collection_id" json:"collection_id"`
	FirstAcquiredDate        *time.Time       `db:"first_acquired_date" json:"first_acquired_date"`
	LastAcquiredDate         *time.Time       `db:"last_acquired_date" json:"last_acquired_date"`
	FirstAcquiredTransaction *string          `db:"first_acquired_transaction" json:"first_acquired_transaction"`
	LastAcquiredTransaction  *string          `db:"last_acquired_transaction" json:"last_acquired_transaction"`
	MintedToThisWallet       *bool            `db:"minted_to_this_wallet" json:"minted_to_this_wallet"`
	AirdroppedToThisWallet   *bool            `db:"airdropped_to_this_wallet" json:"airdropped_to_this_wallet"`
	SoldToThisWallet         *bool            `db:"sold_to_this_wallet" json:"sold_to_this_wallet"`
	ShouldUpsert             bool             `db:"should_upsert" json:"should_upsert"`
	ShouldDelete             bool             `db:"should_delete" json:"should_delete"`
}

type ProcessEthereumTokenEntryBatchResults

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

func (*ProcessEthereumTokenEntryBatchResults) Close

func (*ProcessEthereumTokenEntryBatchResults) QueryRow

func (b *ProcessEthereumTokenEntryBatchResults) QueryRow(f func(int, string, error))

type ProcessEthereumTokenEntryParams

type ProcessEthereumTokenEntryParams struct {
	SimplehashNftID    string         `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ShouldDelete       bool           `db:"should_delete" json:"should_delete"`
	SimplehashKafkaKey string         `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	ContractAddress    *string        `db:"contract_address" json:"contract_address"`
	ShouldUpsert       bool           `db:"should_upsert" json:"should_upsert"`
	CollectionID       *string        `db:"collection_id" json:"collection_id"`
	TokenID            pgtype.Numeric `db:"token_id" json:"token_id"`
	Name               *string        `db:"name" json:"name"`
	Description        *string        `db:"description" json:"description"`
	Previews           pgtype.JSONB   `db:"previews" json:"previews"`
	ImageUrl           *string        `db:"image_url" json:"image_url"`
	VideoUrl           *string        `db:"video_url" json:"video_url"`
	AudioUrl           *string        `db:"audio_url" json:"audio_url"`
	ModelUrl           *string        `db:"model_url" json:"model_url"`
	OtherUrl           *string        `db:"other_url" json:"other_url"`
	BackgroundColor    *string        `db:"background_color" json:"background_color"`
	ExternalUrl        *string        `db:"external_url" json:"external_url"`
	OnChainCreatedDate *time.Time     `db:"on_chain_created_date" json:"on_chain_created_date"`
	Status             *string        `db:"status" json:"status"`
	TokenCount         pgtype.Numeric `db:"token_count" json:"token_count"`
	OwnerCount         pgtype.Numeric `db:"owner_count" json:"owner_count"`
	Contract           pgtype.JSONB   `db:"contract" json:"contract"`
	LastSale           pgtype.JSONB   `db:"last_sale" json:"last_sale"`
	FirstCreated       pgtype.JSONB   `db:"first_created" json:"first_created"`
	Rarity             pgtype.JSONB   `db:"rarity" json:"rarity"`
	ExtraMetadata      *string        `db:"extra_metadata" json:"extra_metadata"`
	ImageProperties    pgtype.JSONB   `db:"image_properties" json:"image_properties"`
	VideoProperties    pgtype.JSONB   `db:"video_properties" json:"video_properties"`
	AudioProperties    pgtype.JSONB   `db:"audio_properties" json:"audio_properties"`
	ModelProperties    pgtype.JSONB   `db:"model_properties" json:"model_properties"`
	OtherProperties    pgtype.JSONB   `db:"other_properties" json:"other_properties"`
	KafkaOffset        *int64         `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition     *int32         `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp     *time.Time     `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type ProcessZoraOwnerEntryBatchResults

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

func (*ProcessZoraOwnerEntryBatchResults) Close

func (*ProcessZoraOwnerEntryBatchResults) Exec

func (b *ProcessZoraOwnerEntryBatchResults) Exec(f func(int, error))

type ProcessZoraOwnerEntryParams

type ProcessZoraOwnerEntryParams struct {
	SimplehashKafkaKey       string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID          *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	KafkaOffset              *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition           *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp           *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
	ContractAddress          *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID                  pgtype.Numeric   `db:"token_id" json:"token_id"`
	OwnerAddress             *persist.Address `db:"owner_address" json:"owner_address"`
	Quantity                 pgtype.Numeric   `db:"quantity" json:"quantity"`
	CollectionID             *string          `db:"collection_id" json:"collection_id"`
	FirstAcquiredDate        *time.Time       `db:"first_acquired_date" json:"first_acquired_date"`
	LastAcquiredDate         *time.Time       `db:"last_acquired_date" json:"last_acquired_date"`
	FirstAcquiredTransaction *string          `db:"first_acquired_transaction" json:"first_acquired_transaction"`
	LastAcquiredTransaction  *string          `db:"last_acquired_transaction" json:"last_acquired_transaction"`
	MintedToThisWallet       *bool            `db:"minted_to_this_wallet" json:"minted_to_this_wallet"`
	AirdroppedToThisWallet   *bool            `db:"airdropped_to_this_wallet" json:"airdropped_to_this_wallet"`
	SoldToThisWallet         *bool            `db:"sold_to_this_wallet" json:"sold_to_this_wallet"`
	ShouldUpsert             bool             `db:"should_upsert" json:"should_upsert"`
	ShouldDelete             bool             `db:"should_delete" json:"should_delete"`
}

type ProcessZoraTokenEntryBatchResults

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

func (*ProcessZoraTokenEntryBatchResults) Close

func (*ProcessZoraTokenEntryBatchResults) QueryRow

func (b *ProcessZoraTokenEntryBatchResults) QueryRow(f func(int, string, error))

type ProcessZoraTokenEntryParams

type ProcessZoraTokenEntryParams struct {
	SimplehashNftID    string         `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ShouldDelete       bool           `db:"should_delete" json:"should_delete"`
	SimplehashKafkaKey string         `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	ContractAddress    *string        `db:"contract_address" json:"contract_address"`
	ShouldUpsert       bool           `db:"should_upsert" json:"should_upsert"`
	CollectionID       *string        `db:"collection_id" json:"collection_id"`
	TokenID            pgtype.Numeric `db:"token_id" json:"token_id"`
	Name               *string        `db:"name" json:"name"`
	Description        *string        `db:"description" json:"description"`
	Previews           pgtype.JSONB   `db:"previews" json:"previews"`
	ImageUrl           *string        `db:"image_url" json:"image_url"`
	VideoUrl           *string        `db:"video_url" json:"video_url"`
	AudioUrl           *string        `db:"audio_url" json:"audio_url"`
	ModelUrl           *string        `db:"model_url" json:"model_url"`
	OtherUrl           *string        `db:"other_url" json:"other_url"`
	BackgroundColor    *string        `db:"background_color" json:"background_color"`
	ExternalUrl        *string        `db:"external_url" json:"external_url"`
	OnChainCreatedDate *time.Time     `db:"on_chain_created_date" json:"on_chain_created_date"`
	Status             *string        `db:"status" json:"status"`
	TokenCount         pgtype.Numeric `db:"token_count" json:"token_count"`
	OwnerCount         pgtype.Numeric `db:"owner_count" json:"owner_count"`
	Contract           pgtype.JSONB   `db:"contract" json:"contract"`
	LastSale           pgtype.JSONB   `db:"last_sale" json:"last_sale"`
	FirstCreated       pgtype.JSONB   `db:"first_created" json:"first_created"`
	Rarity             pgtype.JSONB   `db:"rarity" json:"rarity"`
	ExtraMetadata      *string        `db:"extra_metadata" json:"extra_metadata"`
	ImageProperties    pgtype.JSONB   `db:"image_properties" json:"image_properties"`
	VideoProperties    pgtype.JSONB   `db:"video_properties" json:"video_properties"`
	AudioProperties    pgtype.JSONB   `db:"audio_properties" json:"audio_properties"`
	ModelProperties    pgtype.JSONB   `db:"model_properties" json:"model_properties"`
	OtherProperties    pgtype.JSONB   `db:"other_properties" json:"other_properties"`
	KafkaOffset        *int64         `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition     *int32         `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp     *time.Time     `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetCollectionIDsForMissingCollections

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

func (*Queries) GetNFTIDsForMissingContracts

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

func (*Queries) SetCollectionSimpleHashDeleted

func (q *Queries) SetCollectionSimpleHashDeleted(ctx context.Context, collectionID []string) *SetCollectionSimpleHashDeletedBatchResults

func (*Queries) UpdateBaseContract

func (*Queries) UpdateCollection

func (*Queries) UpdateZoraContract

func (*Queries) WithTx

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

type SetCollectionSimpleHashDeletedBatchResults

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

func (*SetCollectionSimpleHashDeletedBatchResults) Close

func (*SetCollectionSimpleHashDeletedBatchResults) Exec

type UpdateBaseContractBatchResults

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

func (*UpdateBaseContractBatchResults) Close

func (*UpdateBaseContractBatchResults) Exec

func (b *UpdateBaseContractBatchResults) Exec(f func(int, error))

type UpdateBaseContractParams

type UpdateBaseContractParams struct {
	Type                   *string `db:"type" json:"type"`
	Name                   *string `db:"name" json:"name"`
	Symbol                 *string `db:"symbol" json:"symbol"`
	DeployedBy             *string `db:"deployed_by" json:"deployed_by"`
	DeployedViaContract    *string `db:"deployed_via_contract" json:"deployed_via_contract"`
	OwnedBy                *string `db:"owned_by" json:"owned_by"`
	HasMultipleCollections *bool   `db:"has_multiple_collections" json:"has_multiple_collections"`
	Address                string  `db:"address" json:"address"`
}

type UpdateCollectionBatchResults

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

func (*UpdateCollectionBatchResults) Close

func (*UpdateCollectionBatchResults) Exec

func (b *UpdateCollectionBatchResults) Exec(f func(int, error))

type UpdateCollectionParams

type UpdateCollectionParams struct {
	Name                         *string      `db:"name" json:"name"`
	Description                  *string      `db:"description" json:"description"`
	ImageUrl                     *string      `db:"image_url" json:"image_url"`
	BannerImageUrl               *string      `db:"banner_image_url" json:"banner_image_url"`
	Category                     *string      `db:"category" json:"category"`
	IsNsfw                       *bool        `db:"is_nsfw" json:"is_nsfw"`
	ExternalUrl                  *string      `db:"external_url" json:"external_url"`
	TwitterUsername              *string      `db:"twitter_username" json:"twitter_username"`
	DiscordUrl                   *string      `db:"discord_url" json:"discord_url"`
	InstagramUrl                 *string      `db:"instagram_url" json:"instagram_url"`
	MediumUsername               *string      `db:"medium_username" json:"medium_username"`
	TelegramUrl                  *string      `db:"telegram_url" json:"telegram_url"`
	MarketplacePages             pgtype.JSONB `db:"marketplace_pages" json:"marketplace_pages"`
	MetaplexMint                 *string      `db:"metaplex_mint" json:"metaplex_mint"`
	MetaplexCandyMachine         *string      `db:"metaplex_candy_machine" json:"metaplex_candy_machine"`
	MetaplexFirstVerifiedCreator *string      `db:"metaplex_first_verified_creator" json:"metaplex_first_verified_creator"`
	SpamScore                    *int32       `db:"spam_score" json:"spam_score"`
	Chains                       []string     `db:"chains" json:"chains"`
	TopContracts                 []string     `db:"top_contracts" json:"top_contracts"`
	CollectionRoyalties          pgtype.JSONB `db:"collection_royalties" json:"collection_royalties"`
	CollectionID                 string       `db:"collection_id" json:"collection_id"`
}

type UpdateEthereumContractBatchResults

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

func (*UpdateEthereumContractBatchResults) Close

func (*UpdateEthereumContractBatchResults) Exec

func (b *UpdateEthereumContractBatchResults) Exec(f func(int, error))

type UpdateEthereumContractParams

type UpdateEthereumContractParams struct {
	Type                   *string `db:"type" json:"type"`
	Name                   *string `db:"name" json:"name"`
	Symbol                 *string `db:"symbol" json:"symbol"`
	DeployedBy             *string `db:"deployed_by" json:"deployed_by"`
	DeployedViaContract    *string `db:"deployed_via_contract" json:"deployed_via_contract"`
	OwnedBy                *string `db:"owned_by" json:"owned_by"`
	HasMultipleCollections *bool   `db:"has_multiple_collections" json:"has_multiple_collections"`
	Address                string  `db:"address" json:"address"`
}

type UpdateZoraContractBatchResults

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

func (*UpdateZoraContractBatchResults) Close

func (*UpdateZoraContractBatchResults) Exec

func (b *UpdateZoraContractBatchResults) Exec(f func(int, error))

type UpdateZoraContractParams

type UpdateZoraContractParams struct {
	Type                   *string `db:"type" json:"type"`
	Name                   *string `db:"name" json:"name"`
	Symbol                 *string `db:"symbol" json:"symbol"`
	DeployedBy             *string `db:"deployed_by" json:"deployed_by"`
	DeployedViaContract    *string `db:"deployed_via_contract" json:"deployed_via_contract"`
	OwnedBy                *string `db:"owned_by" json:"owned_by"`
	HasMultipleCollections *bool   `db:"has_multiple_collections" json:"has_multiple_collections"`
	Address                string  `db:"address" json:"address"`
}

type ZoraContract

type ZoraContract struct {
	Address                string     `db:"address" json:"address"`
	SimplehashLookupNftID  string     `db:"simplehash_lookup_nft_id" json:"simplehash_lookup_nft_id"`
	LastSimplehashSync     *time.Time `db:"last_simplehash_sync" json:"last_simplehash_sync"`
	CreatedAt              time.Time  `db:"created_at" json:"created_at"`
	LastUpdated            time.Time  `db:"last_updated" json:"last_updated"`
	Type                   *string    `db:"type" json:"type"`
	Name                   *string    `db:"name" json:"name"`
	Symbol                 *string    `db:"symbol" json:"symbol"`
	DeployedBy             *string    `db:"deployed_by" json:"deployed_by"`
	DeployedViaContract    *string    `db:"deployed_via_contract" json:"deployed_via_contract"`
	OwnedBy                *string    `db:"owned_by" json:"owned_by"`
	HasMultipleCollections *bool      `db:"has_multiple_collections" json:"has_multiple_collections"`
}

type ZoraOwner

type ZoraOwner struct {
	SimplehashKafkaKey       string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID          *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ContractAddress          *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID                  pgtype.Numeric   `db:"token_id" json:"token_id"`
	OwnerAddress             *persist.Address `db:"owner_address" json:"owner_address"`
	Quantity                 pgtype.Numeric   `db:"quantity" json:"quantity"`
	CollectionID             *string          `db:"collection_id" json:"collection_id"`
	FirstAcquiredDate        *time.Time       `db:"first_acquired_date" json:"first_acquired_date"`
	LastAcquiredDate         *time.Time       `db:"last_acquired_date" json:"last_acquired_date"`
	FirstAcquiredTransaction *string          `db:"first_acquired_transaction" json:"first_acquired_transaction"`
	LastAcquiredTransaction  *string          `db:"last_acquired_transaction" json:"last_acquired_transaction"`
	MintedToThisWallet       *bool            `db:"minted_to_this_wallet" json:"minted_to_this_wallet"`
	AirdroppedToThisWallet   *bool            `db:"airdropped_to_this_wallet" json:"airdropped_to_this_wallet"`
	SoldToThisWallet         *bool            `db:"sold_to_this_wallet" json:"sold_to_this_wallet"`
	CreatedAt                time.Time        `db:"created_at" json:"created_at"`
	LastUpdated              time.Time        `db:"last_updated" json:"last_updated"`
	KafkaOffset              *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition           *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp           *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
}

type ZoraToken

type ZoraToken struct {
	SimplehashKafkaKey string           `db:"simplehash_kafka_key" json:"simplehash_kafka_key"`
	SimplehashNftID    *string          `db:"simplehash_nft_id" json:"simplehash_nft_id"`
	ContractAddress    *persist.Address `db:"contract_address" json:"contract_address"`
	TokenID            pgtype.Numeric   `db:"token_id" json:"token_id"`
	Name               *string          `db:"name" json:"name"`
	Description        *string          `db:"description" json:"description"`
	Previews           pgtype.JSONB     `db:"previews" json:"previews"`
	ImageUrl           *string          `db:"image_url" json:"image_url"`
	VideoUrl           *string          `db:"video_url" json:"video_url"`
	AudioUrl           *string          `db:"audio_url" json:"audio_url"`
	ModelUrl           *string          `db:"model_url" json:"model_url"`
	OtherUrl           *string          `db:"other_url" json:"other_url"`
	BackgroundColor    *string          `db:"background_color" json:"background_color"`
	ExternalUrl        *string          `db:"external_url" json:"external_url"`
	OnChainCreatedDate *time.Time       `db:"on_chain_created_date" json:"on_chain_created_date"`
	Status             *string          `db:"status" json:"status"`
	TokenCount         pgtype.Numeric   `db:"token_count" json:"token_count"`
	OwnerCount         pgtype.Numeric   `db:"owner_count" json:"owner_count"`
	Contract           pgtype.JSONB     `db:"contract" json:"contract"`
	CollectionID       *string          `db:"collection_id" json:"collection_id"`
	LastSale           pgtype.JSONB     `db:"last_sale" json:"last_sale"`
	FirstCreated       pgtype.JSONB     `db:"first_created" json:"first_created"`
	Rarity             pgtype.JSONB     `db:"rarity" json:"rarity"`
	ExtraMetadata      *string          `db:"extra_metadata" json:"extra_metadata"`
	ImageProperties    pgtype.JSONB     `db:"image_properties" json:"image_properties"`
	VideoProperties    pgtype.JSONB     `db:"video_properties" json:"video_properties"`
	AudioProperties    pgtype.JSONB     `db:"audio_properties" json:"audio_properties"`
	ModelProperties    pgtype.JSONB     `db:"model_properties" json:"model_properties"`
	OtherProperties    pgtype.JSONB     `db:"other_properties" json:"other_properties"`
	CreatedAt          time.Time        `db:"created_at" json:"created_at"`
	LastUpdated        time.Time        `db:"last_updated" json:"last_updated"`
	KafkaOffset        *int64           `db:"kafka_offset" json:"kafka_offset"`
	KafkaPartition     *int32           `db:"kafka_partition" json:"kafka_partition"`
	KafkaTimestamp     *time.Time       `db:"kafka_timestamp" json:"kafka_timestamp"`
}

Jump to

Keyboard shortcuts

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