serializer

package
v1.0.0-beta.57 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudEventsKafkaPayload

type CloudEventsKafkaPayload struct {
	Id      string `json:"id"`
	Type    string `json:"type"`
	Source  string `json:"source"`
	Subject string `json:"subject"`
	// Note: By converting to unix timestamp we loose timezone information.
	Time int64  `json:"time"`
	Data string `json:"data"`
}

type JSONSerializer

type JSONSerializer struct{}

func NewJSONSerializer

func NewJSONSerializer() JSONSerializer

func (JSONSerializer) GetFormat

func (s JSONSerializer) GetFormat() string

func (JSONSerializer) GetKeySchemaId

func (s JSONSerializer) GetKeySchemaId() int

func (JSONSerializer) GetValueSchemaId

func (s JSONSerializer) GetValueSchemaId() int

func (JSONSerializer) SerializeKey

func (s JSONSerializer) SerializeKey(topic string, ev event.Event) ([]byte, error)

func (JSONSerializer) SerializeValue

func (s JSONSerializer) SerializeValue(topic string, ev event.Event) ([]byte, error)

type Serializer

type Serializer interface {
	SerializeKey(topic string, ev event.Event) ([]byte, error)
	SerializeValue(topic string, ev event.Event) ([]byte, error)
	GetFormat() string
	GetKeySchemaId() int
	GetValueSchemaId() int
}

Jump to

Keyboard shortcuts

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