encoder

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVItem

type CSVItem struct {
	// contains filtered or unexported fields
}

func (*CSVItem) GetPropertyNames

func (item *CSVItem) GetPropertyNames() []string

func (*CSVItem) GetValue

func (item *CSVItem) GetValue(key string) any

func (*CSVItem) NativeItem

func (item *CSVItem) NativeItem() any

func (*CSVItem) SetValue

func (item *CSVItem) SetValue(key string, value any)

type CSVItemFactory

type CSVItemFactory struct{}

func (*CSVItemFactory) NewItem

func (c *CSVItemFactory) NewItem() common_datalayer.Item

type CSVItemIterator

type CSVItemIterator struct {
	// contains filtered or unexported fields
}

func NewCSVItemIterator

func NewCSVItemIterator(sourceConfig map[string]any, data io.ReadCloser) (*CSVItemIterator, error)

func (*CSVItemIterator) Close

func (c *CSVItemIterator) Close() error

func (*CSVItemIterator) Read

type CSVItemWriter

type CSVItemWriter struct {
	// contains filtered or unexported fields
}

TODO: fix me differentiate between ENCODER and ENCODING with better naming

func NewCSVItemWriter

func NewCSVItemWriter(sourceConfig map[string]any, data io.WriteCloser, batchInfo *common_datalayer.BatchInfo) (*CSVItemWriter, error)

func (*CSVItemWriter) Close

func (c *CSVItemWriter) Close() error

func (*CSVItemWriter) Write

func (c *CSVItemWriter) Write(item common_datalayer.Item) error

type ItemFactory

type ItemFactory interface {
	NewItem() common_datalayer.Item
}

func NewCSVItemFactory

func NewCSVItemFactory() ItemFactory

func NewItemFactory

func NewItemFactory(sourceConfig map[string]any) (ItemFactory, error)

func NewJsonItemFactory

func NewJsonItemFactory() ItemFactory

type ItemIterator

type ItemIterator interface {
	Read() (common_datalayer.Item, error)
	Close() error
}

func NewItemIterator

func NewItemIterator(sourceConfig map[string]any, data io.ReadCloser) (ItemIterator, error)

type ItemWriter

type ItemWriter interface {
	Write(item common_datalayer.Item) error
	Close() error
}

func NewItemWriter

func NewItemWriter(sourceConfig map[string]any, data io.WriteCloser, batchInfo *common_datalayer.BatchInfo) (ItemWriter, error)

type JsonItem

type JsonItem struct {
	// contains filtered or unexported fields
}

func (*JsonItem) GetPropertyNames

func (item *JsonItem) GetPropertyNames() []string

func (*JsonItem) GetValue

func (item *JsonItem) GetValue(key string) any

func (*JsonItem) NativeItem

func (item *JsonItem) NativeItem() any

func (*JsonItem) SetValue

func (item *JsonItem) SetValue(key string, value any)

type JsonItemFactory

type JsonItemFactory struct{}

func (*JsonItemFactory) NewItem

func (j *JsonItemFactory) NewItem() common_datalayer.Item

type JsonItemIterator

type JsonItemIterator struct {
	// contains filtered or unexported fields
}

func NewJsonItemIterator

func NewJsonItemIterator(sourceConfig map[string]any, data io.ReadCloser) (*JsonItemIterator, error)

func (*JsonItemIterator) Close

func (j *JsonItemIterator) Close() error

func (*JsonItemIterator) Read

type JsonItemWriter

type JsonItemWriter struct {
	// contains filtered or unexported fields
}

func NewJsonItemWriter

func NewJsonItemWriter(sourceConfig map[string]any, data io.WriteCloser, batchInfo *common_datalayer.BatchInfo) (*JsonItemWriter, error)

func (*JsonItemWriter) Close

func (j *JsonItemWriter) Close() error

func (*JsonItemWriter) Write

func (j *JsonItemWriter) Write(item common_datalayer.Item) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL