Documentation ¶
Index ¶
Constants ¶
View Source
const OOXMLCustomPropertiesFile = "docProps/custom.xml"
OOXMLCustomPropertiesFile is the relative path to the metadata file of every Office file where the custom properties (also the sensitivity-labels of the MS Information Protection) are stored
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crawler ¶
type Crawler struct {
// contains filtered or unexported fields
}
The main crawler struct
func NewCrawler ¶
func (*Crawler) Crawl ¶
func (c *Crawler) Crawl(entryPoint *EntryPoint) *Result
Crawl crawls the filesystem begging by the given entry point. For every element it discovers, a new porcessing task is generated, back-feeding the crawler.
type EntryPoint ¶
The start information of every crawl
type File ¶
type File struct { Path string Name string Extension string // Without "." Mime string Readable bool Writable bool Flags string // Unix Permission bits and special file flags, such as setuid/setgid, sticky bit... SizeKb int64 LastModified time.Time Depth int IsSymlink bool Properties []string IsDfs bool // Windows exclusive NfsRestrictions []string // Linux exclusive }
type OOXMLProperties ¶
type OOXMLProperties struct { XMLName xml.Name `xml:"Properties"` // Important when adding attributes, always use uppercase for it, otherwise unmarshalling might not work Properties []OOXMLProperty `xml:"property"` }
OOXMLProperties mirrors the xml structure of custom property metadata of Open Office Files
type OOXMLProperty ¶
type OOXMLProperty struct { Fmtid string `xml:"fmtid,attr"` Pid string `xml:"pid,attr"` Name string `xml:"name,attr"` ValStr *string `xml:"lpwstr"` ValInt *string `xml:"i4"` ValDate *string `xml:"filetime"` ValBool *string `xml:"bool"` ValFloat *string `xml:"r8"` }
func (*OOXMLProperty) GetVal ¶
func (p *OOXMLProperty) GetVal() string
GetVal checks which tag was used for the property and returns its value as string
type Result ¶
type Result struct { FoldersReadable int FilesReadable int FilesWritable int Data []*File Status string // Final scan status (success or graceful error). Should be stored along with the scan results. Exception bool // Indicates if something went wrong badly and results shall be discarded. This should never be }
Click to show internal directories.
Click to hide internal directories.