Documentation ¶
Overview ¶
Description: This package provides mock data for testing purposes. The mock data is designed to represent Fabriktor models as map[string]interface{} and can be imported across various services to facilitate testing.
Index ¶
Constants ¶
View Source
const ( ChargeProductNameKey = "product_name" ChargeAppliedTaxesKey = "applied_taxes" ChargeQuantityKey = "quantity" ChargeQuantifierNameKey = "quantifier_name" ChargeUnitPriceKey = "unit_price" ChargeSubTotalKey = "sub_total" ChargeTaxTotalKey = "tax_total" ChargeTotalKey = "total" ChargeDetailsKey = "details" SupInvoiceProductNameKey = "product_name" SupInvoiceAppliedTaxesKey = "applied_taxes" SupInvoiceQuantityKey = "quantity" SupInvoiceQuantifierNameKey = "quantifier_name" SupInvoiceUnitPriceKey = "unit_price" SupInvoiceSubTotalKey = "sub_total" SupInvoiceTaxTotalKey = "tax_total" SupInvoiceTotalKey = "total" SupInvoiceDetailsKey = "details" SalaryTransportProductNameKey = "product_name" SalaryTransportAppliedTaxesKey = "applied_taxes" SalaryTransportQuantityKey = "quantity" SalaryTransportQuantifierNameKey = "quantifier_name" SalaryTransportUnitPriceKey = "unit_price" SalaryTransportSubTotalKey = "sub_total" SalaryTransportTaxTotalKey = "tax_total" SalaryTransportTotalKey = "total" SalaryTransportDetailsKey = "details" TotalImplicitSubTotalKey = "sub_total" TotalImplicitTaxDetailsKey = "tax_details" TotalImplicitTaxTotalKey = "tax_total" TotalImplicitTotalKey = "total" TaxDetailTaxIDKey = "tax_id" TaxDetailTaxTotalKey = "tax_total" TaxDetailTaxNameKey = "tax_name" TaxNameKey = "name" TaxAuthorIDKey = "author_id" TaxDescriptionKey = "description" TaxRateKey = "rate" TaxIDKey = "tax_id" TaxSchemaVersionKey = "schema_version" TaxUpdatedAtKey = "updated_at" TaxCreatedAtKey = "created_at" BillIDKey = "_id" BillSchemaVersionKey = "schema_version" BillUpdatedAtKey = "updated_at" BillCreatedAtKey = "created_at" BillNumberKey = "number" BillStartPeriodKey = "start_period" BillEndPeriodKey = "end_period" BillYearKey = "year" BillSalaryEntriesKey = "salary_entries" BillTransportationEntriesKey = "transportation_entries" BillChargeEntriesKey = "charge_entries" BillSupInvoiceEntriesKey = "sup_invoice_entries" BillSalaryTotalKey = "salary_total" BillTransportationTotalKey = "transportation_total" BillChargeTotalKey = "charge_total" BillSupInvoiceTotalKey = "sup_invoice_total" BillTotalKey = "total" BillUpfrontKey = "upfront" BillBalanceKey = "balance" BillTitleKey = "title" BillTypeKey = "bill_type" BillStartDateKey = "start_date" BillEndDateKey = "end_date" BillAuthorIDKey = "author_id" BillClientIDKey = "client_id" BillWorksiteIDKey = "worksite_id" BillTimezoneKey = "timezone" BillSalaryTaxesKey = "salary_taxes" BillSupInvoiceTaxesKey = "sup_invoice_taxes" BillChargeTaxesKey = "charge_taxes" BillBottomNoteKey = "bottom_note" BillExcludeChargedKey = "exclude_charged" BillIsEstimateKey = "is_estimate" BillIsInternalKey = "is_internal" BillIncludeTransportationKey = "include_transportation" BillIncludeSalaryKey = "include_salary" BillIncludeSupInvoiceKey = "include_sup_invoice" BillIncludeChargeKey = "include_charge" BillIsInvoicedKey = "is_invoiced" BillUpfrontRateKey = "upfront_rate" )
Define constants for all keys.
Variables ¶
View Source
var BillMock = map[string]interface{}{ BillIDKey: "5f6d4b9b9c6f9f0001b9c6f9", BillSchemaVersionKey: "v1", BillUpdatedAtKey: "2020-10-05T10:00:00Z", BillCreatedAtKey: "2020-10-05T10:00:00Z", BillNumberKey: json.Number("183423"), BillStartPeriodKey: json.Number("30"), BillEndPeriodKey: json.Number("35"), BillYearKey: json.Number("2020"), BillSalaryEntriesKey: []map[string]interface{}{SalaryEntryMock, SalaryEntryMock}, BillTransportationEntriesKey: []map[string]interface{}{SalaryEntryMock, SalaryEntryMock, SalaryEntryMock}, BillChargeEntriesKey: []map[string]interface{}{ChargeEntryMock, ChargeEntryMock, ChargeEntryMock, ChargeEntryMock}, BillSupInvoiceEntriesKey: []map[string]interface{}{SupInvoiceEntryMock, SupInvoiceEntryMock, SupInvoiceEntryMock, SupInvoiceEntryMock, SupInvoiceEntryMock}, BillSalaryTotalKey: TotalImplicitMock, BillTransportationTotalKey: TotalImplicitMock, BillChargeTotalKey: TotalImplicitMock, BillSupInvoiceTotalKey: TotalImplicitMock, BillTotalKey: TotalImplicitMock, BillUpfrontKey: json.Number("2000"), BillBalanceKey: json.Number("6000"), BillTitleKey: "Barn Construction", BillTypeKey: "fixed", BillStartDateKey: "2020-10-05T14:00:00Z", BillEndDateKey: "2020-10-05T14:00:00Z", BillAuthorIDKey: "5f7b1b9b9b9b9b9b9b9b9b9b", BillClientIDKey: "5f7b1b9b9b9b9b9b9b9b9b9b", BillWorksiteIDKey: "5f7b1b9b9b9b9b9b9b9b9b9b", BillTimezoneKey: "America/New_York", BillSalaryTaxesKey: []map[string]interface{}{TaxMock}, BillSupInvoiceTaxesKey: []map[string]interface{}{TaxMock}, BillChargeTaxesKey: []map[string]interface{}{TaxMock}, BillBottomNoteKey: "The bill is due 30 days from now", BillExcludeChargedKey: true, BillIsEstimateKey: false, BillIsInternalKey: true, BillIncludeTransportationKey: true, BillIncludeSalaryKey: true, BillIncludeSupInvoiceKey: true, BillIncludeChargeKey: true, BillIsInvoicedKey: true, BillUpfrontRateKey: json.Number("2000"), }
Mock data for model.Bill.
View Source
var ChargeEntryMock = map[string]interface{}{ ChargeProductNameKey: "Screws", ChargeAppliedTaxesKey: []string{"QST", "PST"}, ChargeQuantityKey: json.Number("1.25"), ChargeQuantifierNameKey: "Box", ChargeUnitPriceKey: json.Number("4550"), ChargeSubTotalKey: json.Number("10000"), ChargeTaxTotalKey: json.Number("1400"), ChargeTotalKey: json.Number("11400"), ChargeDetailsKey: "", }
Mock data for charge emb.Entry.
View Source
var SalaryEntryMock = map[string]interface{}{ SalaryTransportProductNameKey: "John Cena (32)", SalaryTransportAppliedTaxesKey: []string{"QST", "PST"}, SalaryTransportQuantityKey: json.Number("30.50"), SalaryTransportQuantifierNameKey: "h", SalaryTransportUnitPriceKey: json.Number("6000"), SalaryTransportSubTotalKey: json.Number("10000"), SalaryTransportTaxTotalKey: json.Number("1400"), SalaryTransportTotalKey: json.Number("11400"), SalaryTransportDetailsKey: "2021-11-01 / 2021-11-07", }
Mock data for the salary emb.Entry.
View Source
var SupInvoiceEntryMock = map[string]interface{}{ SupInvoiceProductNameKey: "Donald Trump Wood Supplies Inc.", SupInvoiceAppliedTaxesKey: []string{"QST", "PST"}, SupInvoiceQuantityKey: json.Number("1"), SupInvoiceQuantifierNameKey: "", SupInvoiceUnitPriceKey: json.Number("4550"), SupInvoiceSubTotalKey: json.Number("10000"), SupInvoiceTaxTotalKey: json.Number("1400"), SupInvoiceTotalKey: json.Number("11400"), SupInvoiceDetailsKey: "", }
Mock data for supinvoice emb.Entry.
View Source
var TaxDetailMock = map[string]interface{}{ TaxDetailTaxIDKey: "5f7b1b9b9b9b9b9b9b9b9b9b", TaxDetailTaxTotalKey: json.Number("2450"), TaxDetailTaxNameKey: "QST", }
Mock data for emb.TaxDetail.
View Source
var TaxMock = map[string]interface{}{ TaxNameKey: "QST", TaxAuthorIDKey: "5f7b1b9b9b9b9b9b9b9b9b9b", TaxDescriptionKey: "Quebec Sales Tax", TaxRateKey: json.Number("9975"), TaxIDKey: "5f7b1b9b9b9b9b9b9b9b9b9b", TaxSchemaVersionKey: "v1", TaxUpdatedAtKey: "2020-10-05T10:00:00Z", TaxCreatedAtKey: "2020-10-05T10:00:00Z", }
Mock data for emb.Tax.
View Source
var TotalImplicitMock = map[string]interface{}{ TotalImplicitSubTotalKey: json.Number("10000"), TotalImplicitTaxDetailsKey: []map[string]interface{}{ TaxDetailMock, TaxDetailMock, }, TotalImplicitTaxTotalKey: json.Number("1400"), TotalImplicitTotalKey: json.Number("11400"), }
Mock data for emb.TotalImplicit.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.