database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func NewDB

func NewDB(config *config.Config) (*DB, error)

func (*DB) Close

func (db *DB) Close()

func (*DB) GetAllTransactions

func (db *DB) GetAllTransactions() ([]Transaction, error)

func (*DB) GetTransaction

func (db *DB) GetTransaction(txID string) (*Transaction, error)

func (*DB) SaveTransaction

func (db *DB) SaveTransaction(txID, destination string, amount uint64) error

type Transaction

type Transaction struct {
	TxID        string `json:"txID"`
	Destination string `json:"destination"`
	Amount      uint64 `json:"amount"`
	Timestamp   int64  `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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