capture

package
v0.0.0-...-9815da9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Overview

Automod development helpers for fetching and saving snapshots of real-world content and metadata.

NOTE: real-world content is sensitive, even if it is abusive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAndProcessRecent

func FetchAndProcessRecent(ctx context.Context, eng *automod.Engine, atid syntax.AtIdentifier, limit int) error

func FetchAndProcessRecord

func FetchAndProcessRecord(ctx context.Context, eng *automod.Engine, aturi syntax.ATURI) error

func ProcessCaptureRules

func ProcessCaptureRules(eng *automod.Engine, capture AccountCapture) error

Test helper which processes all the records from a capture. Intentionally exported, for use in other packages.

This method replaces any pre-existing directory on the engine with a mock directory.

Types

type AccountCapture

type AccountCapture struct {
	CapturedAt  syntax.Datetime                     `json:"capturedAt"`
	AccountMeta automod.AccountMeta                 `json:"accountMeta"`
	PostRecords []comatproto.RepoListRecords_Record `json:"postRecords"`
}

func CaptureRecent

func CaptureRecent(ctx context.Context, eng *automod.Engine, atid syntax.AtIdentifier, limit int) (*AccountCapture, error)

func MustLoadCapture

func MustLoadCapture(capPath string) AccountCapture

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL