time

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package time contains avro decoders for time.Time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCodecs

func RegisterCodecs()

RegisterCodecs makes the codecs in this package available to avro

Types

type DateCodec added in v0.0.17

type DateCodec struct{ avro.Int32Codec }

DateCodec is a decoder from an AVRO date logical type, which is a number of days since 1 Jan 1970

func (DateCodec) New added in v0.0.17

func (c DateCodec) New(r *avro.Buffer) unsafe.Pointer

New create a pointer to a new time.Time

func (DateCodec) Read added in v0.0.17

func (c DateCodec) Read(r *avro.Buffer, p unsafe.Pointer) error

type LongCodec added in v0.0.7

type LongCodec struct {
	avro.Int64Codec
	// contains filtered or unexported fields
}

LongCodec is a decoder from an AVRO long where the time is encoded as nanoseconds since the UNIX epoch

func (LongCodec) New added in v0.0.7

func (c LongCodec) New(r *avro.Buffer) unsafe.Pointer

New create a pointer to a new time.Time

func (LongCodec) Read added in v0.0.7

func (c LongCodec) Read(r *avro.Buffer, p unsafe.Pointer) error

type StringCodec

type StringCodec struct{ avro.StringCodec }

StringCodec is a decoder from an AVRO string with RFC3339 encoding to a time.Time

func (StringCodec) New

func (c StringCodec) New(r *avro.Buffer) unsafe.Pointer

New create a pointer to a new time.Time

func (StringCodec) Read

func (c StringCodec) Read(r *avro.Buffer, p unsafe.Pointer) error

Jump to

Keyboard shortcuts

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