Versions in this module Expand all Collapse all v0 v0.158.0 Nov 14, 2026 v0.157.0 Nov 14, 2026 Changes in this version + const ActionCopy + const ActionExclude + const ActionMask + const ActionUndeclared + const ActionUnsupported + const DefaultPageSize + const PolicyFormat + const ReportFormat + var ErrIDTooLong = errors.New("id too long for one file per record") + var ErrRoundTrip = errors.New("a record file would not read back as written") + var ErrUsage = errors.New("usage") + type CollectionResult struct + Action string + BelowMissingParent int64 + Collection string + Complete bool + Count *int64 + CountAtLeast bool + IDTooLong int64 + Masked []string + Note string + OtherParentPaths []string + OtherParents int64 + Query string + Records int64 + Rejected int64 + Resumed bool + Selected bool + type Definitions struct + Dir string + Specs []*Spec + func LoadDefinitions(dir string) (*Definitions, error) + func (d *Definitions) CopyTo(out string) (digest string, err error) + func (d *Definitions) Spec(id string) *Spec + type Doc struct + Data map[string]any + Path string + type FirestoreSource struct + func OpenFirestore(ctx context.Context, project, database string) (*FirestoreSource, error) + func (s *FirestoreSource) Close() error + func (s *FirestoreSource) Count(ctx context.Context, q Query) (int64, error) + func (s *FirestoreSource) Get(ctx context.Context, path string) (*Doc, error) + func (s *FirestoreSource) Page(ctx context.Context, q Query) ([]Doc, error) + func (s *FirestoreSource) ReadAt(t time.Time) + func (s *FirestoreSource) RootCollections(ctx context.Context) ([]string, error) + type KeyEncoding interface + Decode func(name string) (string, bool) + Encode func(id string) string + Name func() string + type Options struct + Collections []string + ContinueOnLongIDs bool + DryRun bool + Identity SourceIdentity + KeepRejected bool + Log io.Writer + MaxReads int64 + Output string + PageSize int + Progress io.Writer + Prune bool + Restart bool + Snapshot bool + Source string + Under string + type OutsideRead struct + Collection string + Defined bool + Documents int64 + type Policy struct + Copy []string + Definitions string + Exclude []string + Format string + Mask map[string][]string + Output string + Path string + Paths map[string][]string + func ParsePolicy(content []byte) (*Policy, error) + func ReadPolicy(path string) (*Policy, error) + func (p *Policy) Check(defs *Definitions) error + func (p *Policy) DefinitionsDir() string + func (p *Policy) OutputDir() string + type Query struct + After string + Collection string + Group bool + Limit int + Under string + type Rejection struct + Collection string + Fields []string + Path string + Reasons []string + type Report struct + BudgetReached bool + Collections []CollectionResult + Complete bool + DryRun bool + Format string + Incomplete []string + MaxReads int64 + Outside []OutsideRead + Pruned []string + ReadTime string + Reads int64 + ReadsTotal int64 + Records int64 + Rejected []Rejection + Resumed bool + Source string + SourceIdentity *SourceIdentity + Stale []string + Unchanged int64 + UndefinedRootCollections []string + Under string + Validation []string + Written int64 + func Run(ctx context.Context, src Source, defs *Definitions, policy *Policy, ...) (*Report, error) + type Source interface + Count func(ctx context.Context, q Query) (int64, error) + Get func(ctx context.Context, path string) (*Doc, error) + Page func(ctx context.Context, q Query) ([]Doc, error) + RootCollections func(ctx context.Context) ([]string, error) + type SourceIdentity struct + Database string + Emulator string + Project string + func (s SourceIdentity) String() string + type Spec struct + Def *ingitdb.CollectionDef + ID string + Segments []string + Unsupported string + func (s *Spec) Depth() int + func (s *Spec) Leaf() string