bb8

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultLastTxADA

type ResultLastTxADA struct {
	Addr          string `json:"addr,omitempty"`
	CtbID         string `json:"ctbId,omitempty"`
	CtbTimeIssued string `json:"ctbTimeIssued,omitempty"`
	FromAddr      string `json:"from_addr,omitempty"`
	ToAddr        string `json:"to_addr,omitempty"`
	Balance       string `json:"balance,omitempty"`
	Ammount       string `json:"ammount,omitempty"`
	TypeTx        string `json:"type_tx,omitempty"`
	Symbol        string `json:"symbol,omitempty"`
}

ResultLastTxADA return the last TX by ADA symbol (Cardano blockchain)

func (*ResultLastTxADA) ToJSON

func (rtx *ResultLastTxADA) ToJSON() string

ToJSON ...

func (*ResultLastTxADA) ToMAP

func (rtx *ResultLastTxADA) ToMAP() (toHashMap map[string]interface{}, err error)

ToMAP ...

func (*ResultLastTxADA) TruncateAddress

func (rtx *ResultLastTxADA) TruncateAddress(address string) string

TruncateAddress ...

type ResultLastTxSOL

type ResultLastTxSOL struct {
	Addr      string `json:"addr,omitempty"`
	TxID      string `json:"tx_id,omitempty"`
	Timestamp string `json:"timestamp,omitempty"`
	FromAddr  string `json:"from_addr,omitempty"`
	ToAddr    string `json:"to_addr,omitempty"`
	Balance   string `json:"balance,omitempty"`
	Ammount   string `json:"ammount,omitempty"`
	TypeTx    string `json:"type_tx,omitempty"`
	Symbol    string `json:"symbol,omitempty"`
}

ResultLastTxSOL return the last TX by address SOL symbol

func (*ResultLastTxSOL) ToJSON

func (rtx *ResultLastTxSOL) ToJSON() string

ToJSON ...

func (*ResultLastTxSOL) ToMAP

func (rtx *ResultLastTxSOL) ToMAP() (toHashMap map[string]interface{}, err error)

ToMAP ...

func (*ResultLastTxSOL) TruncateAddress

func (rtx *ResultLastTxSOL) TruncateAddress(address string) string

TruncateAddress ...

type TxRepository

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

TxRepository repository

func NewTx

func NewTx(limit int) TxRepository

NewTx constructor

func NewTxRepository

func NewTxRepository(exporterType string, clients ...interface{}) TxRepository

NewTxRepository constructor client

func (*TxRepository) ExportData

func (r *TxRepository) ExportData(ctx context.Context, data interface{}) error

ExportData export data from ADA or SOL symbol

func (*TxRepository) Get

func (r *TxRepository) Get(ctx context.Context, address string) (string, error)

Get the last tx value by address as a key

func (*TxRepository) Set

func (r *TxRepository) Set(ctx context.Context, address, lastTx string, expiration time.Duration) error

Set an address as a key and the last TX as a value

type Txer

type Txer interface {
	Set(ctx context.Context, key, value string, expiration time.Duration) error
	Get(ctx context.Context, key string) (string, error)
}

Txer define all methods that can be used for our worker...

Jump to

Keyboard shortcuts

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