proto_lineprotocol

package
v0.0.0-...-ccaa6ab Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marhsal

func Marhsal(in []byte, tags map[string]string, fn ProtoBytesToLpFn) string

Types

type ProtoBytesToLpFn

type ProtoBytesToLpFn = func(in []byte, tags map[string]string) string

func GenerateMarshalFn

func GenerateMarshalFn(pinnedTags map[string]string, desc protoreflect.MessageDescriptor) (ProtoBytesToLpFn, error)

Marshal from proto encoding to influx line protocol MessageDescriptor represent the proto descripor We create a proto.Message from it and the add the data to it from the in byte using the unmarshall Now with both data and descriptor, we can walk the fields

TODO - [x] enum kind - [x] primitives fields - [x] return error and error join - [x] repeated, cardinality is repeated and IsList is true - [x] nested message - [x] repeated message - [x] map field - [x] optional field - [x] imports - [x] enum list - [x] fix number array mistmatch - [x] more unit test - [ ] one of field - [ ] enum options

type WriteArrayValueToLpFn

type WriteArrayValueToLpFn = func(value protoreflect.Value, args []any) string

type WriteValueToLpFn

type WriteValueToLpFn = func(value protoreflect.Value, mr protoreflect.Message, args []any) string

Directories

Path Synopsis
tests
gen

Jump to

Keyboard shortcuts

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