Documentation
¶
Index ¶
- Constants
- Variables
- func Commit(ctx context.Context, opts Options, message string) (bool, error)
- func EnsureRepo(ctx context.Context, opts Options) error
- func ImportEmbeddings(ctx context.Context, s *store.Store, opts Options, manifest Manifest) error
- func ManifestAlreadyImported(ctx context.Context, s *store.Store, manifest Manifest) bool
- func MarkImported(ctx context.Context, s *store.Store, manifest Manifest) error
- func NeedsImport(ctx context.Context, s *store.Store, staleAfter time.Duration) bool
- func Pull(ctx context.Context, opts Options) error
- func Push(ctx context.Context, opts Options) error
- type EmbeddingManifest
- type FilterOptions
- type ImportProgress
- type Manifest
- func Export(ctx context.Context, s *store.Store, opts Options) (Manifest, error)
- func Import(ctx context.Context, s *store.Store, opts Options) (Manifest, error)
- func ImportIfChanged(ctx context.Context, s *store.Store, opts Options) (Manifest, bool, error)
- func ImportIncremental(ctx context.Context, s *store.Store, opts Options, previous, manifest Manifest) (Manifest, bool, error)
- func PreviousImportedManifest(ctx context.Context, s *store.Store, opts Options) (Manifest, bool)
- func ReadManifest(repoPath string) (Manifest, error)
- type MediaManifest
- type Options
- type TableManifest
Constants ¶
View Source
const ( ManifestName = "manifest.json" LastImportSyncScope = "share:last_import_at" LastImportManifestSyncScope = "share:last_import_manifest_generated_at" LastImportManifestJSONScope = "share:last_import_manifest_json" )
Variables ¶
View Source
var (
ErrNoManifest = snapshot.ErrNoManifest
)
View Source
var SnapshotTables = []string{
"guilds",
"channels",
"members",
"messages",
"message_events",
"message_attachments",
"mention_events",
"sync_state",
}
Functions ¶
func ImportEmbeddings ¶
func ManifestAlreadyImported ¶
func NeedsImport ¶
Types ¶
type EmbeddingManifest ¶
type FilterOptions ¶ added in v0.7.1
func (FilterOptions) Active ¶ added in v0.7.1
func (o FilterOptions) Active() bool
type ImportProgress ¶
type Manifest ¶
type Manifest struct {
Version int `json:"version"`
GeneratedAt time.Time `json:"generated_at"`
Tables []TableManifest `json:"tables"`
Media *MediaManifest `json:"media,omitempty"`
Embeddings []EmbeddingManifest `json:"embeddings,omitempty"`
Files map[string]string `json:"files,omitempty"`
}
func ImportIfChanged ¶
func ImportIncremental ¶
func ReadManifest ¶
type MediaManifest ¶ added in v0.8.0
type MediaManifest struct {
Attachments int `json:"attachments"`
Files []snapshot.FileManifest `json:"files"`
Bytes int64 `json:"bytes"`
}
type TableManifest ¶
type TableManifest = snapshot.TableManifest
Click to show internal directories.
Click to hide internal directories.