backup

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package backup implements full content backup for microCMS services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, client *api.Client, scanResult *scan.Result, opts Options) error

Run executes a backup.

Types

type Manifest

type Manifest struct {
	ServiceID   string        `json:"serviceId"`
	StartedAt   time.Time     `json:"startedAt"`
	CompletedAt time.Time     `json:"completedAt,omitempty"`
	Status      string        `json:"status"` // "complete", "partial", "failed"
	APIs        []ManifestAPI `json:"apis"`
	TotalItems  int           `json:"totalItems"`
	MediaCount  int           `json:"mediaCount,omitempty"`
	MediaBytes  int64         `json:"mediaBytes,omitempty"`
}

Manifest records backup metadata.

type ManifestAPI

type ManifestAPI struct {
	APIID     string `json:"apiId"`
	APIType   string `json:"apiType"`
	ItemCount int    `json:"itemCount"`
	Status    string `json:"status"` // "complete", "failed", "skipped"
}

ManifestAPI records per-API backup info.

type Options

type Options struct {
	OutDir        string
	ServiceID     string
	Parallelism   int
	SkipSchema    bool
	DownloadMedia bool
	DryRun        bool
	Quiet         bool
	Color         bool
}

Options configures a backup run.

Jump to

Keyboard shortcuts

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