msg

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PROPS_ID_MAP = map[string]map[string]string{}/* 543 elements not displayed */

Functions

func DecodeInt64

func DecodeInt64(num []byte) int64

DecodeInt64 decode 8 byte value into int64

func DecodeUint16

func DecodeUint16(num []byte) uint16

DecodeUint16 decode 2 byte value into uint16

func DecodeUint32

func DecodeUint32(num []byte) uint32

DecodeUint32 decode 4 byte value into uint32

func DecodeUint64

func DecodeUint64(num []byte) uint64

DecodeUint64 decode 4 byte value into uint32

func DecodeUint8

func DecodeUint8(num []byte) uint8

DecodeUint8 decode 1 byte value into uint8

func FromUnicode

func FromUnicode(uni []byte) string

FromUnicode read unicode and convert to byte array

func Headers

func Headers(hstr string) mail.Header

func ParseAttachment

func ParseAttachment(msg *mailfile.Message, datas []UnpackData)

func ParseProps

func ParseProps(msg *mailfile.Message, m MetaData)

func PtypBinary

func PtypBinary(data []byte) []byte

variable size; a COUNT field followed by that many bytes

func PtypBoolean

func PtypBoolean(data []byte) bool

1 byte; restricted to 1 or 0

func PtypCurrency

func PtypCurrency(data []byte) []byte

8 bytes; a 64-bit signed, scaled integer representation of a decimal currency value, with four places to the right of the decimal point

func PtypErrorCode

func PtypErrorCode(data []byte) uint32

4 bytes; A 32-bit integer encoding error information

func PtypFloating32

func PtypFloating32(data []byte) float32

4 bytes; a 32-bit floating point number

func PtypFloating64

func PtypFloating64(data []byte) float64

8 bytes; a 64-bit floating point number

func PtypFloatingTime

func PtypFloatingTime(data []byte) []byte

8 bytes; a 64-bit floating point number

func PtypGuid

func PtypGuid(data []byte) []byte

16 bytes; a GUID with Data1, Data2, and Data3 fields in little-endian format

func PtypInteger16

func PtypInteger16(data []byte) uint16

2 bytes; a 16-bit integer

func PtypInteger32

func PtypInteger32(data []byte) uint32

4 bytes; a 32-bit integer

func PtypInteger64

func PtypInteger64(data []byte) uint64

8 bytes; a 64-bit integer

func PtypMultipleBinary

func PtypMultipleBinary(data []byte) interface{}

variable size; a COUNT field followed by that many PtypBinary values

func PtypMultipleCurrency

func PtypMultipleCurrency(data []byte) interface{}

variable size; a COUNT field followed by that many PtypCurrency values

func PtypMultipleFloating32

func PtypMultipleFloating32(data []byte) interface{}

variable size; a COUNT field followed by that many PtypFloating32 values

func PtypMultipleFloating64

func PtypMultipleFloating64(data []byte) interface{}

variable size; a COUNT field followed by that many PtypFloating64 values

func PtypMultipleFloatingTime

func PtypMultipleFloatingTime(data []byte) interface{}

variable size; a COUNT field followed by that many PtypFloatingTime values

func PtypMultipleGuid

func PtypMultipleGuid(data []byte) interface{}

variable size; a COUNT field followed by that many PtypGuid values

func PtypMultipleInteger16

func PtypMultipleInteger16(data []byte) interface{}

variable size; a COUNT field followed by that many PtypInteger16 values

func PtypMultipleInteger32

func PtypMultipleInteger32(data []byte) interface{}

variable size; a COUNT field followed by that many PtypInteger32 values

func PtypMultipleInteger64

func PtypMultipleInteger64(data []byte) interface{}

variable size; a COUNT field followed by that many PtypInteger64 values

func PtypMultipleString

func PtypMultipleString(data []byte) interface{}

variable size; a COUNT field followed by that many PtypString values

func PtypMultipleString8

func PtypMultipleString8(data []byte) interface{}

variable size; a COUNT field followed by that many PtypString8 values

func PtypMultipleTime

func PtypMultipleTime(data []byte) interface{}

variable size; a COUNT field followed by that many PtypTime values

func PtypNull

func PtypNull(data []byte) []byte

this property is a placeholder

func PtypObject

func PtypObject(data []byte) []byte

the property value is a Component Object Model (COM) object

func PtypRestriction

func PtypRestriction(data []byte) []byte

variable size; a byte array representing one or more Restriction structures

func PtypRuleAction

func PtypRuleAction(data []byte) []byte

variable size; a 16-bit COUNT field followed by that many rule action structures

func PtypServerId

func PtypServerId(data []byte) []byte

variable size; a 16-bit COUNT field followed by a structure

func PtypString

func PtypString(data []byte) string

variable size; a string of Unicode characters in UTF-16LE format encoding with terminating null character (0x0000).

func PtypString8

func PtypString8(data []byte) string

variable size; a string of multibyte characters in externally specified encoding with terminating null character (single 0 byte).

func PtypTime

func PtypTime(data []byte) uint64

8 bytes; a 64-bit integer representing the number of 100-nanosecond intervals since January 1, 1601

func PtypUnspecified

func PtypUnspecified(data []byte) []byte

this property type value matches any type

func ReadASCIIString

func ReadASCIIString(pos int, buff []byte) ([]byte, int)

ReadASCIIString returns a string as ascii

func ReadByte

func ReadByte(pos int, buff []byte) (byte, int)

ReadByte read and return a single byte

func ReadBytes

func ReadBytes(pos, count int, buff []byte) ([]byte, int)

ReadBytes read and return count number o bytes

func ReadTypedString

func ReadTypedString(pos int, buff []byte) ([]byte, int)

ReadTypedString reads a string as either Unicode or ASCII depending on type value

func ReadUTF16BE

func ReadUTF16BE(pos int, buff []byte) ([]byte, int)

ReadUTF16BE reads the unicode string that the outlook rule file uses this basically means there is a length byte that we need to skip over

func ReadUint16

func ReadUint16(pos int, buff []byte) (uint16, int)

ReadUint16 read 2 bytes and return as uint16

func ReadUint32

func ReadUint32(pos int, buff []byte) (uint32, int)

ReadUint32 read 4 bytes and return as uint32

func ReadUint8

func ReadUint8(pos int, buff []byte) (uint8, int)

ReadUint8 read 1 byte and return as uint8

func ReadUnicodeString

func ReadUnicodeString(pos int, buff []byte) ([]byte, int)

ReadUnicodeString read and return a unicode string

func Trim

func Trim(data []byte) []byte

func UTF16ToUTF8

func UTF16ToUTF8(b []byte) string

Types

type MetaData

type MetaData map[string]interface{}

type Stream

type Stream struct {
	// unpack
	UnpackData
	// contains filtered or unexported fields
}

func New

func New(file string) (*Stream, error)

func NewStream

func NewStream(doc *mscfb.Reader) (*Stream, error)

func (*Stream) Format

func (s *Stream) Format() *mailfile.Message

type UnpackData

type UnpackData struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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