Documentation
¶
Index ¶
- func InitLog(c *Configuration)
- func Mkdir(dir string)
- func MkdirAll(dir string)
- type Configuration
- type Line
- func (l *Line) GenLineFromColumns() (err error)
- func (l *Line) GetBatch() string
- func (l *Line) GetInPath() (fullPath string, err error)
- func (l *Line) GetOutPath() (out string, err error)
- func (l *Line) GetPathFromID() (p string, e error)
- func (l *Line) OutLineFile()
- func (l *Line) ProcessLine() (b bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { //////////////////// //Config variables from config file //////////////////// //In InFlatFile string InDir string InFileExt string //Out OutDir string OutLog string //Lines OutLinesName string OutLinesErrorName string OutLinesColumns string OutLinesRowOffset int64 OutLinesDuplicateName string //Files OutFileExt string OutFileRenameInt bool OutFileRenameIntOffset int64 OutXtenderStructure bool OutZipped bool OutZippedDeleteSource bool //AutoBatch OutAutoBatch bool OutAutoBatchCount int64 OutAutoBatchName string OutAutoBatchZeroPad int //Missing Missing bool MissingIn string MissingCount int64 //Global //Applies to both in and out DirDepth int FolderSize int Delimiter string ComputeChecksum bool //Columns ColObjectID int ColFileName int ColFileExtIn int ColFileExtOut int // contains filtered or unexported fields }
Configuration stores settings from config.json And internally calculated configs See README for description of each variable.
func (*Configuration) Parse ¶
func (c *Configuration) Parse(configFile string)
Parse parses config file into memory
func (*Configuration) Process ¶
func (c *Configuration) Process()
Process Creates output files and directories and calls processIndex
type Line ¶
type Line struct { *Configuration Line string //String of the entire line Columns []string //Parsed columns ID int64 //Calculated uniqueobject ID. Used for path calculation. LastID int64 //Remeber last object ID processed. Prevents duplicates. Dir string //Directory of object file Path string //Full path of object calc. from objectID File *os.File //File to write the line out to // contains filtered or unexported fields }
Line represents line contents and settings.
func (*Line) GenLineFromColumns ¶
GenLineFromColumns Instead of copying the line from flat in, grab only some columns and write those to out.
func (*Line) GetOutPath ¶
GetOutPath Get full path for out file
func (*Line) GetPathFromID ¶
GetPathFromID Calculate the ApplicationXtender from a given object id, s See README for examples and further explaination.
func (*Line) OutLineFile ¶
func (l *Line) OutLineFile()
OutLineFile Create the "OutLines" file. Should call defer os.Close
func (*Line) ProcessLine ¶
ProcessLine copies file to output. Returns false in the event of error or empty