etl

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DuplicateAddresses

func DuplicateAddresses(rows []RawRow) (duplicates map[string][]uint64)

DuplicateAddresses returns a map of every address referred to by more than one row

func Load

func Load(conf *config.Config, rows []RawRow, ndauhome string) error

Load the given rows into the noms configuration

func TransformRow

func TransformRow(row RawRow, logger logrus.FieldLogger, bonusTable eai.RateTable) (ad backing.AccountData, err error)

TransformRow creates an AccountData struct given a RawRow from the spreadsheet

Types

type RawRow

type RawRow struct {
	RowNumber        uint64
	Address          string
	QtyPurchased     float64
	PurchaseDate     time.Time
	UnlockDate       *time.Time
	RewardTarget     *string
	DelegationNode   *string
	RecoursePeriod   time.Duration
	RewardSource     *string
	ValidationPublic []signature.PublicKey
	ValidationScript vm.Chaincode
}

RawRow encapsulates the raw data of a single row of the ndau spreadsheet

func Extract

func Extract(conf *config.Config) ([]RawRow, error)

Extract the input spreadsheet into a list of raw rows

func (RawRow) String

func (rr RawRow) String() string

Jump to

Keyboard shortcuts

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