Documentation ¶
Index ¶
- func LoadTextDictionary(fileProvider d2interface.FileProvider)
- func SetBuildInfo(branch, commit string)
- func TranslateString(key string) string
- type BitMuncher
- func (v *BitMuncher) GetBit() uint32
- func (v *BitMuncher) GetBits(bits int) uint32
- func (v *BitMuncher) GetByte() byte
- func (v *BitMuncher) GetInt32() int32
- func (v *BitMuncher) GetSignedBits(bits int) int
- func (v *BitMuncher) GetUInt32() uint32
- func (v *BitMuncher) MakeSigned(value uint32, bits int) int32
- func (v *BitMuncher) SkipBits(bits int)
- type BitStream
- type BuildInfoRecord
- type CalcString
- type DataDictionary
- type Path
- type Rectangle
- type StreamReader
- func (v *StreamReader) Eof() bool
- func (v *StreamReader) GetByte() byte
- func (v *StreamReader) GetInt16() int16
- func (v *StreamReader) GetInt32() int32
- func (v *StreamReader) GetInt64() int64
- func (v *StreamReader) GetPosition() uint64
- func (v *StreamReader) GetSize() uint64
- func (v *StreamReader) GetUInt16() uint16
- func (v *StreamReader) GetUInt32() uint32
- func (v *StreamReader) GetUint64() uint64
- func (v *StreamReader) Read(p []byte) (n int, err error)
- func (v *StreamReader) ReadByte() (byte, error)
- func (v *StreamReader) ReadBytes(count int) ([]byte, error)
- func (v *StreamReader) SetPosition(newPosition uint64)
- func (v *StreamReader) SkipBytes(count int)
- type StreamWriter
- func (v *StreamWriter) GetBytes() []byte
- func (v *StreamWriter) PushByte(val byte)
- func (v *StreamWriter) PushInt16(val int16)
- func (v *StreamWriter) PushInt64(val int64)
- func (v *StreamWriter) PushUint16(val uint16)
- func (v *StreamWriter) PushUint32(val uint32)
- func (v *StreamWriter) PushUint64(val uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTextDictionary ¶
func LoadTextDictionary(fileProvider d2interface.FileProvider)
func SetBuildInfo ¶
func SetBuildInfo(branch, commit string)
SetBuildInfo is called at the start of the application to generate the global BuildInfo value
func TranslateString ¶
Types ¶
type BitMuncher ¶
func CopyBitMuncher ¶
func CopyBitMuncher(source *BitMuncher) *BitMuncher
func CreateBitMuncher ¶
func CreateBitMuncher(data []byte, offset int) *BitMuncher
func (*BitMuncher) GetBit ¶
func (v *BitMuncher) GetBit() uint32
func (*BitMuncher) GetBits ¶
func (v *BitMuncher) GetBits(bits int) uint32
func (*BitMuncher) GetByte ¶
func (v *BitMuncher) GetByte() byte
func (*BitMuncher) GetInt32 ¶
func (v *BitMuncher) GetInt32() int32
func (*BitMuncher) GetSignedBits ¶
func (v *BitMuncher) GetSignedBits(bits int) int
func (*BitMuncher) GetUInt32 ¶
func (v *BitMuncher) GetUInt32() uint32
func (*BitMuncher) MakeSigned ¶
func (v *BitMuncher) MakeSigned(value uint32, bits int) int32
func (*BitMuncher) SkipBits ¶
func (v *BitMuncher) SkipBits(bits int)
type BitStream ¶
type BitStream struct {
// contains filtered or unexported fields
}
BitStream is a utility class for reading groups of bits from a stream
func CreateBitStream ¶
CreateBitStream creates a new BitStream
func (*BitStream) EnsureBits ¶
EnsureBits ensures that the specified number of bits are available
type BuildInfoRecord ¶
type BuildInfoRecord struct { // Branch is the branch this build is based on (or 'Local' if built locally) Branch string // Commit is the commit hash of the build (or blank if built locally) Commit string }
BuildInfoRecord is the structure used to hold information about the current build
var BuildInfo BuildInfoRecord
BuildInfo contains information about the build currently being ran
type CalcString ¶
type CalcString string
type DataDictionary ¶
DataDictionary represents a data file (Excel)
func LoadDataDictionary ¶
func LoadDataDictionary(text string) *DataDictionary
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
StreamReader allows you to read data from a byte array in various formats
func CreateStreamReader ¶
func CreateStreamReader(source []byte) *StreamReader
CreateStreamReader creates an instance of the stream reader
func (*StreamReader) Eof ¶
func (v *StreamReader) Eof() bool
func (*StreamReader) GetByte ¶
func (v *StreamReader) GetByte() byte
GetByte returns a byte from the stream
func (*StreamReader) GetInt16 ¶
func (v *StreamReader) GetInt16() int16
GetInt16 returns a int16 word from the stream
func (*StreamReader) GetInt32 ¶
func (v *StreamReader) GetInt32() int32
GetInt32 returns an int32 dword from the stream
func (*StreamReader) GetInt64 ¶
func (v *StreamReader) GetInt64() int64
GetInt64 returns a uint64 qword from the stream
func (*StreamReader) GetPosition ¶
func (v *StreamReader) GetPosition() uint64
GetPosition returns the current stream position
func (*StreamReader) GetSize ¶
func (v *StreamReader) GetSize() uint64
GetSize returns the total size of the stream in bytes
func (*StreamReader) GetUInt16 ¶
func (v *StreamReader) GetUInt16() uint16
GetUInt16 returns a uint16 word from the stream
func (*StreamReader) GetUInt32 ¶
func (v *StreamReader) GetUInt32() uint32
GetUInt32 returns a uint32 dword from the stream
func (*StreamReader) GetUint64 ¶
func (v *StreamReader) GetUint64() uint64
GetUint64 returns a uint64 qword from the stream
func (*StreamReader) Read ¶
func (v *StreamReader) Read(p []byte) (n int, err error)
Read implements io.Reader
func (*StreamReader) ReadByte ¶
func (v *StreamReader) ReadByte() (byte, error)
ReadByte implements io.ByteReader
func (*StreamReader) ReadBytes ¶
func (v *StreamReader) ReadBytes(count int) ([]byte, error)
ReadBytes reads multiple bytes
func (*StreamReader) SetPosition ¶
func (v *StreamReader) SetPosition(newPosition uint64)
func (*StreamReader) SkipBytes ¶
func (v *StreamReader) SkipBytes(count int)
type StreamWriter ¶
type StreamWriter struct {
// contains filtered or unexported fields
}
StreamWriter allows you to create a byte array by streaming in writes of various sizes
func CreateStreamWriter ¶
func CreateStreamWriter() *StreamWriter
CreateStreamWriter creates a new StreamWriter instance
func (*StreamWriter) GetBytes ¶
func (v *StreamWriter) GetBytes() []byte
GetBytes returns the the byte slice of the underlying data
func (*StreamWriter) PushByte ¶
func (v *StreamWriter) PushByte(val byte)
PushByte writes a byte to the stream
func (*StreamWriter) PushInt16 ¶
func (v *StreamWriter) PushInt16(val int16)
PushInt16 writes a int16 word to the stream
func (*StreamWriter) PushInt64 ¶
func (v *StreamWriter) PushInt64(val int64)
PushInt64 writes a uint64 qword to the stream
func (*StreamWriter) PushUint16 ¶
func (v *StreamWriter) PushUint16(val uint16)
PushUint16 writes an uint16 word to the stream
func (*StreamWriter) PushUint32 ¶
func (v *StreamWriter) PushUint32(val uint32)
PushUint32 writes a uint32 dword to the stream
func (*StreamWriter) PushUint64 ¶
func (v *StreamWriter) PushUint64(val uint64)
PushUint64 writes a uint64 qword to the stream