firefly

package
v0.0.0-...-078b0c0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ACCESS_TOKEN string
	API_BASE_URL string
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Id         string `json:"id"`
	Attributes struct {
		Name           string  `json:"name"`
		Type           string  `json:"type"`
		IsActive       bool    `json:"active"`
		CurrentBalance float32 `json:"current_balance"`
	} `json:"attributes"`
}

func GetAllAssetAccounts

func GetAllAssetAccounts() []Account

func GetAssetAccount

func GetAssetAccount(accountName string) *Account

type ListAccount

type ListAccount struct {
	Accounts []Account `json:"data"`
}

type ListTransaction

type ListTransaction struct {
	ParentTransactions []ParentTransaction `json:"data"`
	Meta               Meta                `json:"meta"`
}

func FetchTransactions

func FetchTransactions(accountId string, pageNumber int, start string, end string) ListTransaction

type Meta

type Meta struct {
	Pagination struct {
		CurrentPage int `json:"current_page"`
		TotalPages  int `json:"total_pages"`
		PerPage     int `json:"per_page"`
	} `json:"pagination"`
}

type ParentTransaction

type ParentTransaction struct {
	Id         string `json:"id"`
	Attributes struct {
		CreatedOn    string        `json:"name"`
		UpdateOn     string        `json:"type"`
		Transactions []Transaction `json:"transactions"`
	} `json:"attributes"`
}

func GetAllTransactions

func GetAllTransactions(accountId string, startDate time.Time, endDate time.Time) []ParentTransaction

type Transaction

type Transaction struct {
	Type            string    `json:"type"`
	Date            time.Time `json:"date"`
	Currency        string    `json:"currency_code"`
	Amount          float32   `json:"amount,string"`
	SourceType      string    `json:"source_type"`
	DestinationType string    `json:"destination_type"`
}

Jump to

Keyboard shortcuts

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