Versions in this module Expand all Collapse all v1 v1.1.2 Aug 27, 2026 v1.1.1 Aug 27, 2026 Changes in this version type Command + Source string + Window Window v1.1.0 Aug 27, 2026 v1.0.0 Aug 26, 2026 Changes in this version + const SchemaVersion + var ErrCivilDateDoesNotExist = errors.New("civil date does not exist in the local timezone") + var ErrIncomplete = errors.New("collection is incomplete") + var ErrUnknownSchema = errors.New("unknown document schema") + func CollectWindow(ctx context.Context, runner Runner, source *core.Source, env Environment, ...) (map[string]*Document, error) + func DecodeFragment(fragment string) (string, error) + func DescribePolicy(source *core.Source) string + func EncodeDocument(document *Document) ([]byte, error) + func EncodeFragment(id string) string + func EnsureBinDir(root string) error + func EventDocumentURI(date, source string) string + func IndexDocumentURI(source string) string + func ParseDay(value string) (time.Time, error) + func ParseRecordTime(value string) (time.Time, error) + func VerifyRecords(document *Document) error + func WriteDocument(path string, document *Document) error + type Command struct + Argv []string + Dir string + Env map[string]string + ForbiddenRoot string + Stdin string + Timeout time.Duration + func BuildRunCommand(source *core.Source, env Environment, window Window, timeout time.Duration) Command + func FetchBody(ctx context.Context, runner Runner, source *core.Source, fields Fields, ...) (string, Command, error) + func (c Command) Display() string + type Document struct + Body bool + CollectedAt string + Count int + Date string + FKF int + Fields Fields + Layer core.Layer + Records []Record + Schema Schema + Source string + WindowEnd string + WindowStart string + func Collect(ctx context.Context, runner Runner, source *core.Source, env Environment, ...) (*Document, error) + func DecodeDocument(data []byte, path string) (*Document, error) + func DecodeDocumentContext(ctx context.Context, data []byte, path string) (*Document, error) + func ReadDocument(path string) (*Document, error) + func ReadDocumentContext(ctx context.Context, path string) (*Document, error) + func (d *Document) FindRecord(id string) (Record, bool) + func (d *Document) RecordURI(record Record) (string, bool) + func (d *Document) URI() string + type Environment struct + Bin []string + Env map[string]string + Root string + func NewEnvironment(config *core.Config) Environment + func (e Environment) LookPath(name string) (string, bool) + type Fields = core.FieldMap + func FieldsOf(source *core.Source) Fields + type Pacer struct + Now func() time.Time + Sleep func(ctx context.Context, d time.Duration) error + func NewPacer(now func() time.Time) *Pacer + func (p *Pacer) Wait(ctx context.Context, source *core.Source) error + type PolicyRunner struct + Sleep func(ctx context.Context, d time.Duration) error + func NewPolicyRunner(inner Runner, source *core.Source) *PolicyRunner + func (p *PolicyRunner) Attempts() int + func (p *PolicyRunner) Run(ctx context.Context, cmd Command) (string, error) + type Record map[string]any + func DecodeRecords(source *core.Source, stdout string) ([]Record, error) + type Runner interface + Run func(ctx context.Context, cmd Command) (string, error) + func ExecRunner() Runner + func NewPacingRunner(inner Runner, pacer *Pacer, source *core.Source) Runner + type RunnerFunc func(ctx context.Context, cmd Command) (string, error) + func (f RunnerFunc) Run(ctx context.Context, cmd Command) (string, error) + type Schema = core.FieldSchema + func SchemaOf(source *core.Source) Schema + type Window struct + Date string + End string + Next string + Start string + func DayWindow(day time.Time) Window