tokenindexer

package
v1.1.16-0...-5f6d184 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenIndexer              = "TokenIndexer"
	SubscriptionsTokenIndexer = "SubscriptionsTokenIndexer"
)

Variables

This section is empty.

Functions

func CreateAssociations

func CreateAssociations(database *db.Instance, addressAssetsMap map[string][]string) error

func GetAssetsFromTransactions

func GetAssetsFromTransactions(txs types.Txs) []models.Asset

func RunTokenIndexer

func RunTokenIndexer(database *db.Instance, delivery amqp.Delivery) error

func RunTokenIndexerSubscribe

func RunTokenIndexerSubscribe(database *db.Instance, apis map[uint]blockatlas.TokensAPI, delivery amqp.Delivery) error

Types

type ConsumerIndexer

type ConsumerIndexer struct {
	Database   *db.Instance
	TokensAPIs map[uint]blockatlas.TokensAPI
	Delivery   func(*db.Instance, map[uint]blockatlas.TokensAPI, amqp.Delivery) error
	Tag        string
}

func (ConsumerIndexer) Callback

func (c ConsumerIndexer) Callback(msg amqp.Delivery) error

type GetTokensByAddressRequest

type GetTokensByAddressRequest struct {
	AddressesByCoin map[string][]string `json:"addresses"`
	From            uint                `json:"from"`
}

type GetTokensByAddressResponse

type GetTokensByAddressResponse []string

type Instance

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

func Init

func Init(database *db.Instance) Instance

func (Instance) GetNewTokensRequest

func (i Instance) GetNewTokensRequest(r Request) (blockatlas.ResultsResponse, error)

func (Instance) GetTokensByAddress

type Request

type Request struct {
	From int64
}

Jump to

Keyboard shortcuts

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