Documentation
¶
Overview ¶
Package exporters: 1PUX (1Password interchange format) exporter. Produces a ZIP file named *.1pux containing export.data (JSON) and files/.
Package exporters serialises Passbubble entries into external password manager formats. All input data is plaintext — callers must decrypt entries before passing them here.
Index ¶
- func Export1PUX(records []EntryRecord) ([]byte, error)
- func Export1PasswordCSV(records []EntryRecord) ([]byte, error)
- func ExportBitwarden(records []EntryRecord, opts BitwardenExportOptions) ([]byte, error)
- func ExportCSV(records []EntryRecord) ([]byte, error)
- type BitwardenExportOptions
- type CustomField
- type EntryRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export1PUX ¶
func Export1PUX(records []EntryRecord) ([]byte, error)
Export1PUX serialises records into a 1PUX ZIP archive. Returns the raw ZIP bytes suitable for writing as a *.1pux file.
func Export1PasswordCSV ¶
func Export1PasswordCSV(records []EntryRecord) ([]byte, error)
Export1PasswordCSV serialises records in 1Password CSV format: Title, Username, Password, URL, Notes, Type. File custom fields are skipped (CSV cannot carry binary data).
func ExportBitwarden ¶
func ExportBitwarden(records []EntryRecord, opts BitwardenExportOptions) ([]byte, error)
ExportBitwarden serialises records into a Bitwarden-compatible JSON export. Pass a zero-value BitwardenExportOptions for default behaviour (no files).
func ExportCSV ¶
func ExportCSV(records []EntryRecord) ([]byte, error)
ExportCSV produces a generic CSV export compatible with Chrome/Edge import. Columns: name, url, username, password, notes
Types ¶
type BitwardenExportOptions ¶
type BitwardenExportOptions struct {
IncludeFiles bool // include file custom fields in export
FilesAsBase64 bool // encode file content as data: URI in a hidden field
}
BitwardenExportOptions controls how the Bitwarden export is generated.
type CustomField ¶
type CustomField struct {
Label string
Value string
Type string // text|password|totp|url|email|phone|note|ssh|file
Filename string // only for type=file
MimeType string // only for type=file
}
CustomField is a user-defined field on an entry. Type is one of: text, password, totp, url, email, phone, note, ssh, file. Omitting Type is equivalent to "text" for backward compatibility.
type EntryRecord ¶
type EntryRecord struct {
Name string
URL string
Type string
Username string
Password string
TOTPSecret string
Notes string
CardNumber string
HolderName string
ExpiryMonth string
ExpiryYear string
CVV string
FirstName string
LastName string
Company string
Email string
Phone string
Street string
City string
State string
PostalCode string
Country string
LicenseKey string
ProductName string
CustomFields []CustomField
}
EntryRecord mirrors importers.EntryRecord and is kept in a separate package to avoid an import cycle with the importers package.