Documentation
¶
Index ¶
- Constants
- func ExportTableCSV(table Table) (string, error)
- type ColumnType
- type ComputeResult
- type DQIssue
- type DQSummaryByRuleRow
- type DebtMaturityScheduleByMonthRow
- type Engine
- func (e *Engine) Compute(rows []pdfcardsummary.MovementWithCardContext, mappings Mappings) ComputeResult
- func (e *Engine) DataQuality(rows []pdfcardsummary.MovementWithCardContext, mappings Mappings) ([]DQIssue, []DQSummaryByRuleRow)
- func (e *Engine) DebtMaturityScheduleByMonth(rows []pdfcardsummary.MovementWithCardContext) []DebtMaturityScheduleByMonthRow
- func (e *Engine) MetaSummary(rows []pdfcardsummary.MovementWithCardContext) MetaSummary
- func (e *Engine) OverviewByStatementMonth(rows []pdfcardsummary.MovementWithCardContext) []OverviewByStatementMonthRow
- func (e *Engine) OverviewMetricsByStatementMonth(rows []pdfcardsummary.MovementWithCardContext) []OverviewMetricsByStatementMonthRow
- func (e *Engine) RawExplorerRows(rows []pdfcardsummary.MovementWithCardContext) []RawExplorerRow
- func (e *Engine) SpendByCategory(rows []pdfcardsummary.MovementWithCardContext) []SpendByCategoryRow
- func (e *Engine) SpendByOwner(rows []pdfcardsummary.MovementWithCardContext) []SpendByOwnerRow
- type Mappings
- type MetaSummary
- type OverviewByStatementMonthRow
- type OverviewMetricsByStatementMonthRow
- type RawExplorerRow
- type SpendByCategoryRow
- type SpendByOwnerRow
- type Table
- type TableColumn
Constants ¶
View Source
const ( TableIDMetaSummary = "meta_summary" TableIDOverviewByMonth = "overview_by_statement_month" TableIDOverviewMetricsByMonth = "overview_metrics_by_statement_month" TableIDDebtMaturitySchedule = "debt_maturity_schedule_by_month_v1" TableIDSpendByOwner = "spend_by_owner" TableIDSpendByCategory = "spend_by_category" TableIDCategoryBreakdownByMonth = "category_breakdown_by_month" TableIDRawExplorerRows = "raw_explorer_rows_v1" TableIDDQIssues = "dq_issues" TableIDDQSummaryByRule = "dq_summary_by_rule" )
View Source
const ( DQRuleMissingCategoryMappingForCardMovement = "DQ003" DQRuleMissingOwnerMappingForCardMovement = "DQ004" )
Variables ¶
This section is empty.
Functions ¶
func ExportTableCSV ¶
Types ¶
type ColumnType ¶
type ColumnType string
const ( ColumnTypeString ColumnType = "string" ColumnTypeNumber ColumnType = "number" ColumnTypeDate ColumnType = "date" ColumnTypeMoneyARS ColumnType = "money_ars" ColumnTypeMoneyUSD ColumnType = "money_usd" )
type ComputeResult ¶
type ComputeResult struct {
Tables []Table
}
type DQIssue ¶
type DQIssue struct {
RuleID string
Message string
MovementType pdfcardsummary.MovementType
CloseDate time.Time
Detail string
CardOwner string
CardNumber *string
}
type DQSummaryByRuleRow ¶
type Engine ¶
type Engine struct{}
func (*Engine) Compute ¶
func (e *Engine) Compute(rows []pdfcardsummary.MovementWithCardContext, mappings Mappings) ComputeResult
func (*Engine) DataQuality ¶
func (e *Engine) DataQuality(rows []pdfcardsummary.MovementWithCardContext, mappings Mappings) ([]DQIssue, []DQSummaryByRuleRow)
func (*Engine) DebtMaturityScheduleByMonth ¶
func (e *Engine) DebtMaturityScheduleByMonth(rows []pdfcardsummary.MovementWithCardContext) []DebtMaturityScheduleByMonthRow
func (*Engine) MetaSummary ¶
func (e *Engine) MetaSummary(rows []pdfcardsummary.MovementWithCardContext) MetaSummary
func (*Engine) OverviewByStatementMonth ¶
func (e *Engine) OverviewByStatementMonth(rows []pdfcardsummary.MovementWithCardContext) []OverviewByStatementMonthRow
func (*Engine) OverviewMetricsByStatementMonth ¶
func (e *Engine) OverviewMetricsByStatementMonth(rows []pdfcardsummary.MovementWithCardContext) []OverviewMetricsByStatementMonthRow
func (*Engine) RawExplorerRows ¶
func (e *Engine) RawExplorerRows(rows []pdfcardsummary.MovementWithCardContext) []RawExplorerRow
func (*Engine) SpendByCategory ¶
func (e *Engine) SpendByCategory(rows []pdfcardsummary.MovementWithCardContext) []SpendByCategoryRow
func (*Engine) SpendByOwner ¶
func (e *Engine) SpendByOwner(rows []pdfcardsummary.MovementWithCardContext) []SpendByOwnerRow
type MetaSummary ¶
type OverviewMetricsByStatementMonthRow ¶
type OverviewMetricsByStatementMonthRow struct {
StatementMonthDate time.Time
NetStatementARS decimal.Decimal
NetStatementUSD decimal.Decimal
CardMovementsARS decimal.Decimal
CardMovementsUSD decimal.Decimal
NewDebtARS decimal.Decimal
NewDebtUSD decimal.Decimal
CarryOverDebtARS decimal.Decimal
CarryOverDebtUSD decimal.Decimal
NextMonthDebtARS decimal.Decimal
NextMonthDebtUSD decimal.Decimal
RemainingDebtARS decimal.Decimal
RemainingDebtUSD decimal.Decimal
TaxesARS decimal.Decimal
TaxesUSD decimal.Decimal
PastPaymentsARS decimal.Decimal
PastPaymentsUSD decimal.Decimal
}
type RawExplorerRow ¶
type RawExplorerRow struct {
CardStatementCloseDate time.Time
CardStatementDueDate time.Time
Bank string
CardCompany string
MovementDate *time.Time
CardNumber string
CardOwner string
MovementType string
ReceiptNumber string
Detail string
InstallmentCurrent *int
InstallmentTotal *int
AmountARS decimal.Decimal
AmountUSD decimal.Decimal
}
type SpendByCategoryRow ¶
type SpendByCategoryRow struct {
Month time.Time
Category string
CardMovementTotalARS decimal.Decimal
CardMovementTotalUSD decimal.Decimal
}
v0a note: without mappings yet, this uses raw Detail as the category key.
type SpendByOwnerRow ¶
type Table ¶
type Table struct {
TableID string
Title string
Description string // Human-readable explanation. If you change the rows, update this.
Columns []TableColumn
Rows [][]string
}
type TableColumn ¶
type TableColumn struct {
Key string
Label string
Type ColumnType
}
Click to show internal directories.
Click to hide internal directories.