1package transforming 2 3import ( 4 "os" 5 6 "miller/src/cliutil" 7 "miller/src/types" 8) 9 10type IRecordTransformer interface { 11 Transform( 12 inrecAndContext *types.RecordAndContext, 13 outputChannel chan<- *types.RecordAndContext, 14 ) 15} 16 17type RecordTransformerFunc func( 18 inrecAndContext *types.RecordAndContext, 19 outputChannel chan<- *types.RecordAndContext, 20) 21 22type TransformerUsageFunc func( 23 ostream *os.File, 24 doExit bool, 25 exitCode int, 26) 27 28type TransformerParseCLIFunc func( 29 pargi *int, 30 argc int, 31 args []string, 32 readerOptions *cliutil.TReaderOptions, 33 writerOptions *cliutil.TWriterOptions, 34) IRecordTransformer 35 36type TransformerSetup struct { 37 Verb string 38 UsageFunc TransformerUsageFunc 39 ParseCLIFunc TransformerParseCLIFunc 40 IgnoresInput bool 41} 42