updateout

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(ctx context.Context, cfg Config, event Event) error

Types

type Config

type Config struct {
	Enabled              bool              `json:"enabled" yaml:"enabled" toml:"enabled"`
	URL                  string            `json:"url,omitempty" yaml:"url,omitempty" toml:"url,omitempty"`
	Method               string            `json:"method,omitempty" yaml:"method,omitempty" toml:"method,omitempty"`
	Format               string            `json:"format,omitempty" yaml:"format,omitempty" toml:"format,omitempty"`
	Mode                 string            `json:"mode,omitempty" yaml:"mode,omitempty" toml:"mode,omitempty"`
	Initial              bool              `json:"initial" yaml:"initial" toml:"initial"`
	AllowRaw             bool              `json:"allow_raw,omitempty" yaml:"allow_raw,omitempty" toml:"allow_raw,omitempty"`
	RequireContract      bool              `json:"require_contract,omitempty" yaml:"require_contract,omitempty" toml:"require_contract,omitempty"`
	Timeout              string            `json:"timeout,omitempty" yaml:"timeout,omitempty" toml:"timeout,omitempty"`
	RetryAttempts        int               `json:"retry_attempts,omitempty" yaml:"retry_attempts,omitempty" toml:"retry_attempts,omitempty"`
	RetryBackoff         string            `json:"retry_backoff,omitempty" yaml:"retry_backoff,omitempty" toml:"retry_backoff,omitempty"`
	ProductSyncSecretEnv string            `json:"product_sync_secret_env,omitempty" yaml:"product_sync_secret_env,omitempty" toml:"product_sync_secret_env,omitempty"`
	Headers              map[string]string `json:"headers,omitempty" yaml:"headers,omitempty" toml:"headers,omitempty"`
	Command              []string          `json:"command,omitempty" yaml:"command,omitempty" toml:"command,omitempty"`
}

func Normalize

func Normalize(cfg Config) Config

type DeliveryError

type DeliveryError struct {
	Endpoint         string
	HTTPStatus       int
	Status           string
	Attempts         int
	PendingProducts  int
	DeferredProducts int
	Retryable        bool
	Reason           string
}

DeliveryError is safe to print. Endpoint query strings, response bodies, request headers, and transport error strings are deliberately excluded.

func (*DeliveryError) Error

func (e *DeliveryError) Error() string

type DeliveryResult

type DeliveryResult struct {
	HTTPStatus       int
	Status           string
	EventID          string
	Retryable        bool
	PendingProducts  int
	DeferredProducts int
	Attempts         int
}

DeliveryResult exposes the receiver's durable-apply state without retaining its response body or any credential material. Generic webhooks leave Status and EventID empty.

func DispatchWithResult

func DispatchWithResult(ctx context.Context, cfg Config, event Event) (DeliveryResult, error)

DispatchWithResult sends through the shared HTTP/command update path and returns Digitalogic receiver state when the destination supplies it.

func (DeliveryResult) DiagnosticSummary

func (result DeliveryResult) DiagnosticSummary() string

DiagnosticSummary returns only sanitized receiver state. It deliberately has no access to response bodies, product identities, endpoint query strings, request headers, or credentials.

type Event

type Event struct {
	Type             string                   `json:"type"`
	Timestamp        string                   `json:"timestamp"`
	Source           string                   `json:"source,omitempty"`
	Raw              bool                     `json:"raw,omitempty"`
	Records          []map[string]interface{} `json:"records,omitempty"`
	Changes          *recorddiff.ChangeSet    `json:"changes,omitempty"`
	KeyField         string                   `json:"key_field,omitempty"`
	Contract         *canonical.Envelope      `json:"contract,omitempty"`
	SnapshotContract *canonical.Envelope      `json:"snapshot_contract,omitempty"`
}

Jump to

Keyboard shortcuts

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