Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDescriptors ¶
func GetDescriptors(data *DescriptorsData) []string
GetDescriptors returns an array of raw output descriptors.
func GetDescriptorsHTML ¶
func GetDescriptorsHTML(data *DescriptorsData) string
GetDescriptorsHTML returns the HTML for the output descriptor list in the Emergency Kit.
Types ¶
type DescriptorsData ¶
type Input ¶
type Input struct {
FirstEncryptedKey string
FirstFingerprint string
SecondEncryptedKey string
SecondFingerprint string
}
Input struct to fill the PDF
type Metadata ¶
type Metadata struct {
Version int `json:"version"`
BirthdayBlock int `json:"birthdayBlock"`
EncryptedKeys []*MetadataKey `json:"encryptedKeys"`
OutputDescriptors []string `json:"outputDescriptors"`
}
Metadata holds the machine-readable data for an Emergency Kit.
type MetadataKey ¶
type MetadataKey struct {
DhPubKey string `json:"dhPubKey"`
EncryptedPrivKey string `json:"encryptedPrivKey"`
Salt string `json:"salt"`
}
MetadataKey holds an entry in the Metadata key array.
type MetadataReader ¶
type MetadataReader struct {
SrcFile string
}
MetadataReader can extract the metadata file from a PDF.
func (*MetadataReader) HasMetadata ¶
func (mr *MetadataReader) HasMetadata() (bool, error)
HasMetadata returns whether the metadata is present (and alone) in SrcFile.
func (*MetadataReader) ReadMetadata ¶
func (mr *MetadataReader) ReadMetadata() (*Metadata, error)
ReadMetadata returns the deserialized metadata file embedded in the SrcFile PDF.
type MetadataWriter ¶
MetadataWriter can add the metadata file to a PDF.
func (*MetadataWriter) WriteMetadata ¶
func (mw *MetadataWriter) WriteMetadata(metadata *Metadata) error
WriteMetadata creates a copy of SrcFile with attached JSON metadata into DstFile.
Click to show internal directories.
Click to hide internal directories.