Versions in this module Expand all Collapse all v1 v1.0.0 Sep 22, 2026 Changes in this version + const DataSyncKey + func HookApplied(ctx context.Context) bool + func InvokeWithSession(ctx context.Context, sess Session, input any, ...) (any, error) + func IsCacheWarmup(ctx context.Context) bool + func RunPreInvokeHook(ctx context.Context, input any, hook func(context.Context, any) error) error + func WithCacheWarmup(ctx context.Context, phase WarmupPhase) context.Context + func WithHookApplied(ctx context.Context) context.Context + func WithReadMetadata(ctx context.Context, value ReadMetadata) context.Context + func WithSession(ctx context.Context, sess Session) context.Context + type AfterQueueHook interface + AfterQueue func(context.Context, *T, LifecycleContext[T, P, O]) error + type AfterSequenceHook interface + AfterSequence func(context.Context, *T, LifecycleContext[T, P, O]) error + type Binder interface + Bind func(ctx context.Context, target any) error + Lookup func(ctx context.Context, key ValueKey) (any, bool, error) + type Capabilities struct + Connector connector.Provider + Differ differ.Differ + Logger Logger + MessageBus MessageBus + Validator Validator + type Conflict struct + Entity string + Field string + Reason string + func (e *Conflict) Error() string + func (e *Conflict) StatusCode() int + type Contract interface + Exec func(ctx context.Context, sess Session, input *I, output *O) error + type ContractFunc func(ctx context.Context, sess Session, input *I, output *O) error + func (f ContractFunc[I, O]) Exec(ctx context.Context, sess Session, input *I, output *O) error + type DML interface + Delete func(table string, value any) error + Execute func(statement string, args ...any) error + Insert func(table string, value any) error + Update func(table string, value any) error + type Data interface + type DataSync struct + func NewDataSync() *DataSync + func (d *DataSync) Delete(key string) + func (d *DataSync) Get(key string) *sync.RWMutex + func (d *DataSync) Put(key string) + func (d *DataSync) Wait(key string) bool + type EntityHooks interface + Init func(context.Context, *T, LifecycleContext[T, P, O]) error + Validate func(context.Context, *T, LifecycleContext[T, P, O]) error + type EntitySnapshot interface + SyncPresence func(current *T) error + type EntityState struct + Original OriginalPresence + Parent *P + Previous *T + PreviousFields FieldSet + SelfParent *T + type ErrorFinalizer interface + Finalize func(ctx context.Context, err error) error + type FieldSet interface + Has func(field string) bool + type Finalizer interface + Finalize func(ctx context.Context) error + type Flusher interface + Flush func(ctx context.Context, table string) error + type Func func(ctx context.Context, input *I) (*O, error) + type Initializer interface + Init func(ctx context.Context) error + type InjectorFinalizer interface + Finalize func(context.Context, InjectorLookup) error + type InjectorLookup = func(context.Context, Route) (Binder, error) + type InputCapturer interface + CaptureInput func(context.Context, *I) (any, error) + type InvocationInfo struct + func InvocationFromContext(ctx context.Context) *InvocationInfo + func (i *InvocationInfo) IsCacheWarmup() bool + func (i *InvocationInfo) MayBypassRowAuthorization() bool + func (i *InvocationInfo) Purpose() InvocationPurpose + func (i *InvocationInfo) WarmupPhase() WarmupPhase + type InvocationPurpose uint8 + const InvocationPurposeCacheWarmup + const InvocationPurposeRequest + type LifecycleContext struct + Output *O + type Logger = xlogger.Logger + type MessageBus = xmbus.Service + type NoParent struct + type OnFetcher interface + OnFetch func(ctx context.Context) error + type OnRelationer interface + OnRelation func(ctx context.Context) + type OriginalPresence interface + Available func() bool + type Outcome struct + Error error + Transactions []TransactionOutcome + func (o Outcome) Clone() Outcome + func (o Outcome) CommitConfirmed() bool + func (o Outcome) State() TransactionState + type ReadMetadata interface + Projection func(inputField string) (ReadProjection, error) + func ReadMetadataFromContext(ctx context.Context) (ReadMetadata, bool) + type ReadMetadataConsumer interface + RequiresReadMetadata func() bool + type ReadOutputProjection interface + Output func(holder string) (ReadProjection, error) + type ReadProjection interface + DirectOutput func() bool + Fields func(rootOrdinal int, relations ...ReadStep) (FieldSet, error) + RootHolder func() string + type ReadStep struct + Holder string + Index int + type Route struct + Method string + Name string + Scope string + URL string + type Sequencer interface + Allocate func(ctx context.Context, table string, dest any, selector string) error + type Session interface + Binder func() Binder + Response func() response.Writer + func SessionFromContext(ctx context.Context) (Session, bool) + type TransactionOutcome struct + Error error + State TransactionState + Unit int + type TransactionStarter interface + Start func(context.Context) error + type TransactionState string + const TransactionCallerPending + const TransactionCommitUnknown + const TransactionCommitted + const TransactionMixed + const TransactionNone + const TransactionPartial + const TransactionRollbackUnknown + const TransactionRolledBack + const TransactionUnknown + type Validation struct + Code int + Failed bool + Violations []*Violation + func (v *Validation) Err() error + func (v *Validation) Error() string + func (v *Validation) Messages() []string + func (v *Validation) ResponseBody() any + func (v *Validation) StatusCode() int + type ValidationOptions struct + Action WriteAction + Connector string + DeferredFields FieldSet + Fields FieldSet + Location string + Previous any + PreviousFields FieldSet + SatisfiedReferences []ValidationReference + Shallow bool + type ValidationReference struct + Column string + Field string + Schema string + Table string + type Validator interface + Validate func(ctx context.Context, value any, opts ...any) (*Validation, error) + type ValueKey string + const CallerOutputKey + const ConnectorKey + const DMLKey + const DataKey + const DifferKey + const FlusherKey + const FrameworkValidatorKey + const InputKey + const InputSnapshotKey + const LoggerKey + const MessageBusKey + const ReadMetadataKey + const ResultKey + const SelectorsKey + const SequencerKey + const TransactionStarterKey + const ValidatorKey + type Violation struct + Check string + Field string + Location string + Message string + type WarmupPhase uint8 + const WarmupPhaseFill + const WarmupPhaseNone + const WarmupPhasePrepare + type WriteAction string + const WriteDelete + const WriteInsert + const WriteUpdate + type WriteHook interface + BeforeWrite func(context.Context, *T, EntityState[T, P], WriteAction) error + type WriteInitializer interface + InitWrite func(ctx context.Context) error + type WriteValidator interface + ValidateWrite func(ctx context.Context) error