encoding

package
v1.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UUIDTsColumn     = "uuid_ts"
	LoadedAtColumn   = "loaded_at"
	BQLoadedAtFormat = "2006-01-02 15:04:05.999999 Z"
	BQUuidTSFormat   = "2006-01-02 15:04:05 Z"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLoader

type EventLoader interface {
	IsLoadTimeColumn(columnName string) bool
	GetLoadTimeFormat(columnName string) string
	AddColumn(columnName, columnType string, val interface{})
	AddRow(columnNames, values []string)
	AddEmptyColumn(columnName string)
	WriteToString() (string, error)
	Write() error
}

EventLoader is an interface for loading events into a load file It's used to load singular BatchRouterEvent events into a load file

type EventReader

type EventReader interface {
	Read(columnNames []string) (record []string, err error)
}

EventReader is an interface for reading events from a load file

type Factory

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

func NewFactory

func NewFactory(conf *config.Config) *Factory

func (*Factory) NewEventLoader

func (m *Factory) NewEventLoader(w LoadFileWriter, loadFileType, destinationType string) EventLoader

func (*Factory) NewEventReader

func (m *Factory) NewEventReader(r io.Reader, destType string) EventReader

func (*Factory) NewLoadFileWriter

func (m *Factory) NewLoadFileWriter(loadFileType, outputFilePath string, schema model.TableSchema, destType string) (LoadFileWriter, error)

type LoadFileWriter

type LoadFileWriter interface {
	WriteGZ(s string) error
	Write(p []byte) (int, error)
	WriteRow(r []interface{}) error
	Close() error
	GetLoadFile() *os.File
}

LoadFileWriter is an interface for writing events to a load file

Jump to

Keyboard shortcuts

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