Documentation ¶
Index ¶
Constants ¶
View Source
const ColumnNameSeparatorSymbolDot = "."
Column Name Separator Symbols allowed.
View Source
const ColumnNameSeparatorSymbolHyphen = "-"
View Source
const ColumnNameSeparatorSymbolSpace = " "
View Source
const ColumnNameSeparatorSymbolUnderline = "_"
View Source
const EmptyString = ""
View Source
const ErrConfigurationIsNotFinished = "Processor is not configured"
View Source
const ErrFormatFieldTypeUnsupported = "Field '%v' has unsupported Type"
Error Messages' Formats.
View Source
const ErrFormatIndexOfItem = "Item '%v' is not found."
View Source
const ErrIndex = "Index is out of Bounds"
Error Messages.
View Source
const IndexOfIndexOnFailure = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmptyInterface ¶
type EmptyInterface interface{}
type Processor ¶
type Processor struct { // The original List of Field Names of a reference Object. FieldNames Names // The modified Version of a previous Parameter, // modified for the fast Access ('FFA' means: For Fast Access). FieldNamesFFA Names // The original List of Column Names of a text (CSV) File. ColumnNames Names // The modified Version of a previous Parameter, // modified for the fast Access ('FFA' means: For Fast Access). ColumnNamesFFA Names // The "routing" Table. An Array of Indices. // The Key in this Array is of 'int' Type and represents an Index of // Column of the text (CSV) File. Index is Zero-based. // The Value (Item) in this Array is also of 'int' Type and represents an // Index of reference Object's Field. Index is Zero-based. CSVColIdxToFieldIdx RoutingTable // Array of Symbols used as Separators for Column Names and Field Names. // These Separators are removed from Names when these Names are modified // for fast Access. NameSeparatorSymbols Names // This Flag show whether the Processor has already been successfully // configured or not. IsConfigured bool }
func (*Processor) Configure ¶
func (p *Processor) Configure( referenceObject EmptyInterface, csvColumnNames Names, ) error
Configures the Processor. This Method must be run after the Processor Creation but before any Data Processing. Prepares:
- Name Separator Symbols,
- A modified Version of text File Column Names List,
- A modified Version of reference Object Field Names List,
- A "routing" Table.
type RoutingTable ¶
type RoutingTable []int
Click to show internal directories.
Click to hide internal directories.