Documentation
¶
Index ¶
- func CreateZip(path string, files []ZipFile) error
- func ExtractManifestFromZip(zipPath string) ([]byte, error)
- func ExtractShareFromZip(zipPath string) (*core.Share, error)
- func GenerateAll(p *project.Project, cfg Config) error
- func GenerateBundle(params BundleParams) error
- func GenerateReadme(data ReadmeData) string
- func VerifyBundle(bundlePath string) error
- type BundleParams
- type Config
- type ReadmeData
- type ZipFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractManifestFromZip ¶ added in v0.0.15
ExtractManifestFromZip opens a bundle ZIP and extracts the encrypted manifest data. It looks for MANIFEST.age first. If not found, it falls back to extracting the manifest embedded in recover.html.
func ExtractShareFromZip ¶ added in v0.0.15
ExtractShareFromZip opens a bundle ZIP and parses the share from the README.txt inside it.
func GenerateAll ¶
GenerateAll creates bundles for all friends in the project.
func GenerateBundle ¶
func GenerateBundle(params BundleParams) error
GenerateBundle creates a single bundle ZIP file for one friend.
func GenerateReadme ¶
func GenerateReadme(data ReadmeData) string
GenerateReadme creates the README.txt content with all embedded information.
func VerifyBundle ¶
VerifyBundle verifies the integrity of a bundle ZIP file. Returns nil if valid, or an error describing the problem.
Types ¶
type BundleParams ¶
type BundleParams struct {
OutputPath string
ProjectName string
Friend project.Friend
OtherFriends []project.Friend
Threshold int
Total int
ManifestData []byte
ManifestChecksum string
ManifestEmbedded bool // true when manifest is base64-embedded in recover.html
RecoverHTML string
RecoverChecksum string
Version string
GitHubReleaseURL string
SealedAt time.Time
Anonymous bool
RecoveryURL string
Language string // Bundle language for this friend
TlockEnabled bool // true when manifest uses time-lock encryption
}
BundleParams contains all parameters for generating a single bundle.
type Config ¶
type Config struct {
Version string // Tool version (e.g., "v1.0.0")
RecoveryURL string // Optional: base URL for QR code (e.g. "https://example.com/recover.html")
NoEmbedManifest bool // If true, do not embed MANIFEST.age in recover.html even when small enough
TlockEnabled bool // If true, bundles include tlock-js for time-lock decryption
}
Config holds configuration for bundle generation.
type ReadmeData ¶
type ReadmeData struct {
ProjectName string
Holder string
OtherFriends []project.Friend
Threshold int
Total int
Version string
GitHubReleaseURL string
ManifestChecksum string
RecoverChecksum string
Created time.Time
Anonymous bool
Language string // Bundle language (e.g. "en", "es"); defaults to "en"
ManifestEmbedded bool // true when manifest is embedded in recover.html
TlockEnabled bool // true when manifest uses time-lock encryption
}
ReadmeData contains all data needed to generate README.txt