Documentation ¶
Index ¶
Constants ¶
View Source
const ( NO_ERROR = iota ERROR_NOT_UNIQUE_MSG_STORE ERROR_ROOT_NOT_FOUND ERROR_OPEN ERROR_INDEX_LOAD ERROR_UNKNOWN_RECORD )
Errors.
View Source
const ( PST_MESSAGE_ERROR_FILE_ERROR = iota + 1 PST_MESSAGE_ERROR_UNSUPPORTED_PARAM )
Record to file errors.
View Source
const ( /* Normal mode just creates mbox format files in the current directory. Each file is named the same as the folder's name that it represents. */ MODE_NORMAL = iota /* KMail mode creates a directory structure suitable for being used directly by the KMail application. */ MODE_KMAIL /* Recurse mode creates a directory structure like the PST file. Each directory contains only one file which stores the emails in mboxrd format. */ MODE_RECURSE /* Separate mode creates the same directory structure as recurse. The emails are stored in separate files, numbering from 1 upward. Attachments belonging to the emails are saved as email_no-filename (e.g. 1-samplefile.doc or 1-Attachment2.zip). Unsupported parameter in pst_message_to_file(). */ MODE_SEPARATE )
EXPORT
View Source
const ( /* Output Normal just prints the standard information about what is going on. */ OUTPUT_NORMAL = iota /* Output Quiet is provided so that only errors are printed. */ OUTPUT_QUIET )
View Source
const ( CMODE_VCARD = iota CMODE_LIST )
Output mode for contacts.
View Source
const ( DMODE_EXCLUDE = iota DMODE_INCLUDE )
Output mode for deleted items.
View Source
const ( OTMODE_EMAIL = 1 << iota OTMODE_APPOINTMENT OTMODE_JOURNAL OTMODE_CONTACT OTMODE_ALL = 0xff )
Output type mode flags.
View Source
const POINTER_SIZE = bits.UintSize / 8
Size of pointer in bytes.
Variables ¶
This section is empty.
Functions ¶
func DestroyList ¶
Destroys a slice of Records.
Parameters:
- records - slice of Records to be destroyed.
Returns:
- error if any of the Record has already been destroyed.
Types ¶
type Export ¶
type Export struct {
// contains filtered or unexported fields
}
func NewExport ¶
func NewExport(conf ExportConf) *Export
Creates a new instance of the Export structure. Has to be deallocated with Destroy method after use.
Parameters:
- conf - Export Configuration.
Returns:
- Newly created Export structure.
type ExportConf ¶
type ExportConf struct { Mode int ModeMH int // A submode of MODE_SEPARATE ModeEX int // A submode of MODE_SEPARATE ModeMSG int // A submode of MODE_SEPARATE ModeThunder int // A submode of MODE_RECURSE OutputMode int ContactMode int // Not used within the code DeletedMode int // Not used within the code OutputTypeMode int // Default to all. Not used within the code ContactModeSpecified int // Not used within the code Overwrite int PreferUtf8 int SaveRtfBody int // Unused FileNameLen int // Enough room for MODE_SPEARATE file name AcceptableExtensions string }
func ExportConfDefault ¶
func ExportConfDefault() ExportConf
Default parameters of ExportConf.
Returns:
- Newly created ExportConf structure with default parameters.
type Pst ¶
type Pst struct { Capacity uint Used uint LastError string NumError int // contains filtered or unexported fields }
PST
func NewPst ¶
Creates a new Pst. Has to be deallocated with Destroy method after use.
Parameters:
- path - path to the existing Pst.
Returns:
- Pointer to a new instance of Pst.
type Record ¶
type Record struct { TypeOfRecord uint8 LogicalPath string Name string Renaming string ExtraMimeHeaders string Err int // contains filtered or unexported fields }
RECORD
func (*Record) Destroy ¶
Destroys individual Record.
Returns:
- Error, if Record has been already destroyed.
func (*Record) RecordToFile ¶
Writes individual records to a file.
Parameters:
- export - Pst export.
Return:
- 1, if successfully written, otherwise 0.
func (*Record) SetRecordRenaming ¶
Sets renaming for the Record.
Parameters:
- renaming - Path with a new name.
Click to show internal directories.
Click to hide internal directories.