Documentation
¶
Index ¶
- Variables
- func Add(x string, y string) (string, error)
- func Age(dob string) (string, error)
- func Author() string
- func Change(from string, to string, input string) (string, error)
- func ChangeI(from string, to string, input string) (string, error)
- func Divide(x string, y string) (string, error)
- func FirstChars(count string, input string) (string, error)
- func FormatDate(format string, normalDate string) (string, error)
- func FormatDateF(format string, normalDate string) (string, error)
- func IfEmpty(emptyVal string, notEmptyVal string, input string) (string, error)
- func IsFuture(future string, past string, date string) (string, error)
- func IsPast(past string, future string, date string) (string, error)
- func LastChars(count string, input string) (string, error)
- func Lowercase(s string) string
- func MassProcess(incoming []string, processor Processor) (out []string)
- func Modulus(x string, y string) (string, error)
- func Multiply(x string, y string) (string, error)
- func NoDigits(s string) string
- func NowTime(now func() time.Time) (string, error)
- func NumberFormat(digits string, input string) (string, error)
- func OnlyDigits(input string) (string, error)
- func Power(number string, power string) (string, error)
- func ReadDate(format string, input string) (string, error)
- func ReadDateF(format string, input string) (string, error)
- func RemoveDigits(input string) (string, error)
- func Repeat(count string, input string) (string, error)
- func ReplaceString(search string, replace string, input string) (string, error)
- func SmartDate(date string) (string, error)
- func Subtract(x string, y string) (string, error)
- func Today(now func() time.Time) (string, error)
- func Trim(input string) (string, error)
- func Uppercase(s string) string
- func Version() string
- type Argument
- type DataType
- type JoinMode
- type LineContext
- type Operation
- type Output
- type Parser
- type Processor
- type Recipe
- type Scanner
- type Token
- type Transformation
- func (t *Transformation) AddOperationByType(targetType DataType, target string, operation Operation)
- func (t *Transformation) AddOperationToColumn(column string, operation Operation)
- func (t *Transformation) AddOperationToHeader(header string, operation Operation)
- func (t *Transformation) AddOperationToVariable(variable string, operation Operation)
- func (t *Transformation) AddOutputToColumn(column string) error
- func (t *Transformation) AddOutputToHeader(header string) error
- func (t *Transformation) AddOutputToVariable(variable string) error
- func (t *Transformation) Dump(w io.Writer)
- func (t *Transformation) Execute(reader *csv.Reader, writer *csv.Writer, processHeader bool, lineLimit int, ...) (*TransformationResult, error)
- func (t *Transformation) ValidateRecipe() error
- type TransformationResult
Constants ¶
This section is empty.
Variables ¶
View Source
var Now = time.Now
Functions ¶
func MassProcess ¶
func OnlyDigits ¶
func RemoveDigits ¶
func ReplaceString ¶
Types ¶
type LineContext ¶
type Token ¶
type Token int
const ( ILLEGAL Token = iota EOF //1 - end of file WS //2 - space, tab, newline NEWLINE //3 - \n (probably not needed) COLUMN_ID //4 - digits ASSIGNMENT //5 - <- PIPE //6 - -> COMMENT //7 - # ... PLACEHOLDER //8 - ? PLUS //9 - + LITERAL //10 - "quoted" VARIABLE //11 - starts w/ $ FUNCTION //12 - letters OPEN_PAREN //13 - ( CLOSE_PAREN //14 - ) COMMA //15 - , HEADER //16 - !<digits> )
type Transformation ¶
type Transformation struct { Variables map[string]Recipe Columns map[int]Recipe Headers map[int]Recipe VariableOrder []string }
func NewTransformation ¶
func NewTransformation() *Transformation
func (*Transformation) AddOperationByType ¶
func (t *Transformation) AddOperationByType(targetType DataType, target string, operation Operation)
func (*Transformation) AddOperationToColumn ¶
func (t *Transformation) AddOperationToColumn(column string, operation Operation)
func (*Transformation) AddOperationToHeader ¶
func (t *Transformation) AddOperationToHeader(header string, operation Operation)
func (*Transformation) AddOperationToVariable ¶
func (t *Transformation) AddOperationToVariable(variable string, operation Operation)
func (*Transformation) AddOutputToColumn ¶
func (t *Transformation) AddOutputToColumn(column string) error
func (*Transformation) AddOutputToHeader ¶
func (t *Transformation) AddOutputToHeader(header string) error
func (*Transformation) AddOutputToVariable ¶
func (t *Transformation) AddOutputToVariable(variable string) error
func (*Transformation) Dump ¶
func (t *Transformation) Dump(w io.Writer)
func (*Transformation) Execute ¶
func (t *Transformation) Execute(reader *csv.Reader, writer *csv.Writer, processHeader bool, lineLimit int, parseErrIsErr bool) (*TransformationResult, error)
func (*Transformation) ValidateRecipe ¶
func (t *Transformation) ValidateRecipe() error
type TransformationResult ¶
Click to show internal directories.
Click to hide internal directories.