entities

package
v0.3.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	PrimaryKeys   PkFields
	Type          string
	OperationType Operation

	OriginalRaw []byte
	// contains filtered or unexported fields
}

func (*Event) Clone

func (e *Event) Clone() PipelineEvent

func (Event) Data

func (e Event) Data() []byte

func (Event) GetPrimaryKeys added in v0.2.0

func (e Event) GetPrimaryKeys() PkFields

func (Event) GetType

func (e Event) GetType() string

func (Event) JSON

func (e Event) JSON() (map[string]any, error)

func (Event) Operation

func (e Event) Operation() Operation

func (*Event) WithData

func (e *Event) WithData(raw []byte)

type Operation

type Operation int
const (
	Write Operation = iota
	Delete
)

type PipelineEvent

type PipelineEvent interface {
	GetPrimaryKeys() PkFields
	GetType() string

	Data() []byte
	Operation() Operation
	WithData([]byte)
	JSON() (map[string]any, error)
	Clone() PipelineEvent
}

type PkField added in v0.2.0

type PkField struct {
	Key   string
	Value string
}

type PkFields added in v0.2.0

type PkFields []PkField

func (PkFields) IsEmpty added in v0.2.0

func (fields PkFields) IsEmpty() bool

func (PkFields) Map added in v0.2.0

func (fields PkFields) Map() map[string]string

Jump to

Keyboard shortcuts

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