kedavro

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 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 Field added in v0.3.1

type Field struct {
	HasDefault   bool
	Opts         types.Options
	Name         string
	LogicalType  string
	Type         types.FieldType
	TypeValue    interface{}
	DefaultValue interface{}
	Fields       []*Field
	ParseField   parseFieldFunction
}

func ParseSchemaField added in v0.3.1

func ParseSchemaField(f interface{}, opts types.Options) (*Field, error)

type Parser

type Parser interface {
	Parse(record []byte) (interface{}, error)
	ParseMap(record map[string]interface{}) (interface{}, error)
}

func NewParser

func NewParser(schemaString string, opts ...ParserOption) (Parser, error)

type ParserOption

type ParserOption func(*types.Options)

ParserOption reconfigure the parser creation.

func WithDateTimeFormat added in v0.3.0

func WithDateTimeFormat(format string) ParserOption

func WithNowForNullTimestamp added in v0.4.0

func WithNowForNullTimestamp() ParserOption

func WithStringToBool

func WithStringToBool() ParserOption

func WithStringToNumber

func WithStringToNumber() ParserOption

func WithTimestampToMicros

func WithTimestampToMicros() ParserOption

func WithTimestampToMillis

func WithTimestampToMillis() ParserOption

Jump to

Keyboard shortcuts

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