Versions in this module Expand all Collapse all v0 v0.2.1 Nov 7, 2026 v0.2.0 Nov 6, 2026 Changes in this version + const DefaultMaxCalls + const EBusy + const MaxScanTTL + func WithExposureCount(ctx context.Context, f ExposureCount) context.Context + func WithSourceLog(ctx context.Context, l func(line string)) context.Context type Approval + Hash string + HubBody []string + Inputs map[string]string + Moving []string type BudgetStatus + LookupsLeftPeer *int type CountResult + GroupsFrom int + GroupsTotal int + OmittedGroups int + OmittedN int64 + Truncated bool type Engine + func (e *Engine) BudgetStatusFor(ctx context.Context) BudgetStatus + func (e *Engine) RefRecord(ref string) (key, epoch string, ok bool) + type ExposureCount func(epoch string, pseudonyms []string) (counts []int, exact bool, since time.Time) type Options + MaxCalls int type Peer + Token string type ScanInfo + Resumed bool v0.1.0 Nov 6, 2026 Changes in this version + const DefaultLimit + const DefaultNsPerByte + const DefaultScanBytes + const DefaultScanDeadline + const DefaultScanRange + const DefaultScanTTL + const DefaultTailMax + const DefaultTailPoll + const DefaultTop + const EApproval + const EBadQuery + const EMask + const EOverBudget + const EPIIInQuery + const EPolicyChanged + const ESource + const EStale + const EUnknownField + const EUnmaskNever + const MaxAround + const MaxBuckets + const MaxBy + const MaxFields + const MaxGroupBytes + const MaxGroups + const MaxInValues + const MaxLookup + const MaxLookupValue + const MaxNeedle + const MaxPattern + const MaxPredicates + const MaxReason + const MaxScans + const MaxSources + const MaxTailDuration + const MaxTemplateBytes + const MaxTemplateTokens + const MaxTop + const MaxUnmask + const MethodContext + const MethodCount + const MethodLookup + const MethodPatterns + const MethodScan + const MethodSearch + const MethodTail + const MethodTrace + const MethodUnmask + const OpContains + const OpEq + const OpExists + const OpGe + const OpGt + const OpIn + const OpLe + const OpLt + const OpMatches + const OpNe + const Other + const ScanCount + const ScanPatterns + const ScanSearch + const ScanTrace + const TemplateCut + const UnmaskApproved + const UnmaskNever + const Variable + var ErrSealed = errors.New("engine: invalid or expired reference") + func Template(masked string) string + func WithClearSink(ctx context.Context, s *ClearSink) context.Context + func WithPeer(ctx context.Context, p Peer) context.Context + type Approval struct + Body []string + Class string + Clear []string + Header string + NeverAuto bool + Note string + Warnings []string + type Approver func(ctx context.Context, a Approval) error + type BudgetStatus struct + Local *ClassBudget + LookupsLeft int + Remote *ClassBudget + Scans int + Sources []SourceBudget + type Budgets struct + LocalBytesPerHour int64 + LookupsPerHour int + LookupsPerHourPerUID int + MetricQueriesPerHour int + RemoteBytesPerHour int64 + RemoteRequestsPerMinute int + func DefaultBudgets() Budgets + type ClassBudget struct + BytesLeft int64 + BytesPerHour int64 + MetricLeft *int + RequestsLeft *int + RequestsPerMinute int + type ClearMasker interface + MaskClear func(source string, ev parse.Event) (mask.Record, map[string]string) + type ClearSink struct + func NewClearSink() *ClearSink + type ContextQuery struct + After int + Before int + Fields []string + Ref string + type ContextResult struct + Complete bool + Epoch string + MaskedFailures int + Masking Masking + Records []json.RawMessage + Scanned Scanned + Target int + type CostModel struct + func NewCostModel(p *parse.Parser, m MaskFunc, workers int, now func() time.Time) *CostModel + func (c *CostModel) Budget(d time.Duration) int64 + func (c *CostModel) Calibrate() + func (c *CostModel) NsPerByte() float64 + func (c *CostModel) Recalibrate() + func (c *CostModel) String() string + func (c *CostModel) Time(n int64) time.Duration + type CountQuery struct + Bucket string + By []string + ByLabels []string + ByPattern bool + FirstLast bool + type CountResult struct + Complete bool + CoveredUntil *time.Time + Cursor string + Epoch string + FromIndex bool + Groups []Group + IndexedFrom *time.Time + IndexedUntil *time.Time + MaskedFailures int + Scanned Scanned + Untimed int64 + type Engine struct + func New(o Options) (*Engine, error) + func (e *Engine) BudgetStatus() BudgetStatus + func (e *Engine) ClearRecords(ctx context.Context, sink *ClearSink, refs []string) []string + func (e *Engine) Context(ctx context.Context, cq ContextQuery) (ContextResult, error) + func (e *Engine) Count(ctx context.Context, q CountQuery) (_ CountResult, retErr error) + func (e *Engine) Handle(ctx context.Context, method string, params json.RawMessage) (any, *Error, error) + func (e *Engine) Lookup(ctx context.Context, q LookupQuery) (LookupResult, error) + func (e *Engine) Paced(ctx context.Context, src string) context.Context + func (e *Engine) Patterns(ctx context.Context, q PatternsQuery) (_ PatternsResult, retErr error) + func (e *Engine) RecordDigest(raw string) string + func (e *Engine) Ref(ref string) (source.RawRef, string, error) + func (e *Engine) Scan(ctx context.Context, q ScanQuery) (ScanResult, error) + func (e *Engine) Search(ctx context.Context, q Query) (SearchResult, error) + func (e *Engine) String() string + func (e *Engine) Tail(ctx context.Context, tq TailQuery) (TailResult, error) + func (e *Engine) Trace(ctx context.Context, tq TraceQuery) (SearchResult, error) + func (e *Engine) Unmask(ctx context.Context, q UnmaskQuery) (UnmaskResult, error) + type Error struct + Code string + Estimate *Estimate + Message string + Span string + func (e *Error) Error() string + type Estimate struct + Bytes int64 + Granules int + Range time.Duration + type Group struct + Bucket time.Time + First *time.Time + Key []*string + Last *time.Time + N int64 + type Limits struct + CountRange time.Duration + Deadline time.Duration + LocalBytes int64 + LocalRange time.Duration + MaxOutput int + MaxRecords int + RemoteBytes int64 + RemoteCountRange time.Duration + RemoteRange time.Duration + func DefaultLimits() Limits + type LookupQuery struct + Kind string + Reason string + Values []string + type LookupResult struct + Epoch string + Kind string + Pseudonyms []string + func (r LookupResult) AuditPseudonyms() []string + type Lookuper interface + DetectorKinds func() []string + Lookup func(kind, value string) (string, error) + type MaskFunc func(ev parse.Event) + type Masker interface + Epoch func() string + Mask func(source string, ev parse.Event) mask.Record + Text func(s string) string + TrustedValue func(source, path, v string) string + type Masking struct + Kinds []string + type Options struct + Budgets Budgets + Cost *CostModel + Detect func(string) bool + Limits Limits + LookupApproved bool + Masker Masker + NameMasked func(src, path string) bool + Now func() time.Time + PolicyFP func() string + Prefilter bool + Production bool + ScanBytes int64 + ScanDeadline time.Duration + ScanRange time.Duration + ScanRequestsPerMinute int + ScanTTL time.Duration + Sealer *Sealer + Sources map[string]source.Source + TailPoll time.Duration + Trusted func(src, name string, label bool) bool + Unmask string + Workers int + type PatternGroup struct + BaselineN *int64 + First *time.Time + Last *time.Time + N int64 + Pattern string + func (g PatternGroup) String() string + type PatternsQuery struct + Baseline string + Top int + type PatternsResult struct + BaselineFrom *time.Time + BaselineTo *time.Time + Complete bool + CoveredUntil *time.Time + Cursor string + Distinct int + Epoch string + Gone []PatternGroup + MaskedFailures int + New []PatternGroup + NoText int64 + Patterns []PatternGroup + Records int64 + Scanned Scanned + Truncated bool + Untimed int64 + type Peer struct + Approve Approver + Known bool + UID int + type Pred struct + Field string + Label string + Op string + Value json.RawMessage + type Query struct + Cursor string + Fields []string + From time.Time + Last string + Limit int + Order string + Regex string + Sources []string + Text string + To time.Time + Where []Pred + type ScanInfo struct + Done bool + ExpiresAt time.Time + ID string + Reattached bool + type ScanQuery struct + Query json.RawMessage + Reason string + Tool string + type ScanResult struct + Result any + Scan ScanInfo + Tool string + type Scanned struct + Bytes int64 + Granules int + Records int64 + type Sealer struct + func NewSealer(key []byte) (*Sealer, error) + func (s *Sealer) Digest(domain string, parts ...[]byte) string + func (s *Sealer) Open(prefix, sealed string, v any) error + func (s *Sealer) Seal(prefix string, v any) (string, error) + type SearchResult struct + Complete bool + CoveredUntil *time.Time + Cursor string + Epoch string + MaskedFailures int + Masking Masking + Records []json.RawMessage + Scanned Scanned + type SourceBudget struct + BytesLeft int64 + Name string + type TailQuery struct + Duration string + Fields []string + Max int + Regex string + Sources []string + Text string + Where []Pred + type TailResult struct + Complete bool + Epoch string + MaskedFailures int + Masking Masking + Records []json.RawMessage + Scanned Scanned + type TraceQuery struct + Cursor string + Fields []string + From time.Time + ID string + Last string + Limit int + Sources []string + To time.Time + type UnmaskQuery struct + Pseudonyms []string + Reason string + Ref string + type UnmaskResult struct + Epoch string + Values []UnmaskValue + func (r UnmaskResult) AuditPseudonyms() []string + type UnmaskValue struct + Pseudonym string + Value string