catalog

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 1

Variables

This section is empty.

Functions

func Export

func Export(db *state.DB, w io.Writer) error

Types

type Catalog

type Catalog struct {
	App                string         `json:"app"`
	CatalogVersion     int            `json:"catalog_version"`
	StateSchemaVersion int            `json:"state_schema_version"`
	ExportedAt         time.Time      `json:"exported_at"`
	Models             []CatalogEntry `json:"models"`
}

func Build

func Build(db *state.DB) (*Catalog, error)

type CatalogEntry

type CatalogEntry struct {
	Metadata state.ModelMetadata `json:"metadata"`
	Download *DownloadSnapshot   `json:"download,omitempty"`
}

type DownloadSnapshot

type DownloadSnapshot struct {
	URL            string `json:"url"`
	Dest           string `json:"dest"`
	ExpectedSHA256 string `json:"expected_sha256,omitempty"`
	ActualSHA256   string `json:"actual_sha256,omitempty"`
	Size           int64  `json:"size,omitempty"`
	Status         string `json:"status,omitempty"`
}

type ImportEntryResult

type ImportEntryResult struct {
	DownloadURL string `json:"download_url"`
	Dest        string `json:"dest,omitempty"`
	Action      string `json:"action"`
	Reason      string `json:"reason,omitempty"`
}

type ImportOptions

type ImportOptions struct {
	DryRun bool
}

type ImportResult

type ImportResult struct {
	DryRun    bool                `json:"dry_run"`
	Creates   int                 `json:"creates"`
	Updates   int                 `json:"updates"`
	Skips     int                 `json:"skips"`
	Conflicts int                 `json:"conflicts"`
	Entries   []ImportEntryResult `json:"entries"`
}

func Import

func Import(db *state.DB, r io.Reader, opts ImportOptions) (*ImportResult, error)

Jump to

Keyboard shortcuts

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