Documentation
¶
Index ¶
- Variables
- type Split
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetSplit() []*Split
- func (x *Transaction) GetTopicId() uint64
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
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) ProtoReflect ¶
func (x *Split) ProtoReflect() protoreflect.Message
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
Click to show internal directories.
Click to hide internal directories.