crudservice

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPrimaryKey = "_eventId"

Variables

View Source
var (
	ErrURLNotSet  = errors.New("URL not set in CRUD service sink configuration")
	ErrInvalidURL = errors.New("invalid URL in CRUD service sink configuration")
)
View Source
var (
	ErrUnsupportedOperation = errors.New("unsupported operation")
)

Functions

func NewWriter

func NewWriter[T entities.PipelineEvent](config *Config) (sinks.Sink[T], error)

Types

type Config

type Config struct {
	URL        string `json:"url"`
	InsertOnly bool   `json:"insertOnly,omitempty"`
	PrimaryKey string `json:"primaryKeyFieldName,omitempty"` //nolint: tagliatelle
}

func (*Config) Validate

func (c *Config) Validate() error

type Writer

type Writer[T entities.PipelineEvent] struct {
	// contains filtered or unexported fields
}

func (*Writer[T]) WriteData

func (w *Writer[T]) WriteData(ctx context.Context, data T) error

Jump to

Keyboard shortcuts

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