Documentation ¶
Index ¶
- Constants
- func AppendToDoubleSlice(dest [][]string, entries [][]string) (newdest [][]string)
- func ChromeTime(chrometime interface{}) (string, error)
- func CocoaTime(seconds int64) (string, error)
- func CopyFile(from string, to string, mode os.FileMode) error
- func CopyFiles(fileglobnames []string, destfolder string, rootTargetPath string) ([]string, error)
- func DBColumnNames(dbfile, tablename string) ([]string, error)
- func EntryFromMap(m map[string]string, headers []string) ([]string, error)
- func Exists(path string) (bool, error)
- func FileExists(filename string) bool
- func FileExtension(filepath string) string
- func GetPrintableString(str string) string
- func GetUsernameFromPath(path string) string
- func Glob(glob string, targetPath string) []string
- func InitializeMapToEmptyString(m map[string]string, headers []string) map[string]string
- func InterfaceToString(i interface{}) (string, error)
- func IsDirectory(path string) bool
- func IsSymlink(filename string) bool
- func JSONGetValueFromKey(j interface{}, key string) (interface{}, error)
- func MapToJSONString(m map[string]interface{}) string
- func MultiMultiGlob(sliceGlob []string, targetPaths []string) []string
- func Multiglob(sliceGlob []string, targetPath string) []string
- func NewOrionLogger(logFlag string, orionRuntime string, outputPath string) (*zap.Logger, *os.File, error)
- func PathExists(filename string) bool
- func Prepend(dest []string, value string) []string
- func QueryDB(dbfile string, query string, queryHeaders []string, forensic bool) ([][]string, error)
- func SliceContainsString(slice []string, str string) bool
- func UnsafeEntryFromMap(m interface{}, headers []string) ([]string, error)
- func UnsafeQueryDB(dbfile, query string) ([][]string, error)
- func UnsafeQueryDBToMap(dbfile, query string) ([]map[string]interface{}, error)
- func WriteFile(fromFile io.Reader, to string, mode os.FileMode) error
Constants ¶
const DirPermissions = os.ModeDir | 0775
DirPermissions are the default permission bits we apply to directories.
Variables ¶
This section is empty.
Functions ¶
func AppendToDoubleSlice ¶
AppendToDoubleSlice appends all string slices from entries to dest and returns a new object holding the slice of string slices
func ChromeTime ¶
ChromeTime converts webkit/chrome microsecond timestamps to UTC strings of ISO8601 format
func CopyFile ¶
CopyFile copies a file from 'from' to 'to', with an attempt to perform a copy & rename to avoid chaos if anything goes wrong partway.
func CopyFiles ¶
CopyFiles globs a list of filenames from fileglobnames and copies those files to the destfolder. Returns a list of the paths of copied files and an error (nil if no error) fileglobnames is case sensitive and must be a slice of strings formatted as glob ex. Users\\*\\OneDrive MINUS the rootTargetPath destfolder must be relative to your current Orion execution folder rootTargetPath specifies the prefix of the fileglobnames
func DBColumnNames ¶
DBColumnNames returns a slice of strings representing column headers for input tablename of dbfile
func EntryFromMap ¶
EntryFromMap returns a slice of strings based on input map m and associated with and in order by headers/keys
func FileExists ¶
FileExists returns true if the given path exists and is a file.
func FileExtension ¶
FileExtension split filepath string to return the file extension
func GetPrintableString ¶
GetPrintableString returns a string where non-printables in str are omitted
func GetUsernameFromPath ¶
GetUsernameFromPath returns the last entry of a filepath split by delimiter, typically username for a username path
func InitializeMapToEmptyString ¶
InitializeMapToEmptyString returns a map that is initialized to empty string for given headers
func InterfaceToString ¶
InterfaceToString uses type assertion to convert input interface to string if possible
func IsDirectory ¶
IsDirectory checks if a given path is a directory
func JSONGetValueFromKey ¶
JSONGetValueFromKey takes in an interface representing json data (map[string]interface) and a key, and returns the value for that key if it finds it
func MapToJSONString ¶
MapToJSONString converts an input map[string]interface{} to an appropraite json string for output writing
func MultiMultiGlob ¶
MultiMultiGlob returns a list of globbed strings based on input list of patterns for an input list of target paths
func NewOrionLogger ¶
func NewOrionLogger(logFlag string, orionRuntime string, outputPath string) (*zap.Logger, *os.File, error)
NewOrionLogger returns an instance of a Zap logger configured with logFlag level, name of orionRuntime, and outputPath
func PathExists ¶
PathExists returns true if the given path exists, as a file or a directory.
func SliceContainsString ¶
SliceContainsString outputs true if slice contains str
func UnsafeEntryFromMap ¶
UnsafeEntryFromMap returns a slice of strings in order of the header
func UnsafeQueryDB ¶
func UnsafeQueryDBToMap ¶
Types ¶
This section is empty.