Documentation
¶
Index ¶
- Constants
- func ExportCacheFileInfo(ctx context.Context, src, dst *dbc.Queries, domain string, modID int64) error
- func ExportCacheFileUpdates(ctx context.Context, src, dst *dbc.Queries, domain string, modID int64) error
- func ExportCacheModInfo(ctx context.Context, src, dst *dbc.Queries, domain string, modID int64) error
- func Slugify(s string) string
- type ExportKind
- type Manifest
- type ManifestCounts
- type ManifestGame
- type Options
- type Progress
- type ProgressKind
- type Result
Constants ¶
View Source
const DatabaseFilename = "modctl.db"
View Source
const ExportFormatVersion = 1
Variables ¶
This section is empty.
Functions ¶
func ExportCacheFileInfo ¶ added in v0.7.0
func ExportCacheFileUpdates ¶ added in v0.7.0
func ExportCacheModInfo ¶ added in v0.7.0
Types ¶
type ExportKind ¶
type ExportKind string
const ( ExportKindFull ExportKind = "full" ExportKindGame ExportKind = "game" )
type Manifest ¶
type Manifest struct {
ExportFormatVersion int `json:"export_format_version"`
ExportKind ExportKind `json:"export_kind"`
ExportedAt time.Time `json:"exported_at"`
ModctlVersion string `json:"modctl_version"`
SchemaVersion int64 `json:"schema_version"`
DBSha256 string `json:"db_sha256"`
NexusCacheSha256 string `json:"nexus_cache_sha256"`
Counts ManifestCounts `json:"counts"`
Game *ManifestGame `json:"game,omitempty"`
}
type ManifestCounts ¶
type ManifestGame ¶
type Options ¶
type Options struct {
// ModctlVersion is injected from rootCmd.Version
ModctlVersion string
// SkipInventory omits archive_inventory_entries from game-scoped exports
SkipInventory bool
// OutputPath is the destination file
OutputPath string
// NoVerify skips rehashing blobs before export
NoVerify bool
// CacheDBPath is the full path to the nexus_cache.db
CacheDBPath string
// Progress, if set, is told how verifying blobs is going. The exporter
// itself prints nothing.
Progress func(Progress)
}
type Progress ¶ added in v0.8.0
type Progress struct {
Kind ProgressKind
Done int
Total int
}
Progress is an update on how an export is going.
type ProgressKind ¶ added in v0.8.0
type ProgressKind int
ProgressKind says what a Progress update is about.
const ( // VerifyStarted: blob verification is about to begin; Total is the // number of blobs. VerifyStarted ProgressKind = iota // VerifyBlob: the Done'th blob (counting from 1) is being verified. VerifyBlob // VerifyFinished: every blob was verified. VerifyFinished // VerifyFailed: verification stopped without finishing, because of an // error or because the context was cancelled. VerifyFailed )
type Result ¶ added in v0.8.0
type Result struct {
// SkippedBlobs are the hashes of blobs that were in the database but
// missing from disk, and so were left out of the export.
SkippedBlobs []string
}
Result is what an export reports besides the file it wrote.
Click to show internal directories.
Click to hide internal directories.