(ctx context.Context, uploadID string, batch []model.ExternalTransaction, store StoreFunc)
| 370 | } |
| 371 | |
| 372 | func 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 | |
| 381 | func createColumnMap(headers []string) (map[string]int, error) { |
| 382 | requiredColumns := []string{"ID", "Amount", "Date"} |