specs

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapField

func MapField(product, resource, field string, value any) (any, bool)

func NormalizeBindingItem

func NormalizeBindingItem(product, resource, name string, value map[string]any, index int) (map[string]any, bool, error)

func RegisterAfterOperationError

func RegisterAfterOperationError(product, resource, name string, hook AfterOperationError)

func RegisterBeforeOperation

func RegisterBeforeOperation(product, resource, name string, hook BeforeOperation)

func RegisterBindingItemNormalizer

func RegisterBindingItemNormalizer(product, resource, name string, normalizer BindingItemNormalizer)

func RegisterFieldMapper

func RegisterFieldMapper(product, resource, field string, mapper FieldMapper)

Types

type AfterOperationError

type AfterOperationError func(ctx context.Context, caller OperationCaller, request map[string]any, err error) error

func AfterOperationErrorHook

func AfterOperationErrorHook(product, resource, name string) (AfterOperationError, bool)

type BeforeOperation

type BeforeOperation func(ctx context.Context, caller OperationCaller, request map[string]any) (map[string]any, error)

func BeforeOperationHook

func BeforeOperationHook(product, resource, name string) (BeforeOperation, bool)

type BindingItemNormalizer

type BindingItemNormalizer func(value map[string]any, index int) (map[string]any, error)

type FieldMapper

type FieldMapper func(value any) any

type OperationCaller

type OperationCaller interface {
	CallRaw(ctx context.Context, operation string, request map[string]any) (map[string]any, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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