Documentation ¶
Index ¶
Constants ¶
View Source
const ( FormatBinary = "binary" FormatJson = "json" FormatProtobuf = "protobuf" FormatDelimited = "delimited" FormatCustom = "custom" DefaultField = "self" MetaKey = "__meta" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnSetter ¶
type ColumnSetter interface {
SetColumns([]string)
}
type Compressor ¶
Compressor compresses and decompresses bytes
type Converter ¶
type Converter interface { Encode(ctx api.StreamContext, d any) ([]byte, error) Decode(ctx api.StreamContext, b []byte) (any, error) }
Converter converts bytes & map or []map according to the schema
type Decompressor ¶
type MockMerger ¶
type MockMerger struct {
// contains filtered or unexported fields
}
func (*MockMerger) Merging ¶
func (m *MockMerger) Merging(ctx api.StreamContext, b []byte) error
func (*MockMerger) ResetSchema ¶
func (m *MockMerger) ResetSchema(schema map[string]*ast.JsonStreamField)
func (*MockMerger) Trigger ¶
func (m *MockMerger) Trigger(ctx api.StreamContext) ([]any, bool)
type MockPartialConverter ¶
type MockPartialConverter struct {
// contains filtered or unexported fields
}
func (*MockPartialConverter) Decode ¶
func (m *MockPartialConverter) Decode(ctx api.StreamContext, b []byte) (any, error)
func (*MockPartialConverter) DecodeField ¶
func (m *MockPartialConverter) DecodeField(ctx api.StreamContext, b []byte, f string) (any, error)
func (*MockPartialConverter) Encode ¶
func (m *MockPartialConverter) Encode(ctx api.StreamContext, d any) ([]byte, error)
type PartialDecoder ¶
type PartialDecoder interface {
DecodeField(ctx api.StreamContext, b []byte, f string) (any, error)
}
PartialDecoder decodes a field partially
type SchemaProvider ¶
type SchemaProvider interface {
GetSchemaJson() string
}
type SchemaResetAbleConverter ¶
type SchemaResetAbleConverter interface {
ResetSchema(schema map[string]*ast.JsonStreamField)
}
Click to show internal directories.
Click to hide internal directories.