export

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExportTypeMonzo = ExportType("Monzo")
	Monzo           = "Monzo"
)
View Source
const (
	ExportTypeStarling = ExportType("Starling")
	Starling           = "Starling"
)

Variables

This section is empty.

Functions

func NewMonzoTransactionExporter

func NewMonzoTransactionExporter(api monzo.Client) *monzoTransactionExporter

func NewStarlingTransactionExporter

func NewStarlingTransactionExporter(api starling.Client) *starlingTransactionExporter

func Register

func Register(exportType ExportType, constructor ExporterConstructor)

func Transactions

func Transactions(ctx context.Context, exportType ExportType, opts Options, formatter format.Formatter) error

Types

type ExportType

type ExportType string

func All

func All() []ExportType

type Exporter

type Exporter interface {
	Type() ExportType
	MaxDateRange() time.Duration
	ExportTransactions(ctx context.Context, opts Options) ([]*domain.Transaction, error) // Export(ctx context.Context, opts Options) ([]T, error)
}

func NewExporter

func NewExporter(exportType ExportType, opts Options) (Exporter, error)

type ExporterConstructor

type ExporterConstructor func(opts Options) (Exporter, error)

type Options

type Options struct {
	AccountID string
	EndDate   time.Time
	StartDate time.Time
	AuthToken string
	Timeout   time.Duration
	Format    format.FormatType
}

func (Options) BearerAuthToken

func (o Options) BearerAuthToken() string

func (Options) Validate

func (o Options) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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