types

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	VT_EMPTY TypeID = iota // 0x00
	VT_NULL
	VT_I2
	VT_I4
	VT_R4
	VT_R8
	VT_CY
	VT_DATE
	VT_BSTR

	VT_ERROR
	VT_BOOL
	VT_VARIANT

	VT_DECIMAL

	VT_I1
	VT_U1
	VT_UI2
	VT_UI4
	VT_I8
	VT_UI8
	VT_INT
	VT_UINT //0x17

	VT_LPSTR //0x1E
	VT_LPWSTR
	VT_FILETIME = iota + 0x25 // 0x40
	VT_BLOB
	VT_STREAM
	VT_STORAGE
	VT_STREAMED_OBJECT
	VT_STORED_OBJECT
	VT_BLOB_OBJECT
	VT_CF
	VT_CLSID
	VT_VERSIONED_STREAM // 0x49
)

Variables

View Source
var (
	ErrType        = errors.New("msoleps: error coercing byte stream to type")
	ErrUnknownType = errors.New("msoleps: unknown type error")
)
View Source
var CodePageIDs map[CodePageID]string = map[CodePageID]string{}/* 152 elements not displayed */

Functions

This section is empty.

Types

type Array

type Array [][]Type

func (Array) Length

func (a Array) Length() int

func (Array) String

func (a Array) String() string

func (Array) Type

func (a Array) Type() string

type Bool

type Bool bool

func (Bool) Length

func (i Bool) Length() int

func (Bool) String

func (i Bool) String() string

func (Bool) Type

func (i Bool) Type() string

type CodePageID

type CodePageID uint16

type CodeString

type CodeString struct {
	Chars []byte
	// contains filtered or unexported fields
}

func (*CodeString) Encoding

func (s *CodeString) Encoding() string

func (*CodeString) Length

func (s *CodeString) Length() int

func (*CodeString) SetId

func (s *CodeString) SetId(i CodePageID)

func (*CodeString) String

func (s *CodeString) String() string

func (*CodeString) Type

func (s *CodeString) Type() string

type Currency

type Currency int64

func (Currency) Length

func (c Currency) Length() int

func (Currency) String

func (c Currency) String() string

func (Currency) Type

func (c Currency) Type() string

type Date

type Date float64

http://msdn.microsoft.com/en-us/library/cc237601.aspx

func (Date) Length

func (d Date) Length() int

func (Date) String

func (d Date) String() string

func (Date) Time

func (d Date) Time() time.Time

func (Date) Type

func (d Date) Type() string

type Decimal

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

http://msdn.microsoft.com/en-us/library/cc237603.aspx

func (Decimal) Length

func (d Decimal) Length() int

func (Decimal) String

func (d Decimal) String() string

func (Decimal) Type

func (d Decimal) Type() string

type FileTime

type FileTime struct {
	Low  uint32 // Windows FILETIME structure
	High uint32 // Windows FILETIME structure
}

Win FILETIME type http://msdn.microsoft.com/en-us/library/cc230324.aspx

func MustFileTime

func MustFileTime(b []byte) FileTime

func (FileTime) Length

func (f FileTime) Length() int

func (FileTime) String

func (f FileTime) String() string

func (FileTime) Time

func (f FileTime) Time() time.Time

func (FileTime) Type

func (f FileTime) Type() string

type Guid

type Guid struct {
	DataA uint32
	DataB uint16
	DataC uint16
	DataD [8]byte
}

Win GUID and UUID type http://msdn.microsoft.com/en-us/library/cc230326.aspx

func GuidFromName

func GuidFromName(n string) (Guid, error)

func GuidFromString

func GuidFromString(str string) (Guid, error)

func MustGuid

func MustGuid(b []byte) Guid

func MustGuidFromString

func MustGuidFromString(str string) Guid

func (Guid) Length

func (g Guid) Length() int

func (Guid) String

func (g Guid) String() string

func (Guid) Type

func (g Guid) Type() string

type I1

type I1 int8

func (I1) Length

func (i I1) Length() int

func (I1) String

func (i I1) String() string

func (I1) Type

func (i I1) Type() string

type I2

type I2 int16

func (I2) Length

func (i I2) Length() int

func (I2) String

func (i I2) String() string

func (I2) Type

func (i I2) Type() string

type I4

type I4 int32

func (I4) Length

func (i I4) Length() int

func (I4) String

func (i I4) String() string

func (I4) Type

func (i I4) Type() string

type I8

type I8 int64

func (I8) Length

func (i I8) Length() int

func (I8) String

func (i I8) String() string

func (I8) Type

func (i I8) Type() string

type MakeType

type MakeType func([]byte) (Type, error)

type Null

type Null struct{}

func (Null) Length

func (i Null) Length() int

func (Null) String

func (i Null) String() string

func (Null) Type

func (i Null) Type() string

type R4

type R4 float32

func (R4) Length

func (r R4) Length() int

func (R4) String

func (r R4) String() string

func (R4) Type

func (r R4) Type() string

type R8

type R8 float64

func (R8) Length

func (r R8) Length() int

func (R8) String

func (r R8) String() string

func (R8) Type

func (r R8) Type() string

type Type

type Type interface {
	String() string
	Type() string
	Length() int
}

func Evaluate

func Evaluate(b []byte) (Type, error)

func MakeArray

func MakeArray(f MakeType, b []byte) (Type, error)

TODO: Array not implemented yet

func MakeBool

func MakeBool(b []byte) (Type, error)

func MakeCodeString

func MakeCodeString(b []byte) (Type, error)

func MakeCurrency

func MakeCurrency(b []byte) (Type, error)

func MakeDate

func MakeDate(b []byte) (Type, error)

func MakeDecimal

func MakeDecimal(b []byte) (Type, error)

func MakeFileTime

func MakeFileTime(b []byte) (Type, error)

func MakeGuid

func MakeGuid(b []byte) (Type, error)

func MakeI1

func MakeI1(b []byte) (Type, error)

func MakeI2

func MakeI2(b []byte) (Type, error)

func MakeI4

func MakeI4(b []byte) (Type, error)

func MakeI8

func MakeI8(b []byte) (Type, error)

func MakeR4

func MakeR4(b []byte) (Type, error)

func MakeR8

func MakeR8(b []byte) (Type, error)

func MakeUI1

func MakeUI1(b []byte) (Type, error)

func MakeUI2

func MakeUI2(b []byte) (Type, error)

func MakeUI4

func MakeUI4(b []byte) (Type, error)

func MakeUI8

func MakeUI8(b []byte) (Type, error)

func MakeUnicode

func MakeUnicode(b []byte) (Type, error)

func MakeVariant

func MakeVariant(b []byte) (Type, error)

func MakeVector

func MakeVector(f MakeType, b []byte) (Type, error)

type TypeID

type TypeID uint16

type UI1

type UI1 uint8

func (UI1) Length

func (i UI1) Length() int

func (UI1) String

func (i UI1) String() string

func (UI1) Type

func (i UI1) Type() string

type UI2

type UI2 uint16

func (UI2) Length

func (i UI2) Length() int

func (UI2) String

func (i UI2) String() string

func (UI2) Type

func (i UI2) Type() string

type UI4

type UI4 uint32

func (UI4) Length

func (i UI4) Length() int

func (UI4) String

func (i UI4) String() string

func (UI4) Type

func (i UI4) Type() string

type UI8

type UI8 uint64

func (UI8) Length

func (i UI8) Length() int

func (UI8) String

func (i UI8) String() string

func (UI8) Type

func (i UI8) Type() string

type UnicodeString

type UnicodeString []uint16

func (UnicodeString) Length

func (s UnicodeString) Length() int

func (UnicodeString) String

func (s UnicodeString) String() string

func (UnicodeString) Type

func (s UnicodeString) Type() string

type Variant

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

func (Variant) Length

func (v Variant) Length() int

func (Variant) String

func (v Variant) String() string

func (Variant) Type

func (v Variant) Type() string

type Vector

type Vector []Type

func (Vector) Length

func (v Vector) Length() int

func (Vector) String

func (v Vector) String() string

func (Vector) Type

func (v Vector) Type() string

Jump to

Keyboard shortcuts

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