uuid2int

package module
v0.0.0-...-91bd832 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

go-avro-uuid2int

UUID field values in AVRO records -> (32-bit) Serial values in AVRO records

Documentation

Index

Constants

View Source
const BlobSizeMaxDefault int = 1048576
View Source
const BlockLengthDefault int = 100

Variables

View Source
var (
	ErrUuidMissing error = errors.New("uuid missing")
	ErrInvalidUuid error = errors.New("invalid uuid")

	ErrUnexpectedUuid error = errors.New("unexpected uuid")
)

Functions

func AnyToUuid

func AnyToUuid(
	i any,
) (gu.UUID, error)

func MapToUuid

func MapToUuid(
	m map[string]any,
	uuidColumnName string,
) (gu.UUID, error)

Types

type Codec

type Codec string
const (
	CodecNull    Codec = "null"
	CodecDeflate Codec = "deflate"
	CodecSnappy  Codec = "snappy"
	CodecZstd    Codec = "zstandard"
	CodecBzip2   Codec = "bzip2"
	CodecXz      Codec = "xz"
)

type DecodeConfig

type DecodeConfig struct {
	BlobSizeMax int
}
var DecodeConfigDefault DecodeConfig = DecodeConfig{
	BlobSizeMax: BlobSizeMaxDefault,
}

type EncodeConfig

type EncodeConfig struct {
	BlockLength int
	Codec
}
var EncodeConfigDefault EncodeConfig = EncodeConfig{
	BlockLength: BlockLengthDefault,
	Codec:       CodecNull,
}

type UuidMapInt

type UuidMapInt map[gu.UUID]int32

func (UuidMapInt) ColumnNameToMapd

func (m UuidMapInt) ColumnNameToMapd(
	colname string,
) func(iter.Seq2[map[string]any, error]) iter.Seq2[map[string]any, error]

func (UuidMapInt) MapsToMaps

func (m UuidMapInt) MapsToMaps(
	original iter.Seq2[map[string]any, error],
	uuidColumnName string,
) iter.Seq2[map[string]any, error]

Directories

Path Synopsis
avro
cmd
uuid2int

Jump to

Keyboard shortcuts

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