message

package
v2.0.0-beta.2 Latest Latest
Warning

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

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

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

type Compressor interface {
	Compress([]byte) ([]byte, error)
}

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 Decompressor interface {
	Decompress([]byte) ([]byte, error)
}

type Encryptor

type Encryptor interface {
	Encrypt([]byte) []byte
}

Encryptor encrypts bytes

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)
}

Jump to

Keyboard shortcuts

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