Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, t Transformer)
Types ¶
type CBORTransformer ¶
type CBORTransformer struct{}
func (*CBORTransformer) Footer ¶
func (c *CBORTransformer) Footer(ctx *etl_core.Context) ([]byte, error)
type CSVTransformer ¶
type CSVTransformer struct{}
func (*CSVTransformer) Footer ¶
func (c *CSVTransformer) Footer(ctx *etl_core.Context) ([]byte, error)
type JSONLTransformer ¶
type JSONLTransformer struct{}
func (*JSONLTransformer) Footer ¶
func (c *JSONLTransformer) Footer(ctx *etl_core.Context) ([]byte, error)
type PassthroughTransformer ¶
type PassthroughTransformer struct{}
func (*PassthroughTransformer) Footer ¶
func (c *PassthroughTransformer) Footer(ctx *etl_core.Context) ([]byte, error)
type Transformer ¶
type Transformer interface {
Transform(ctx *etl_core.Context, data map[string]interface{}) ([]byte, error)
// Header returns any leading bytes (e.g., header row, opening bracket, etc).
// Should return nil/empty if not needed.
Header(ctx *etl_core.Context) ([]byte, error)
// Should return nil/empty if not needed.
Footer(ctx *etl_core.Context) ([]byte, error)
}
func ForName ¶
func ForName(name string) (Transformer, error)
Click to show internal directories.
Click to hide internal directories.