exporters

package
v0.0.0-...-d0271b3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

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