kedavro

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 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

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

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

func WithDateTimeFormat(format string) ParserOption

func WithNowForNullTimestamp

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