MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / storeBatch

Function storeBatch

internal/files/files.go:372–379  ·  view source on GitHub ↗
(ctx context.Context, uploadID string, batch []model.ExternalTransaction, store StoreFunc)

Source from the content-addressed store, hash-verified

370}
371
372func storeBatch(ctx context.Context, uploadID string, batch []model.ExternalTransaction, store StoreFunc) error {
373 for _, txn := range batch {
374 if err := store(ctx, uploadID, txn); err != nil {
375 return err
376 }
377 }
378 return nil
379}
380
381func createColumnMap(headers []string) (map[string]int, error) {
382 requiredColumns := []string{"ID", "Amount", "Date"}

Callers 1

processWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected