ledgerv1

package
v0.5.25 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_ledger_v1_ledger_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Split

type Split struct {

	// The account topic's topics.id - must already be a %GNUCASH_ACCOUNT% topic.
	AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	// Decimal amount, same convention as %GNUCASH_SPLIT%'s own Amount
	// attribute (see the ledger package's doc comment): positive = Debit,
	// negative = Credit, e.g. "45.00" or "-45.00". Always a string, never
	// a float, for the same exact-decimal reason parseAmount/formatAmount
	// use math/big.Rat rather than float64.
	Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

Split is one leg of a Transaction.

func (*Split) Descriptor deprecated

func (*Split) Descriptor() ([]byte, []int)

Deprecated: Use Split.ProtoReflect.Descriptor instead.

func (*Split) GetAccountId

func (x *Split) GetAccountId() uint64

func (*Split) GetAmount

func (x *Split) GetAmount() string

func (*Split) ProtoMessage

func (*Split) ProtoMessage()

func (*Split) ProtoReflect

func (x *Split) ProtoReflect() protoreflect.Message

func (*Split) Reset

func (x *Split) Reset()

func (*Split) String

func (x *Split) String() string

type Transaction

type Transaction struct {

	// The transaction topic's topics.id - must already be a %GNUCASH_TX% topic.
	TopicId uint64   `protobuf:"varint,1,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"`
	Split   []*Split `protobuf:"bytes,2,rep,name=split,proto3" json:"split,omitempty"`
	// contains filtered or unexported fields
}

Transaction records one balanced transaction's splits against an already-existing %GNUCASH_TX% topic - splits must sum to zero, the same requirement the macro-driven path enforces. Replaces that topic's entire current split set (same "clean slate" behavior Save itself has for a re-save).

func (*Transaction) Descriptor deprecated

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetSplit

func (x *Transaction) GetSplit() []*Split

func (*Transaction) GetTopicId

func (x *Transaction) GetTopicId() uint64

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

Source Files

  • ledger.pb.go

Jump to

Keyboard shortcuts

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