firebase

package
v1.0.13-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	NetworkId   int64
	TxHash      string
	TxTimestamp int64
	Created     int64
	Sent        int64
}

type Notifier

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

Notifier implements ingest notifier and sends data to firebase instance

func NewNotifier

func NewNotifier(
	log *logan.Entry,
	firestoreClient *firestore.Client,
	messagingClient *messaging.Client,
	chainId int64,
) *Notifier

NewNotifier creates new firebase notifier

func (*Notifier) NewPayment

func (n *Notifier) NewPayment(pmnt *data.Payment)

NewPayment sends payment data to firebase instance

func (*Notifier) NewTransaction

func (n *Notifier) NewTransaction(tx *data.Transaction)

NewTransaction sends transaction data to firebase instance

func (*Notifier) SendNotifications

func (n *Notifier) SendNotifications(timestamp int64, ctx context.Context) error

type Payment

type Payment struct {
	NetworkId int64

	TxHash    string
	Sender    string
	Recipient string
	Value     string

	Token *string

	Timestamp int64

	Gas      int64
	GasPrice string
	Input    []byte
}

Payment represents firebase payment model

type Transaction

type Transaction struct {
	NetworkId int64

	Hash      string
	Block     int64
	Sender    string
	Recipient *string
	Value     string

	Nonce    int64
	GasPrice string
	Gas      int64
	Input    []byte

	Timestamp int64
}

Transaction represents firebase transaction model

Jump to

Keyboard shortcuts

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