materialise

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorUpsertMapper = errors.New("upsert mapper")
View Source
var ErrorUpsertRepository = errors.New("upsert repository")

Functions

func NewSingleUpsert

func NewSingleUpsert[T any](configurations ...runtime.Configuration[*SingleUpsert[T]]) stateless.SingleFunction

constructor

func WithSingleUpsertMapFunction

func WithSingleUpsertMapFunction[T any](mapper MapFunction[message.Bytes, message.Bytes, T]) runtime.Configuration[*SingleUpsert[T]]

func WithSingleUpsertRepository

func WithSingleUpsertRepository[T any](repository UpsertRepository[T]) runtime.Configuration[*SingleUpsert[T]]

configuration

Types

type BatchUpsert

type BatchUpsert[T any] struct {
	// contains filtered or unexported fields
}

func (*BatchUpsert[T]) Apply

type MapFunction

type MapFunction[K any, V any, T any] func(context.Context, message.Message[K, V]) ([]T, error)

func ConvertOneToOne added in v0.0.7

func ConvertOneToOne[IK any, IV any, T any](
	source MapFunction[IK, IV, T],
	ik format.Format[IK],
	iv format.Format[IV],
) MapFunction[message.Bytes, message.Bytes, T]

type SingleUpsert

type SingleUpsert[T any] struct {
	// contains filtered or unexported fields
}

implementation

func (*SingleUpsert[T]) Apply

type UpsertRepository

type UpsertRepository[T any] interface {
	Upsert(context.Context, []T) error
}

Jump to

Keyboard shortcuts

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