Versions in this module Expand all Collapse all v0 v0.9.1 Nov 25, 2026 v0.9.0 Nov 22, 2026 Changes in this version + const MaxConditionDepth + const MaxTaskErrorBytes + var ErrAggregationNotPushdownable = errors.New("aggregation request shape not pushdownable") + var ErrAlreadyTerminal = errors.New("job is in a terminal status") + var ErrArrayClauseTestsNothing = errors.New("array clause tests no position") + var ErrBetweenBounds = fmt.Errorf("%w: not a [low, high] pair of scalars", ErrInvalidOperand) + var ErrBetweenCount = fmt.Errorf("%w: wrong number of bounds", ErrBetweenBounds) + var ErrBetweenNonScalarBound = fmt.Errorf("%w: a bound that is not a scalar", ErrBetweenBounds) + var ErrBetweenNotArray = fmt.Errorf("%w: not a JSON array", ErrBetweenBounds) + var ErrBetweenNullBound = fmt.Errorf("%w: a null bound", ErrBetweenBounds) + var ErrCalloutSuperseded = errors.New("callout superseded") + var ErrConflict = errors.New("conflict: entity has been modified") + var ErrConsistencyTimeUnavailable = errors.New("consistency time unavailable") + var ErrEntityModelMismatch = errors.New("entity model mismatch") + var ErrEpochMismatch = errors.New("shard epoch mismatch") + var ErrGroupCardinalityExceeded = errors.New("group cardinality exceeded ceiling") + var ErrInvalidFilterPath = errors.New("invalid filter path") + var ErrInvalidOperand = errors.New("invalid operand") + var ErrInvalidPattern = errors.New("invalid pattern") + var ErrMarkedByAnotherClaim = errors.New("scheduled task: marked by another claim of this life") + var ErrNotFound = errors.New("not found") + var ErrOperandArray = fmt.Errorf("%w: an array, and the operator takes a single value", ErrInvalidOperand) + var ErrOperandMissing = fmt.Errorf("%w: missing or null, and the operator takes one", ErrInvalidOperand) + var ErrOperandNotScalar = fmt.Errorf("%w: not a scalar", ErrInvalidOperand) + var ErrOperandObject = fmt.Errorf("%w: an object", ErrInvalidOperand) + var ErrPartialUniqueKey = errors.New("invalid composite unique key value") + var ErrRetryExhausted = errors.New("retry budget exhausted") + var ErrSavepointNotFound = &sentinelErr + var ErrScopeConflict = errors.New("scope conflicts with another scope of the transaction") + var ErrSearchResultLimitExceeded = errors.New("search result limit exceeded") + var ErrStaleClaim = errors.New("write fenced: stale claim epoch") + var ErrStoreRejected = errors.New("store rejected the write deterministically") + var ErrTaskBusy = errors.New("row is being written by an open transaction") + var ErrTxAborted = &sentinelErr + var ErrTxAlreadyCommitted = &sentinelErr + var ErrTxCommitInProgress = errors.New("transaction commit in progress") + var ErrTxNotCommitted = errors.New("transaction not yet committed") + var ErrTxNotFound = &sentinelErr + var ErrTxRollbackOnly = errors.New("transaction is rollback-only") + var ErrTxRolledBack = &sentinelErr + var ErrTxTenantMismatch = errors.New("transaction tenant mismatch") + var ErrTxTerminated = errors.New("transaction in terminal state") + var ErrUnevaluableLeaf = errors.New("unevaluable leaf") + var ErrUniqueViolation = errors.New("composite unique key violation") + var ErrUnknownOperator = errors.New("unknown condition operator") + func AdmitsNumeric(t DataType, v Decimal) bool + func CompareTemporal(op FilterOp, storedMs int64, storedOK bool, cmpMs int64, cmpOK bool) bool + func DefaultSaveAll(store EntityStore, ctx context.Context, entities iter.Seq[*Entity]) ([]int64, error) + func DesugarCondition(c predicate.Condition) (predicate.Condition, error) + func EvalLeaf(exp Expansion, stored gjson.Result) bool + func FieldsMapFromSchema(schema []byte) (map[string]FieldDescriptor, error) + func HasRole(roles []string, role string) bool + func IsArrayIndex(s string) bool + func IsAssignableTo(dataT, schemaT DataType) bool + func IsNumeric(dt DataType) bool + func IsTemporalMetaField(field string) bool + func LessByOrder(a, b *Entity, specs []OrderSpec) bool + func MarshalModelNode(n *ModelNode) ([]byte, error) + func MergeOrdered(next func() (*Entity, bool, error), adds []*Entity, ...) func() (*Entity, bool, error) + func MetaFieldNames() []string + func NormalisePath(raw string) string + func NumericFamily(dt DataType) int + func NumericFloat(v any) (float64, bool) + func NumericRank(dt DataType) int + func OperandString(v any) string + func OperatorNames() []string + func ParseStringOrNull(operand string, t DataType) (any, bool) + func ParseTemporalMillis(s string) (int64, bool) + func Register(p Plugin) + func RegisteredPlugins() []string + func ResolvePath(data []byte, hops []PathHop) []gjson.Result + func ValidateArm(req ReconcileRequest) error + func ValidateClaimRequest(req ClaimRequest) error + func ValidateConditionOperators(cond predicate.Condition) error + func ValidateConditionPatterns(cond predicate.Condition) error + func ValidateFailureReason(r ScheduledTaskFailureReason) error + func ValidateFilterPath(p string) error + func ValidateLeafPattern(op FilterOp, value any) error + func ValidateOperand(op FilterOp, value any) error + func ValidateScheduledTaskQuery(q ScheduledTaskQuery) error + func ValidateTaskErrorText(s string) error + func WithAmbientOrigin(ctx context.Context, p Principal) context.Context + func WithTransaction(ctx context.Context, tx *TransactionState) context.Context + func WithUserContext(ctx context.Context, uc *UserContext) context.Context + type AggregateExpr struct + Alias string + Field string + Op AggregateOp + type AggregateOp string + const AggAvg + const AggMax + const AggMin + const AggStdev + const AggSum + type ArrayBranch struct + func (b *ArrayBranch) Element() *ModelNode + func (b *ArrayBranch) Kind() NodeKind + type AsyncSearchStore interface + Cancel func(ctx context.Context, jobID string, finishTime time.Time) error + ClaimStale func(ctx context.Context, staleAfter time.Duration, limit int) ([]*SearchJob, error) + ClearResults func(ctx context.Context, jobID string, epoch int64) error + CreateJob func(ctx context.Context, job *SearchJob) error + DeleteJob func(ctx context.Context, jobID string) error + GetJob func(ctx context.Context, jobID string) (*SearchJob, error) + GetResultIDs func(ctx context.Context, jobID string, offset, limit int) (entityIDs []string, total int, err error) + Heartbeat func(ctx context.Context, jobID string, epoch int64) error + ReapExpired func(ctx context.Context, ttl time.Duration) (int, error) + Release func(ctx context.Context, jobID string, epoch int64) error + SaveResults func(ctx context.Context, jobID string, epoch int64, entityIDs iter.Seq[string]) error + UpdateJobStatus func(ctx context.Context, jobID string, epoch int64, status string, resultCount int, ...) error + type Attempt struct + AtMs int64 + ClearOwnMark bool + Error string + NextAttemptTime int64 + NotCounted bool + type Branch interface + Kind func() NodeKind + type CalloutPair struct + Callout string + Major uint32 + Minor uint32 + type ChangeLevel string + const ChangeLevelArrayElements + const ChangeLevelArrayLength + const ChangeLevelStructural + const ChangeLevelType + func ValidateChangeLevel(s string) (ChangeLevel, error) + type ClaimRequest struct + AllowLostOwner bool + Limit int + NowMs int64 + Owner uuid.UUID + PerTenantLimit int + StaleAfter time.Duration + TenantInProgress map[TenantID]int + type Clock interface + Now func() time.Time + type ClusterBroadcaster interface + Broadcast func(topic string, payload []byte) + Subscribe func(topic string, handler func(payload []byte)) + type CompositeUniqueKeyCapable interface + SupportsCompositeUniqueKeys func() bool + type ConfigVar struct + Default string + Description string + Name string + Required bool + type DataType int + const BigDecimal + const BigInteger + const Boolean + const ByteArray + const Character + const Double + const Integer + const LocalDate + const LocalDateTime + const LocalTime + const Long + const Null + const String + const TimeUUIDType + const UUIDType + const UnboundDecimal + const UnboundInteger + const Year + const YearMonth + const ZonedDateTime + func ClassifyDecimal(d Decimal) DataType + func ClassifyInteger(v *big.Int) DataType + func ClassifyTemporalString(s string) (DataType, bool) + func CollapseNumeric(types []DataType) DataType + func ParseDataType(name string) (DataType, bool) + func (d DataType) String() string + type Decimal struct + func ParseDecimal(s string) (Decimal, error) + func (d *Decimal) UnmarshalJSON(data []byte) error + func (d Decimal) Canonical() string + func (d Decimal) Cmp(other Decimal) int + func (d Decimal) IsInt128() bool + func (d Decimal) IsZero() bool + func (d Decimal) MarshalJSON() ([]byte, error) + func (d Decimal) Precision() int + func (d Decimal) Scale() int32 + func (d Decimal) SetScale(newScale int32) (Decimal, error) + func (d Decimal) Sign() int + func (d Decimal) StripTrailingZeros() Decimal + func (d Decimal) Unscaled() *big.Int + type DescribablePlugin interface + ConfigVars func() []ConfigVar + type Entity struct + Data []byte + Meta EntityMeta + func MergeBounded(next func() (*Entity, bool, error), adds []*Entity, ...) ([]*Entity, error) + type EntityMeta struct + ChangeExecutor Principal + ChangeType string + ChangeUser string + ChangeUserKind PrincipalKind + CreationDate time.Time + ID string + LastModifiedDate time.Time + ModelRef ModelRef + State string + TenantID TenantID + TransactionID string + TransitionForLatestSave string + Version int64 + type EntityStore interface + CompareAndSave func(ctx context.Context, entity *Entity, expectedTxID string) (int64, error) + Count func(ctx context.Context, modelRef ModelRef, asAt *time.Time) (int64, error) + CountByState func(ctx context.Context, modelRef ModelRef, states []string, asAt *time.Time) (map[string]int64, error) + Delete func(ctx context.Context, entityID string) error + DeleteAll func(ctx context.Context, modelRef ModelRef) error + Exists func(ctx context.Context, entityID string) (bool, error) + Get func(ctx context.Context, entityID string) (*Entity, error) + GetAsAt func(ctx context.Context, entityID string, asAt time.Time) (*Entity, error) + GetPage func(ctx context.Context, modelRef ModelRef, limit, offset int, asAt *time.Time) ([]*Entity, error) + GetVersionByTransaction func(ctx context.Context, entityID, txID string) (*EntityVersion, error) + GetVersionMetadata func(ctx context.Context, entityID string, opts VersionMetadataOptions) ([]EntityVersionMeta, error) + Iterate func(ctx context.Context, model ModelRef, filter Filter, opts IterateOptions) (Iterator, error) + Save func(ctx context.Context, entity *Entity) (int64, error) + SaveAll func(ctx context.Context, entities iter.Seq[*Entity]) ([]int64, error) + Search func(ctx context.Context, filter Filter, opts SearchOptions) ([]*Entity, error) + type EntityVersion struct + AttributedKind PrincipalKind + ChangeType string + Deleted bool + Entity *Entity + Executor Principal + Timestamp time.Time + User string + Version int64 + type EntityVersionMeta struct + AttributedKind PrincipalKind + ChangeType string + Deleted bool + Executor Principal + Timestamp time.Time + TransactionID string + User string + Version int64 + type ExecutionResult struct + State string + type Expansion struct + func ExpandLeaf(op FilterOp, operand string, values []string, declared []DataType) (Expansion, error) + type FactoryConfig struct + func ApplyFactoryOptions(opts []FactoryOption) FactoryConfig + func (c FactoryConfig) Clock() Clock + func (c FactoryConfig) ClusterBroadcaster() ClusterBroadcaster + type FactoryOption func(*factoryConfig) + func WithClock(c Clock) FactoryOption + func WithClusterBroadcaster(b ClusterBroadcaster) FactoryOption + type Failure struct + AtMs int64 + Error string + Reason ScheduledTaskFailureReason + type FieldDescriptor struct + IsArray bool + Path string + Types []DataType + type FieldSource string + const SourceData + const SourceMeta + type Filter struct + Children []Filter + Coercion FilterCoercion + Declared []DataType + Op FilterOp + Path string + Source FieldSource + Value any + Values []any + func ConditionToFilter(cond predicate.Condition, fields map[string]FieldDescriptor) (Filter, error) + type FilterCoercion int + const CoerceNone + const CoerceTemporal + type FilterOp string + const FilterAnd + const FilterBetween + const FilterBetweenInclusive + const FilterContains + const FilterEndsWith + const FilterEq + const FilterGt + const FilterGte + const FilterIContains + const FilterIEndsWith + const FilterIEq + const FilterINe + const FilterINotContains + const FilterINotEndsWith + const FilterINotStartsWith + const FilterIStartsWith + const FilterIsNull + const FilterLike + const FilterLt + const FilterLte + const FilterMatchesRegex + const FilterNe + const FilterNot + const FilterNotContains + const FilterNotEndsWith + const FilterNotNull + const FilterNotStartsWith + const FilterOr + const FilterStartsWith + func LookupOperator(op string) (FilterOp, bool) + func MapOperator(op string) FilterOp + type GroupExpr struct + Kind GroupExprKind + Path string + type GroupExprKind int + const GroupExprDataPath + const GroupExprState + type GroupKeyEntry struct + Path string + Value any + type GroupedAggregateBucket struct + Aggregations map[string]any + Count int64 + GroupKey []GroupKeyEntry + type GroupedAggregationsOptions struct + Aggregations []AggregateExpr + MaxBuckets int + PointInTime *time.Time + type GroupedAggregator interface + GroupedAggregate func(ctx context.Context, model ModelRef, groupBy []GroupExpr, filter Filter, ...) ([]GroupedAggregateBucket, error) + type IterateOptions struct + OrderBy []OrderSpec + PointInTime *time.Time + TrackingRead bool + type Iterator interface + Close func() error + Entity func() *Entity + Err func() error + Next func() bool + type KeyValueStore interface + CompareAndPut func(ctx context.Context, namespace, key string, expected, value []byte) (applied bool, err error) + Delete func(ctx context.Context, namespace string, key string) error + DeleteIfEqual func(ctx context.Context, namespace, key string, expected []byte) (applied bool, err error) + Get func(ctx context.Context, namespace string, key string) ([]byte, error) + List func(ctx context.Context, namespace string) (map[string][]byte, error) + Put func(ctx context.Context, namespace string, key string, value []byte) error + PutIfAbsent func(ctx context.Context, namespace, key string, value []byte) (applied bool, err error) + type MessageHeader struct + AttributedKind PrincipalKind + ContentEncoding string + ContentLength int64 + ContentType string + CorrelationID string + Executor Principal + MessageID string + Recipient string + ReplyTo string + Subject string + UserID string + type MessageMetaData struct + IndexedValues map[string]any + Values map[string]any + type MessageStore interface + Delete func(ctx context.Context, id string) error + DeleteBatch func(ctx context.Context, ids []string) error + Get func(ctx context.Context, id string) (MessageHeader, MessageMetaData, io.ReadCloser, error) + Save func(ctx context.Context, id string, header MessageHeader, metaData MessageMetaData, ...) error + type MetaField struct + Kind OrderKind + Path string + Source FieldSource + func ResolveMetaField(name string) (MetaField, bool) + type ModelDescriptor struct + ChangeLevel ChangeLevel + Ref ModelRef + Schema []byte + State ModelState + UniqueKeys []UniqueKey + UpdateDate time.Time + type ModelNode struct + func NewArrayNode(element *ModelNode) *ModelNode + func NewEmptyNode() *ModelNode + func NewLeafNode(dt DataType) *ModelNode + func NewObjectNode() *ModelNode + func UnmarshalModelNode(data []byte) (*ModelNode, error) + func (n *ModelNode) AddScalarTypes(dts ...DataType) + func (n *ModelNode) Array() *ArrayBranch + func (n *ModelNode) Branch(k NodeKind) Branch + func (n *ModelNode) DeclareKind(k NodeKind) + func (n *ModelNode) DeclaredTypes() []DataType + func (n *ModelNode) Fields() []FieldDescriptor + func (n *ModelNode) FieldsMap() map[string]FieldDescriptor + func (n *ModelNode) IsPolymorphic() bool + func (n *ModelNode) Kinds() []NodeKind + func (n *ModelNode) Nullable() bool + func (n *ModelNode) Object() *ObjectBranch + func (n *ModelNode) Scalar() *ScalarBranch + func (n *ModelNode) SetChild(name string, child *ModelNode) + func (n *ModelNode) SetElement(element *ModelNode) + func (n *ModelNode) SetNullable() + type ModelRef struct + EntityName string + ModelVersion string + func (r ModelRef) String() string + type ModelState string + const ModelLocked + const ModelUnlocked + type ModelStore interface + Delete func(ctx context.Context, modelRef ModelRef) error + ExtendSchema func(ctx context.Context, ref ModelRef, delta SchemaDelta) error + Get func(ctx context.Context, modelRef ModelRef) (*ModelDescriptor, error) + GetAll func(ctx context.Context) ([]ModelRef, error) + IsLocked func(ctx context.Context, modelRef ModelRef) (bool, error) + Lock func(ctx context.Context, modelRef ModelRef) error + Save func(ctx context.Context, desc *ModelDescriptor) error + SetChangeLevel func(ctx context.Context, modelRef ModelRef, level ChangeLevel) error + Unlock func(ctx context.Context, modelRef ModelRef) error + type NodeKind int + const KindArray + const KindLeaf + const KindObject + func (k NodeKind) String() string + type NumericSubCondition struct + NotNull bool + Op FilterOp + Type DataType + Value Decimal + func ExpandNumericOperand(value Decimal, declaredNumeric []DataType, op FilterOp) []NumericSubCondition + type ObjectBranch struct + func (b *ObjectBranch) Child(name string) *ModelNode + func (b *ObjectBranch) Children() map[string]*ModelNode + func (b *ObjectBranch) Kind() NodeKind + func (b *ObjectBranch) Len() int + type OrderKind int + const OrderBool + const OrderNumeric + const OrderTemporal + const OrderText + func ClassifyType(types []DataType) (OrderKind, error) + func ClassifyTypesFold(types []DataType, fold func(OrderKind) OrderKind) (OrderKind, error) + type OrderSpec struct + Desc bool + Kind OrderKind + Path string + Source FieldSource + type PathHop struct + Name string + Subs []PathSub + func ParseFilterPath(p string) ([]PathHop, error) + type PathSub struct + Index int + Wildcard bool + type Plugin interface + Name func() string + NewFactory func(ctx context.Context, getenv func(string) string, opts ...FactoryOption) (StoreFactory, error) + func GetPlugin(name string) (Plugin, bool) + type PreparedFilter struct + func Prepare(f Filter) (PreparedFilter, error) + func (p PreparedFilter) Match(data []byte, meta EntityMeta) bool + type Principal struct + ID string + Kind PrincipalKind + func AttributionFor(ctx context.Context) (attributed, executor Principal) + func GetAmbientOrigin(ctx context.Context) Principal + func ResolveOrigin(ctx context.Context) Principal + type PrincipalKind string + const PrincipalService + const PrincipalSystem + const PrincipalUser + type ProcessorConfig struct + AsyncResult *bool + AttachEntity bool + CalculationNodesTags string + Context string + CrossoverToAsyncMs *int64 + Idempotent bool + ResponseTimeoutMs int64 + RetryPolicy string + type ProcessorDefinition struct + Annotations json.RawMessage + Config ProcessorConfig + ExecutionMode string + Name string + StartNewTxOnDispatch *bool + Type string + type ReconcileRequest struct + Arm []ScheduledTask + Cancel []string + CurrentState string + EntityID string + TenantID TenantID + type RollbackOnlyError struct + FailedCode string + func (e *RollbackOnlyError) Error() string + func (e *RollbackOnlyError) Is(target error) bool + type ScalarBranch struct + func (b *ScalarBranch) Kind() NodeKind + func (b *ScalarBranch) Types() []DataType + type ScheduleFunction struct + AttachEntity bool + CalculationNodesTags string + Context string + Name string + ResponseTimeoutMs int64 + ResultKind string + RetryPolicy string + type ScheduledTask struct + ArmToken uuid.UUID + ArmedAt int64 + ArmedBy Principal + Attempts int + Claim *TaskClaim + ClaimedFromLostOwner bool + EntityID string + FailedTime *int64 + FailureReason ScheduledTaskFailureReason + ID string + LastAttemptTime *int64 + LastError string + LostOwners int + ModelName string + ModelVersion int + NextAttemptTime int64 + PartialCommit bool + ScheduledTime int64 + SourceState string + Status ScheduledTaskStatus + TenantID TenantID + TimeoutMs *int64 + Transition string + Type ScheduledTaskType + UnsafeMarked bool + func SelectClaims(cands []ScheduledTask, req ClaimRequest) []ScheduledTask + type ScheduledTaskCursor struct + ID string + ScheduledTime int64 + type ScheduledTaskFailureReason string + const FailureExpiredAfterFailedAttempts + const FailureOwnerLostRepeatedly + const FailureRunPanicked + const FailureStoppedAfterPartialCommit + const FailureUnsafeWorkNotCompleted + type ScheduledTaskPage struct + Items []ScheduledTask + Next *ScheduledTaskCursor + type ScheduledTaskQuery struct + After *ScheduledTaskCursor + EntityID string + Limit int + ModelName string + ModelVersion int + Statuses []ScheduledTaskStatus + type ScheduledTaskStatus string + const ScheduledTaskFailed + const ScheduledTaskRunning + const ScheduledTaskWaiting + type ScheduledTaskStore interface + ClaimDue func(ctx context.Context, req ClaimRequest) ([]ScheduledTask, error) + DeleteForEntities func(ctx context.Context, tenant TenantID, entityIDs []string) error + DeleteForModel func(ctx context.Context, tenant TenantID, modelName string, modelVersion int, ...) error + Fail func(ctx context.Context, ref TaskRef, f Failure) error + Get func(ctx context.Context, tenant TenantID, id string) (task *ScheduledTask, found bool, err error) + GiveBackIdle func(ctx context.Context, owner uuid.UUID, keep []uuid.UUID) (int, error) + Heartbeat func(ctx context.Context, owner uuid.UUID) error + MarkUnsafe func(ctx context.Context, ref TaskRef) error + Query func(ctx context.Context, tenant TenantID, q ScheduledTaskQuery) (ScheduledTaskPage, error) + ReconcileForEntity func(ctx context.Context, req ReconcileRequest) (removed []ScheduledTask, err error) + RecordAttempt func(ctx context.Context, ref TaskRef, a Attempt) error + RemoveLife func(ctx context.Context, tenant TenantID, id string, armToken uuid.UUID) error + RetireOwner func(ctx context.Context, owner uuid.UUID) error + SchedulerActivity func(ctx context.Context) (SchedulerActivityReport, error) + StampSegment func(ctx context.Context, ref TaskRef, partial bool) error + SweepMarks func(ctx context.Context) error + SweepOwners func(ctx context.Context, deadFor time.Duration) error + type ScheduledTaskType string + const ScheduledTaskFireTransition + type SchedulerActivityReport struct + EarliestWaitingMs int64 + HasWaiting bool + Running bool + type SchemaDelta []byte + type SearchJob struct + CalcTimeMs int64 + Condition json.RawMessage + CreateTime time.Time + Epoch int64 + Error string + FinishTime *time.Time + HeartbeatTime *time.Time + ID string + ModelRef ModelRef + PointInTime time.Time + ResultCount int + SearchOpts json.RawMessage + StaleClaims int64 + Status string + TenantID TenantID + type SearchOptions struct + Limit int + ModelName string + ModelVersion string + OrderBy []OrderSpec + PointInTime *time.Time + TrackingRead bool + type SelfExecutingSearchStore interface + SelfExecuting func() + type Startable interface + Start func(ctx context.Context) error + type StateDefinition struct + Annotations json.RawMessage + Transitions []TransitionDefinition + type StateMachineAuditStore interface + GetEvents func(ctx context.Context, entityID string) ([]StateMachineEvent, error) + GetEventsByTransaction func(ctx context.Context, entityID string, transactionID string) ([]StateMachineEvent, error) + Record func(ctx context.Context, entityID string, event StateMachineEvent) error + type StateMachineEvent struct + Attributed Principal + Data map[string]any + Details string + EntityID string + EventType StateMachineEventType + Executor Principal + State string + TimeUUID string + Timestamp time.Time + TransactionID string + type StateMachineEventType string + const SMEventCancelled + const SMEventFinished + const SMEventForcedSuccess + const SMEventProcessCriterionNoMatch + const SMEventProcessingPaused + const SMEventScheduledTransitionArmed + const SMEventScheduledTransitionCancelled + const SMEventScheduledTransitionExpired + const SMEventScheduledTransitionFailed + const SMEventScheduledTransitionFired + const SMEventStarted + const SMEventStateProcessResult + const SMEventTransitionCriterionNoMatch + const SMEventTransitionMade + const SMEventTransitionNotFound + const SMEventWorkflowFound + const SMEventWorkflowNotFound + const SMEventWorkflowSkipped + type StoreFactory interface + AsyncSearchStore func(ctx context.Context) (AsyncSearchStore, error) + Close func() error + EntityStore func(ctx context.Context) (EntityStore, error) + KeyValueStore func(ctx context.Context) (KeyValueStore, error) + MessageStore func(ctx context.Context) (MessageStore, error) + ModelStore func(ctx context.Context) (ModelStore, error) + Ping func(ctx context.Context) error + ScheduledTaskStore func(ctx context.Context) (ScheduledTaskStore, error) + StateMachineAuditStore func(ctx context.Context) (StateMachineAuditStore, error) + TransactionManager func(ctx context.Context) (TransactionManager, error) + WorkflowStore func(ctx context.Context) (WorkflowStore, error) + type TaskClaim struct + Owner uuid.UUID + Token uuid.UUID + type TaskRef struct + ArmToken uuid.UUID + ClaimToken uuid.UUID + ID string + TenantID TenantID + type TemporalSubCondition struct + Millis int64 + Op FilterOp + Type DataType + func ExpandTemporalOperand(operand string, declaredTemporal []DataType, op FilterOp) []TemporalSubCondition + type TemporalValue struct + Type DataType + func ParseTemporalSubtype(operand string, t DataType) (TemporalValue, bool) + func (tv TemporalValue) Millis() int64 + type Tenant struct + ID TenantID + Name string + type TenantID string + const SystemTenantID + type TransactionCoordinationCapable interface + TransactionCoordinator func(ctx context.Context) (TransactionCoordinator, error) + type TransactionCoordinator interface + AdvanceCallout func(ctx context.Context, txID, calloutID string, major uint32) error + BeginCallout func(ctx context.Context, txID, calloutID string, outer []CalloutPair) error + CheckScope func(ctx context.Context) error + CompleteScope func(ctx context.Context) error + DiscardScope func(ctx context.Context, failedCode string) error + EndCallout func(ctx context.Context, txID, calloutID string) error + OpenChildScope func(ctx context.Context) (context.Context, error) + OpenScope func(ctx context.Context, txID string, pairs []CalloutPair) (context.Context, error) + Seal func(ctx context.Context, txID string) error + type TransactionManager interface + Begin func(ctx context.Context) (txID string, txCtx context.Context, err error) + Commit func(ctx context.Context, txID string) error + ConsistencyTime func(ctx context.Context) (time.Time, error) + GetSubmitTime func(ctx context.Context, txID string) (time.Time, error) + Join func(ctx context.Context, txID string) (txCtx context.Context, err error) + LatestRecordedTime func(ctx context.Context) (time.Time, error) + LostRace func(ctx context.Context, txID string) (bool, error) + ReleaseSavepoint func(ctx context.Context, txID string, savepointID string) error + Rollback func(ctx context.Context, txID string) error + RollbackToSavepoint func(ctx context.Context, txID string, savepointID string) error + Savepoint func(ctx context.Context, txID string) (savepointID string, err error) + type TransactionState struct + Buffer map[string]*Entity + Closed bool + DeleteAttribution map[string]WriteAttribution + Deletes map[string]bool + ID string + OpMu sync.RWMutex + Origin Principal + ReadSet map[string]bool + RolledBack bool + SnapshotTime time.Time + TenantID TenantID + WriteSet map[string]bool + func GetTransaction(ctx context.Context) *TransactionState + type TransitionDefinition struct + Annotations json.RawMessage + Criterion json.RawMessage + CriterionAnnotations json.RawMessage + Disabled bool + Manual bool + Name string + Next string + Processors []ProcessorDefinition + Schedule *TransitionSchedule + type TransitionSchedule struct + DelayMs int64 + Function *ScheduleFunction + TimeoutMs *int64 + type TypeSet struct + func NewTypeSet() *TypeSet + func Union(a, b *TypeSet) *TypeSet + func (ts *TypeSet) Add(dt DataType) + func (ts *TypeSet) Equal(other *TypeSet) bool + func (ts *TypeSet) IsEmpty() bool + func (ts *TypeSet) IsPolymorphic() bool + func (ts *TypeSet) Types() []DataType + type UUIDGenerator interface + NewTimeUUID func() [16]byte + type UniqueClaim struct + KeyID string + Signature string + func ComputeClaims(keys []UniqueKey, doc []byte) ([]UniqueClaim, error) + type UniqueKey struct + Fields []string + ID string + type UserContext struct + Executor *Principal + Kind PrincipalKind + Roles []string + Tenant Tenant + UserID string + UserName string + func GetUserContext(ctx context.Context) *UserContext + func MustGetUserContext(ctx context.Context) *UserContext + type VersionMetadataOptions struct + From *time.Time + Limit int + Until *time.Time + type WorkflowDefinition struct + Active bool + Annotations json.RawMessage + Criterion json.RawMessage + CriterionAnnotations json.RawMessage + Description string + InitialState string + Name string + States map[string]StateDefinition + Version string + type WorkflowStore interface + Delete func(ctx context.Context, modelRef ModelRef) error + Get func(ctx context.Context, modelRef ModelRef) ([]WorkflowDefinition, error) + Save func(ctx context.Context, modelRef ModelRef, workflows []WorkflowDefinition) error + type WriteAttribution struct + Attributed Principal + Executor Principal