directives

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetRange

func SetRange[T any, P interface {
	*T
	SetRange(Range)
}](t P, r Range) T

Types

type Account

type Account struct {
	Range
	Macro bool
}

type Accrual

type Accrual struct {
	Range
	Interval   Interval
	Start, End Date
	Account    Account
}

type Addons

type Addons struct {
	Range
	Performance Performance
	Accrual     Accrual
}

type Assertion

type Assertion struct {
	Range
	Date     Date
	Balances []Balance
}

type Balance

type Balance struct {
	Range
	Account   Account
	Quantity  Decimal
	Commodity Commodity
}

type Booking

type Booking struct {
	Range
	Credit, Debit Account
	Quantity      Decimal
	Commodity     Commodity
}

type Close

type Close struct {
	Range
	Date    Date
	Account Account
}

type Commodity

type Commodity struct{ Range }

type Date

type Date struct{ Range }

func (Date) Parse

func (d Date) Parse() (time.Time, error)

type Decimal

type Decimal struct{ Range }

func (Decimal) Parse

func (d Decimal) Parse() (decimal.Decimal, error)

type Directive

type Directive struct {
	Range
	Directive any
}

type Error

type Error struct {
	Range
	Message string
	Wrapped error
}

func (Error) Error

func (e Error) Error() string

type File

type File struct {
	Range
	Directives []Directive
}

type Include

type Include struct {
	Range
	IncludePath QuotedString
}

type Interval

type Interval struct{ Range }

type Location

type Location struct {
	Line, Col int
}

func (Location) String

func (l Location) String() string

type Open

type Open struct {
	Range
	Date    Date
	Account Account
}

type Performance

type Performance struct {
	Range
	Targets []Commodity
}

type Price

type Price struct {
	Range
	Date              Date
	Commodity, Target Commodity
	Price             Decimal
}

type QuotedString

type QuotedString struct {
	Range
	Content Range
}

type Range

type Range struct {
	Start, End int
	Path, Text string
}

func (Range) Context

func (r Range) Context(previous int) []string

func (Range) Empty

func (r Range) Empty() bool

func (*Range) Extend

func (r *Range) Extend(r2 Range)

func (Range) Extract

func (r Range) Extract() string

func (Range) Length

func (r Range) Length() int

func (Range) Location

func (r Range) Location() Location

func (*Range) SetRange

func (r *Range) SetRange(r2 Range)

type Transaction

type Transaction struct {
	Range
	Date        Date
	Description QuotedString
	Bookings    []Booking
	Addons      Addons
}

Jump to

Keyboard shortcuts

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