In some cases we'll want to save the data from the stream directly with no transformation needed. This will allow us to return the raw data string from the stream * Add new StringToStringTransformer * Remove Record from codebase in favor of more generic interface
8 lines
223 B
Go
8 lines
223 B
Go
package connector
|
|
|
|
// Transformer is used to transform data (byte array) to a Record for
|
|
// processing in the application.
|
|
type Transformer interface {
|
|
ToRecord(data []byte) interface{}
|
|
FromRecord(r interface{}) []byte
|
|
}
|