fireflyiii

package
v0.99.16 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fireflyiii implements the Firefly III adapter for the finance capability.

Index

Constants

View Source
const (
	OpCreateTransaction = "create_transaction"
	OpListTransactions  = "list_transactions"
	OpGetTransaction    = "get_transaction"
	OpUpdateTransaction = "update_transaction"
	OpDeleteTransaction = "delete_transaction"
	OpListAccounts      = "list_accounts"
	OpListCategories    = "list_categories"
	OpListBudgets       = "list_budgets"
	OpListBills         = "list_bills"
	OpListTags          = "list_tags"
	OpAbout             = "about"
	OpCurrentUser       = "current_user"
	OpHealth            = "health"
)

Variables

This section is empty.

Functions

func CatalogSpec added in v0.98.2

func CatalogSpec() capability.Spec

CatalogSpec returns capability metadata for documentation (handlers may close over a nil service and must not be invoked).

func Register

func Register(app string, svc Service) error

Register registers the fireflyiii capability with hub and invoker registry. When svc is nil the provider is not configured and registration is skipped.

Types

type AccountListQuery

type AccountListQuery struct {
	Page capability.PageRequest
	Type string
}

AccountListQuery holds filters and pagination for listing accounts.

type Adapter

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

Adapter implements Service using the Firefly III provider client.

func (*Adapter) About

func (a *Adapter) About(ctx context.Context) (*capability.FinanceAbout, error)

About returns Firefly III instance metadata.

func (*Adapter) CreateTransaction

func (a *Adapter) CreateTransaction(ctx context.Context, in CreateTransactionInput) (*capability.Transaction, error)

CreateTransaction creates a new finance transaction. Source and destination must each be identified by id and/or name. ApplyRules and FireWebhooks are enabled so Firefly processes rules and notifies listeners.

func (*Adapter) CurrentUser

func (a *Adapter) CurrentUser(ctx context.Context) (*capability.FinanceUser, error)

CurrentUser returns the authenticated Firefly III user.

func (*Adapter) DeleteTransaction

func (a *Adapter) DeleteTransaction(ctx context.Context, id string) error

DeleteTransaction deletes a transaction group by id.

func (*Adapter) GetTransaction

func (a *Adapter) GetTransaction(ctx context.Context, id string) (*capability.Transaction, error)

GetTransaction returns one transaction group by id.

func (*Adapter) HealthCheck

func (a *Adapter) HealthCheck(ctx context.Context) (bool, error)

HealthCheck reports whether the Firefly III backend is reachable.

func (*Adapter) ListAccounts

ListAccounts lists accounts with optional type filter.

func (*Adapter) ListBills

ListBills lists bills.

func (*Adapter) ListBudgets

ListBudgets lists budgets.

func (*Adapter) ListCategories

ListCategories lists categories.

func (*Adapter) ListTags

ListTags lists tags.

func (*Adapter) ListTransactions

ListTransactions lists transaction groups with filters and opaque cursor pagination.

func (*Adapter) SetCursorSecret

func (a *Adapter) SetCursorSecret(secret []byte)

SetCursorSecret overrides the HMAC secret used for opaque list cursors.

func (*Adapter) UpdateTransaction

func (a *Adapter) UpdateTransaction(ctx context.Context, in UpdateTransactionInput) (*capability.Transaction, error)

UpdateTransaction applies a partial update to the first split of a transaction group. All existing splits are sent back on PUT so Firefly does not drop non-first splits.

type CreateTransactionInput

type CreateTransactionInput struct {
	Type            string
	Date            string
	Amount          string
	Description     string
	SourceID        string
	SourceName      string
	DestinationID   string
	DestinationName string
	CategoryName    string
	BudgetID        string
	BudgetName      string
	BillID          string
	BillName        string
	Notes           string
	Tags            []string
}

CreateTransactionInput holds parameters for creating a finance transaction.

type ResourceListQuery

type ResourceListQuery struct {
	Page capability.PageRequest
}

ResourceListQuery holds pagination for simple resource lists.

type Service

Service defines the fireflyiii finance capability contract.

func New

func New() Service

New creates an Adapter using the default provider client (reads config from YAML). Returns nil when the provider is not configured.

func NewWithClient

func NewWithClient(c client) Service

NewWithClient creates an Adapter with a specific client, useful for testing.

type TransactionListQuery

type TransactionListQuery struct {
	Page      capability.PageRequest
	Type      string
	Start     string
	End       string
	AccountID string
}

TransactionListQuery holds filters and pagination for listing transactions.

type UpdateTransactionInput

type UpdateTransactionInput struct {
	ID              string
	Type            *string
	Date            *string
	Amount          *string
	Description     *string
	SourceID        *string
	SourceName      *string
	DestinationID   *string
	DestinationName *string
	CategoryName    *string
	BudgetID        *string
	BudgetName      *string
	BillID          *string
	BillName        *string
	Notes           *string
	Tags            *[]string
}

UpdateTransactionInput holds partial updates for a transaction group. Pointer fields mean "set this value"; nil means leave unchanged.

Jump to

Keyboard shortcuts

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