Documentation ¶
Index ¶
- Constants
- func AsBytes(v FixedReader) []byte
- func BitPos(index int) (bytePos int, bitPos uint8)
- func BytesToDigestString(s FoldableReader, prefix string) string
- func BytesToGroupedString(s []byte, prefix string, separator string, everyN int) string
- func Copy(to []byte, from FixedReader) error
- func CutOutUint64(v []byte) uint64
- func Equal(t, o FixedReader) bool
- func EqualToBytes(t FixedReader, o []byte) bool
- func FillBitsWithStaticNoise(base uint32, v []byte)
- func FoldToUint64(v []byte) uint64
- func FoldUint64(v uint64) uint32
- func VerifyReadAt(b []byte, off int64, max int) (n int, err error)
- type BitArrayReader
- func (p *BitArrayReader) AlignOffset() uint8
- func (p *BitArrayReader) IsArrayDepleted() bool
- func (p *BitArrayReader) ReadBit() (int, error)
- func (p *BitArrayReader) ReadBool() (bool, error)
- func (p *BitArrayReader) ReadByte() (byte, error)
- func (p *BitArrayReader) ReadNext() (int, error)
- func (p *BitArrayReader) ReadSubByte(bitLen uint8) (byte, error)
- type BitBuilder
- func (p *BitBuilder) AlignOffset() uint8
- func (p *BitBuilder) Append(bit bool)
- func (p *BitBuilder) AppendAlignedByte(b byte)
- func (p *BitBuilder) AppendBit(bit int)
- func (p *BitBuilder) AppendByte(b byte)
- func (p *BitBuilder) AppendN(bitCount int, bit bool)
- func (p *BitBuilder) AppendNBit(bitCount int, bit int)
- func (p *BitBuilder) AppendSubByte(value byte, bitLen uint8)
- func (p *BitBuilder) BitLen() int
- func (p *BitBuilder) CompletedByteCount() int
- func (p *BitBuilder) Copy() *BitBuilder
- func (p *BitBuilder) Done() (b []byte, bitLen int)
- func (p *BitBuilder) DoneToBits() BitSlice
- func (p *BitBuilder) DoneToByteString() (ByteString, int)
- func (p *BitBuilder) DoneToBytes() []byte
- func (p *BitBuilder) IsZero() bool
- func (p *BitBuilder) PadWith(bit bool)
- func (p *BitBuilder) PadWithBit(bit int)
- func (p *BitBuilder) Set(index int, bit, padding bool)
- func (p *BitBuilder) SetBit(index, bit int)
- func (p *BitBuilder) ToggleBit(index int) bool
- func (p *BitBuilder) TrimZeros() (skippedPrefix int, b []byte)
- type BitBuilderOrder
- type BitIoReader
- type BitSlice
- type BitSliceLSB
- type BitSliceMSB
- type BitStrReader
- func (p *BitStrReader) AlignOffset() uint8
- func (p *BitStrReader) IsArrayDepleted() bool
- func (p *BitStrReader) ReadBit() (int, error)
- func (p *BitStrReader) ReadBool() (bool, error)
- func (p *BitStrReader) ReadByte() (byte, error)
- func (p *BitStrReader) ReadNext() (int, error)
- func (p *BitStrReader) ReadSubByte(bitLen uint8) (byte, error)
- type Bits128
- func (v Bits128) AsByteString() ByteString
- func (v Bits128) AsBytes() []byte
- func (v Bits128) Compare(other Bits128) int
- func (v Bits128) CopyTo(p []byte) int
- func (v Bits128) CutOutUint64() uint64
- func (v Bits128) FixedByteSize() int
- func (v Bits128) FoldToUint64() uint64
- func (v Bits128) ReadAt(b []byte, off int64) (n int, err error)
- func (v Bits128) String() string
- func (v Bits128) WriteTo(w io.Writer) (int64, error)
- type Bits224
- func (v Bits224) AsByteString() ByteString
- func (v Bits224) AsBytes() []byte
- func (v Bits224) Compare(other Bits224) int
- func (v Bits224) CopyTo(p []byte) int
- func (v Bits224) CutOutUint64() uint64
- func (v Bits224) FixedByteSize() int
- func (v Bits224) FoldToUint64() uint64
- func (v Bits224) ReadAt(b []byte, off int64) (n int, err error)
- func (v Bits224) String() string
- func (v Bits224) WriteTo(w io.Writer) (int64, error)
- type Bits256
- func (v Bits256) AsByteString() ByteString
- func (v Bits256) AsBytes() []byte
- func (v Bits256) Compare(other Bits256) int
- func (v Bits256) CopyTo(p []byte) int
- func (v Bits256) CutOutUint64() uint64
- func (v Bits256) FixedByteSize() int
- func (v Bits256) FoldToBits128() (r Bits128)
- func (v Bits256) FoldToBits224() Bits224
- func (v Bits256) FoldToUint64() uint64
- func (v Bits256) ReadAt(b []byte, off int64) (n int, err error)
- func (v Bits256) String() string
- func (v Bits256) TruncateToBits224() (r Bits224)
- func (v Bits256) WriteTo(w io.Writer) (int64, error)
- type Bits512
- func (v Bits512) AsByteString() ByteString
- func (v Bits512) AsBytes() []byte
- func (v Bits512) Compare(other Bits512) int
- func (v Bits512) CopyTo(p []byte) int
- func (v Bits512) CutOutUint64() uint64
- func (v Bits512) FixedByteSize() int
- func (v Bits512) FoldToBits224() (r Bits224)
- func (v Bits512) FoldToBits256() (r Bits256)
- func (v Bits512) FoldToUint64() uint64
- func (v Bits512) ReadAt(b []byte, off int64) (n int, err error)
- func (v Bits512) String() string
- func (v Bits512) WriteTo(w io.Writer) (int64, error)
- type Bits64
- func (v Bits64) AsByteString() ByteString
- func (v Bits64) AsBytes() []byte
- func (v Bits64) Compare(other Bits64) int
- func (v Bits64) CopyTo(p []byte) int
- func (v Bits64) CutOutUint64() uint64
- func (v Bits64) FixedByteSize() int
- func (v Bits64) FoldToUint64() uint64
- func (v Bits64) ReadAt(b []byte, off int64) (n int, err error)
- func (v Bits64) String() string
- func (v Bits64) WriteTo(w io.Writer) (int64, error)
- type ByteString
- func (v ByteString) AsByteString() ByteString
- func (v ByteString) BitBool(index int) bool
- func (v ByteString) BitLen() int
- func (v ByteString) BitMasked(index int) (value byte, mask uint8)
- func (v ByteString) BitPos(index int) (bytePos int, bitPos uint8)
- func (v ByteString) BitValue(index int) byte
- func (v ByteString) Byte(index int) byte
- func (v ByteString) CopyTo(b []byte) int
- func (v ByteString) CutOutBits64() (folded Bits64)
- func (v ByteString) CutOutUint64() uint64
- func (v ByteString) Equal(other FixedReader) bool
- func (v ByteString) FixedByteSize() int
- func (v ByteString) FoldToBits64() (folded Bits64)
- func (v ByteString) FoldToUint64() uint64
- func (v ByteString) Hex() string
- func (v ByteString) IsEmpty() bool
- func (v ByteString) NewIoReader() io.Reader
- func (v ByteString) ReadAt(b []byte, off int64) (n int, err error)
- func (v ByteString) SearchBit(startAt int, bit bool) int
- func (v ByteString) String() string
- func (v ByteString) WriteTo(w io.Writer) (int64, error)
- type FixedReader
- type FixedReaderMock
- func (mmAsByteString *FixedReaderMock) AsByteString() (b1 ByteString)
- func (mmAsByteString *FixedReaderMock) AsByteStringAfterCounter() uint64
- func (mmAsByteString *FixedReaderMock) AsByteStringBeforeCounter() uint64
- func (mmCopyTo *FixedReaderMock) CopyTo(p []byte) (i1 int)
- func (mmCopyTo *FixedReaderMock) CopyToAfterCounter() uint64
- func (mmCopyTo *FixedReaderMock) CopyToBeforeCounter() uint64
- func (mmFixedByteSize *FixedReaderMock) FixedByteSize() (i1 int)
- func (mmFixedByteSize *FixedReaderMock) FixedByteSizeAfterCounter() uint64
- func (mmFixedByteSize *FixedReaderMock) FixedByteSizeBeforeCounter() uint64
- func (m *FixedReaderMock) MinimockAsByteStringDone() bool
- func (m *FixedReaderMock) MinimockAsByteStringInspect()
- func (m *FixedReaderMock) MinimockCopyToDone() bool
- func (m *FixedReaderMock) MinimockCopyToInspect()
- func (m *FixedReaderMock) MinimockFinish()
- func (m *FixedReaderMock) MinimockFixedByteSizeDone() bool
- func (m *FixedReaderMock) MinimockFixedByteSizeInspect()
- func (m *FixedReaderMock) MinimockWait(timeout mm_time.Duration)
- func (m *FixedReaderMock) MinimockWriteToDone() bool
- func (m *FixedReaderMock) MinimockWriteToInspect()
- func (mmWriteTo *FixedReaderMock) WriteTo(w io.Writer) (n int64, err error)
- func (mmWriteTo *FixedReaderMock) WriteToAfterCounter() uint64
- func (mmWriteTo *FixedReaderMock) WriteToBeforeCounter() uint64
- type FixedReaderMockAsByteStringExpectation
- type FixedReaderMockAsByteStringResults
- type FixedReaderMockCopyToExpectation
- type FixedReaderMockCopyToParams
- type FixedReaderMockCopyToResults
- type FixedReaderMockFixedByteSizeExpectation
- type FixedReaderMockFixedByteSizeResults
- type FixedReaderMockWriteToExpectation
- type FixedReaderMockWriteToParams
- type FixedReaderMockWriteToResults
- type Foldable
- type FoldableReader
- type FoldableReaderMock
- func (mmAsByteString *FoldableReaderMock) AsByteString() (b1 ByteString)
- func (mmAsByteString *FoldableReaderMock) AsByteStringAfterCounter() uint64
- func (mmAsByteString *FoldableReaderMock) AsByteStringBeforeCounter() uint64
- func (mmCopyTo *FoldableReaderMock) CopyTo(p []byte) (i1 int)
- func (mmCopyTo *FoldableReaderMock) CopyToAfterCounter() uint64
- func (mmCopyTo *FoldableReaderMock) CopyToBeforeCounter() uint64
- func (mmFixedByteSize *FoldableReaderMock) FixedByteSize() (i1 int)
- func (mmFixedByteSize *FoldableReaderMock) FixedByteSizeAfterCounter() uint64
- func (mmFixedByteSize *FoldableReaderMock) FixedByteSizeBeforeCounter() uint64
- func (mmFoldToUint64 *FoldableReaderMock) FoldToUint64() (u1 uint64)
- func (mmFoldToUint64 *FoldableReaderMock) FoldToUint64AfterCounter() uint64
- func (mmFoldToUint64 *FoldableReaderMock) FoldToUint64BeforeCounter() uint64
- func (m *FoldableReaderMock) MinimockAsByteStringDone() bool
- func (m *FoldableReaderMock) MinimockAsByteStringInspect()
- func (m *FoldableReaderMock) MinimockCopyToDone() bool
- func (m *FoldableReaderMock) MinimockCopyToInspect()
- func (m *FoldableReaderMock) MinimockFinish()
- func (m *FoldableReaderMock) MinimockFixedByteSizeDone() bool
- func (m *FoldableReaderMock) MinimockFixedByteSizeInspect()
- func (m *FoldableReaderMock) MinimockFoldToUint64Done() bool
- func (m *FoldableReaderMock) MinimockFoldToUint64Inspect()
- func (m *FoldableReaderMock) MinimockWait(timeout mm_time.Duration)
- func (m *FoldableReaderMock) MinimockWriteToDone() bool
- func (m *FoldableReaderMock) MinimockWriteToInspect()
- func (mmWriteTo *FoldableReaderMock) WriteTo(w io.Writer) (n int64, err error)
- func (mmWriteTo *FoldableReaderMock) WriteToAfterCounter() uint64
- func (mmWriteTo *FoldableReaderMock) WriteToBeforeCounter() uint64
- type FoldableReaderMockAsByteStringExpectation
- type FoldableReaderMockAsByteStringResults
- type FoldableReaderMockCopyToExpectation
- type FoldableReaderMockCopyToParams
- type FoldableReaderMockCopyToResults
- type FoldableReaderMockFixedByteSizeExpectation
- type FoldableReaderMockFixedByteSizeResults
- type FoldableReaderMockFoldToUint64Expectation
- type FoldableReaderMockFoldToUint64Results
- type FoldableReaderMockWriteToExpectation
- type FoldableReaderMockWriteToParams
- type FoldableReaderMockWriteToResults
- type IndexedBits
Constants ¶
const BitsStringPrefix = "0x"
const EmptyByteString = ByteString("")
Variables ¶
This section is empty.
Functions ¶
func AsBytes ¶
func AsBytes(v FixedReader) []byte
func BytesToDigestString ¶
func BytesToDigestString(s FoldableReader, prefix string) string
func BytesToGroupedString ¶
func Copy ¶
func Copy(to []byte, from FixedReader) error
func CutOutUint64 ¶
func Equal ¶
func Equal(t, o FixedReader) bool
func EqualToBytes ¶
func EqualToBytes(t FixedReader, o []byte) bool
func FillBitsWithStaticNoise ¶
This implementation DOES NOT provide secure random! This function has a fixed implementation and MUST remain unchanged as some elements of Consensus rely on identical behavior of this functions. Array size must be aligned to 8 bytes.
func FoldToUint64 ¶
func FoldUint64 ¶
Types ¶
type BitArrayReader ¶
type BitArrayReader struct {
// contains filtered or unexported fields
}
func NewBitArrayReader ¶
func NewBitArrayReader(direction BitBuilderOrder, bytes []byte) *BitArrayReader
func (*BitArrayReader) AlignOffset ¶
func (p *BitArrayReader) AlignOffset() uint8
func (*BitArrayReader) IsArrayDepleted ¶
func (p *BitArrayReader) IsArrayDepleted() bool
func (*BitArrayReader) ReadBit ¶
func (p *BitArrayReader) ReadBit() (int, error)
func (*BitArrayReader) ReadBool ¶
func (p *BitArrayReader) ReadBool() (bool, error)
func (*BitArrayReader) ReadByte ¶
func (p *BitArrayReader) ReadByte() (byte, error)
func (*BitArrayReader) ReadNext ¶
func (p *BitArrayReader) ReadNext() (int, error)
func (*BitArrayReader) ReadSubByte ¶
func (p *BitArrayReader) ReadSubByte(bitLen uint8) (byte, error)
type BitBuilder ¶
type BitBuilder struct {
// contains filtered or unexported fields
}
supports to be created as BitBuilder{} - it equals NewBitBuilder(LSB, 0)
func AppendBitBuilder ¶
func AppendBitBuilder(appendTo []byte, direction BitBuilderOrder) BitBuilder
func NewBitBuilder ¶
func NewBitBuilder(direction BitBuilderOrder, expectedByteLen int) BitBuilder
func (*BitBuilder) AlignOffset ¶
func (p *BitBuilder) AlignOffset() uint8
func (*BitBuilder) Append ¶
func (p *BitBuilder) Append(bit bool)
func (*BitBuilder) AppendAlignedByte ¶
func (p *BitBuilder) AppendAlignedByte(b byte)
func (*BitBuilder) AppendBit ¶
func (p *BitBuilder) AppendBit(bit int)
func (*BitBuilder) AppendByte ¶
func (p *BitBuilder) AppendByte(b byte)
func (*BitBuilder) AppendN ¶
func (p *BitBuilder) AppendN(bitCount int, bit bool)
func (*BitBuilder) AppendNBit ¶
func (p *BitBuilder) AppendNBit(bitCount int, bit int)
func (*BitBuilder) AppendSubByte ¶
func (p *BitBuilder) AppendSubByte(value byte, bitLen uint8)
func (*BitBuilder) BitLen ¶
func (p *BitBuilder) BitLen() int
func (*BitBuilder) CompletedByteCount ¶
func (p *BitBuilder) CompletedByteCount() int
func (*BitBuilder) Copy ¶
func (p *BitBuilder) Copy() *BitBuilder
func (*BitBuilder) Done ¶
func (p *BitBuilder) Done() (b []byte, bitLen int)
func (*BitBuilder) DoneToBits ¶
func (p *BitBuilder) DoneToBits() BitSlice
func (*BitBuilder) DoneToByteString ¶
func (p *BitBuilder) DoneToByteString() (ByteString, int)
func (*BitBuilder) DoneToBytes ¶
func (p *BitBuilder) DoneToBytes() []byte
func (*BitBuilder) IsZero ¶
func (p *BitBuilder) IsZero() bool
func (*BitBuilder) PadWith ¶
func (p *BitBuilder) PadWith(bit bool)
func (*BitBuilder) PadWithBit ¶
func (p *BitBuilder) PadWithBit(bit int)
func (*BitBuilder) Set ¶
func (p *BitBuilder) Set(index int, bit, padding bool)
func (*BitBuilder) SetBit ¶
func (p *BitBuilder) SetBit(index, bit int)
func (*BitBuilder) ToggleBit ¶
func (p *BitBuilder) ToggleBit(index int) bool
func (*BitBuilder) TrimZeros ¶
func (p *BitBuilder) TrimZeros() (skippedPrefix int, b []byte)
type BitBuilderOrder ¶
type BitBuilderOrder byte
const ( // Least significant bit is first - first AppendBit() appends the least significant bit LSB BitBuilderOrder = 0 // Most significant bit is first - first AppendBit() appends the most significant bit MSB BitBuilderOrder = 1 )
type BitIoReader ¶
type BitIoReader struct {
// contains filtered or unexported fields
}
func NewBitIoReader ¶
func NewBitIoReader(order BitBuilderOrder, byteReader io.ByteReader) *BitIoReader
func (*BitIoReader) AlignOffset ¶
func (p *BitIoReader) AlignOffset() uint8
func (*BitIoReader) ReadBit ¶
func (p *BitIoReader) ReadBit() (int, error)
func (*BitIoReader) ReadBool ¶
func (p *BitIoReader) ReadBool() (bool, error)
func (*BitIoReader) ReadByte ¶
func (p *BitIoReader) ReadByte() (byte, error)
func (*BitIoReader) ReadNext ¶
func (p *BitIoReader) ReadNext() (int, error)
func (*BitIoReader) ReadSubByte ¶
func (p *BitIoReader) ReadSubByte(bitLen uint8) (byte, error)
type BitSlice ¶
type BitSlice = BitSliceLSB
type BitSliceLSB ¶
type BitSliceLSB []byte
func (BitSliceLSB) BitBool ¶
func (v BitSliceLSB) BitBool(index int) bool
func (BitSliceLSB) BitLen ¶
func (v BitSliceLSB) BitLen() int
func (BitSliceLSB) BitValue ¶
func (v BitSliceLSB) BitValue(index int) byte
func (BitSliceLSB) Byte ¶
func (v BitSliceLSB) Byte(index int) byte
type BitSliceMSB ¶
type BitSliceMSB []byte
func (BitSliceMSB) BitBool ¶
func (v BitSliceMSB) BitBool(index int) bool
func (BitSliceMSB) BitLen ¶
func (v BitSliceMSB) BitLen() int
func (BitSliceMSB) BitValue ¶
func (v BitSliceMSB) BitValue(index int) byte
func (BitSliceMSB) Byte ¶
func (v BitSliceMSB) Byte(index int) byte
type BitStrReader ¶
type BitStrReader struct {
// contains filtered or unexported fields
}
func NewBitStrReader ¶
func NewBitStrReader(direction BitBuilderOrder, bytes ByteString) *BitStrReader
func (*BitStrReader) AlignOffset ¶
func (p *BitStrReader) AlignOffset() uint8
func (*BitStrReader) IsArrayDepleted ¶
func (p *BitStrReader) IsArrayDepleted() bool
func (*BitStrReader) ReadBit ¶
func (p *BitStrReader) ReadBit() (int, error)
func (*BitStrReader) ReadBool ¶
func (p *BitStrReader) ReadBool() (bool, error)
func (*BitStrReader) ReadByte ¶
func (p *BitStrReader) ReadByte() (byte, error)
func (*BitStrReader) ReadNext ¶
func (p *BitStrReader) ReadNext() (int, error)
func (*BitStrReader) ReadSubByte ¶
func (p *BitStrReader) ReadSubByte(bitLen uint8) (byte, error)
type Bits128 ¶
type Bits128 [16]byte
func NewBits128 ¶
func NewBits128FromBytes ¶
func (Bits128) AsByteString ¶
func (v Bits128) AsByteString() ByteString
func (Bits128) CutOutUint64 ¶
func (Bits128) FixedByteSize ¶
func (Bits128) FoldToUint64 ¶
type Bits224 ¶
type Bits224 [28]byte
func NewBits224FromBytes ¶
func (Bits224) AsByteString ¶
func (v Bits224) AsByteString() ByteString
func (Bits224) CutOutUint64 ¶
func (Bits224) FixedByteSize ¶
func (Bits224) FoldToUint64 ¶
type Bits256 ¶
type Bits256 [32]byte
func NewBits256FromBytes ¶
func (Bits256) AsByteString ¶
func (v Bits256) AsByteString() ByteString
func (Bits256) CutOutUint64 ¶
func (Bits256) FixedByteSize ¶
func (Bits256) FoldToBits128 ¶
func (Bits256) FoldToBits224 ¶
func (Bits256) FoldToUint64 ¶
func (Bits256) TruncateToBits224 ¶
TruncateToBits224 returns leftmost bits, and it is compliant with cryptography standards, e.g. FIPS 180‑4 and SP 800-107
type Bits512 ¶
type Bits512 [64]byte
func NewBits512FromBytes ¶
func (Bits512) AsByteString ¶
func (v Bits512) AsByteString() ByteString
func (Bits512) CutOutUint64 ¶
func (Bits512) FixedByteSize ¶
func (Bits512) FoldToBits224 ¶
func (Bits512) FoldToBits256 ¶
func (Bits512) FoldToUint64 ¶
type Bits64 ¶
type Bits64 [8]byte
func CutOutBits64 ¶
CutOutBits64 either copies all bytes or picks evenly bytes from (v). Sizes do not need to be aligned. WARNING! This is NOT compliant with cryptography standards, e.g. FIPS 180‑4 and SP 800-107
func FoldToBits64 ¶
Array size doesnt need to be aligned
func NewBits64FromBytes ¶
func (Bits64) AsByteString ¶
func (v Bits64) AsByteString() ByteString
func (Bits64) CutOutUint64 ¶
func (Bits64) FixedByteSize ¶
func (Bits64) FoldToUint64 ¶
type ByteString ¶
type ByteString string
func CopyBytes ¶
func CopyBytes(v []byte) ByteString
func Fill ¶
func Fill(len int, fill byte) ByteString
func WrapStr ¶
func WrapStr(s string) ByteString
func Zero ¶
func Zero(len int) ByteString
func (ByteString) AsByteString ¶
func (v ByteString) AsByteString() ByteString
func (ByteString) BitBool ¶
func (v ByteString) BitBool(index int) bool
func (ByteString) BitLen ¶
func (v ByteString) BitLen() int
func (ByteString) BitValue ¶
func (v ByteString) BitValue(index int) byte
func (ByteString) Byte ¶
func (v ByteString) Byte(index int) byte
func (ByteString) CopyTo ¶
func (v ByteString) CopyTo(b []byte) int
func (ByteString) CutOutBits64 ¶
func (v ByteString) CutOutBits64() (folded Bits64)
func (ByteString) CutOutUint64 ¶
func (v ByteString) CutOutUint64() uint64
func (ByteString) Equal ¶
func (v ByteString) Equal(other FixedReader) bool
func (ByteString) FixedByteSize ¶
func (v ByteString) FixedByteSize() int
func (ByteString) FoldToBits64 ¶
func (v ByteString) FoldToBits64() (folded Bits64)
func (ByteString) FoldToUint64 ¶
func (v ByteString) FoldToUint64() uint64
func (ByteString) Hex ¶
func (v ByteString) Hex() string
func (ByteString) IsEmpty ¶
func (v ByteString) IsEmpty() bool
func (ByteString) NewIoReader ¶
func (v ByteString) NewIoReader() io.Reader
func (ByteString) String ¶
func (v ByteString) String() string
type FixedReader ¶
type FixedReaderMock ¶
type FixedReaderMock struct { AsByteStringMock mFixedReaderMockAsByteString CopyToMock mFixedReaderMockCopyTo FixedByteSizeMock mFixedReaderMockFixedByteSize WriteToMock mFixedReaderMockWriteTo // contains filtered or unexported fields }
FixedReaderMock implements FixedReader
func NewFixedReaderMock ¶
func NewFixedReaderMock(t minimock.Tester) *FixedReaderMock
NewFixedReaderMock returns a mock for FixedReader
func (*FixedReaderMock) AsByteString ¶
func (mmAsByteString *FixedReaderMock) AsByteString() (b1 ByteString)
AsByteString implements FixedReader
func (*FixedReaderMock) AsByteStringAfterCounter ¶
func (mmAsByteString *FixedReaderMock) AsByteStringAfterCounter() uint64
AsByteStringAfterCounter returns a count of finished FixedReaderMock.AsByteString invocations
func (*FixedReaderMock) AsByteStringBeforeCounter ¶
func (mmAsByteString *FixedReaderMock) AsByteStringBeforeCounter() uint64
AsByteStringBeforeCounter returns a count of FixedReaderMock.AsByteString invocations
func (*FixedReaderMock) CopyTo ¶
func (mmCopyTo *FixedReaderMock) CopyTo(p []byte) (i1 int)
CopyTo implements FixedReader
func (*FixedReaderMock) CopyToAfterCounter ¶
func (mmCopyTo *FixedReaderMock) CopyToAfterCounter() uint64
CopyToAfterCounter returns a count of finished FixedReaderMock.CopyTo invocations
func (*FixedReaderMock) CopyToBeforeCounter ¶
func (mmCopyTo *FixedReaderMock) CopyToBeforeCounter() uint64
CopyToBeforeCounter returns a count of FixedReaderMock.CopyTo invocations
func (*FixedReaderMock) FixedByteSize ¶
func (mmFixedByteSize *FixedReaderMock) FixedByteSize() (i1 int)
FixedByteSize implements FixedReader
func (*FixedReaderMock) FixedByteSizeAfterCounter ¶
func (mmFixedByteSize *FixedReaderMock) FixedByteSizeAfterCounter() uint64
FixedByteSizeAfterCounter returns a count of finished FixedReaderMock.FixedByteSize invocations
func (*FixedReaderMock) FixedByteSizeBeforeCounter ¶
func (mmFixedByteSize *FixedReaderMock) FixedByteSizeBeforeCounter() uint64
FixedByteSizeBeforeCounter returns a count of FixedReaderMock.FixedByteSize invocations
func (*FixedReaderMock) MinimockAsByteStringDone ¶
func (m *FixedReaderMock) MinimockAsByteStringDone() bool
MinimockAsByteStringDone returns true if the count of the AsByteString invocations corresponds the number of defined expectations
func (*FixedReaderMock) MinimockAsByteStringInspect ¶
func (m *FixedReaderMock) MinimockAsByteStringInspect()
MinimockAsByteStringInspect logs each unmet expectation
func (*FixedReaderMock) MinimockCopyToDone ¶
func (m *FixedReaderMock) MinimockCopyToDone() bool
MinimockCopyToDone returns true if the count of the CopyTo invocations corresponds the number of defined expectations
func (*FixedReaderMock) MinimockCopyToInspect ¶
func (m *FixedReaderMock) MinimockCopyToInspect()
MinimockCopyToInspect logs each unmet expectation
func (*FixedReaderMock) MinimockFinish ¶
func (m *FixedReaderMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*FixedReaderMock) MinimockFixedByteSizeDone ¶
func (m *FixedReaderMock) MinimockFixedByteSizeDone() bool
MinimockFixedByteSizeDone returns true if the count of the FixedByteSize invocations corresponds the number of defined expectations
func (*FixedReaderMock) MinimockFixedByteSizeInspect ¶
func (m *FixedReaderMock) MinimockFixedByteSizeInspect()
MinimockFixedByteSizeInspect logs each unmet expectation
func (*FixedReaderMock) MinimockWait ¶
func (m *FixedReaderMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*FixedReaderMock) MinimockWriteToDone ¶
func (m *FixedReaderMock) MinimockWriteToDone() bool
MinimockWriteToDone returns true if the count of the WriteTo invocations corresponds the number of defined expectations
func (*FixedReaderMock) MinimockWriteToInspect ¶
func (m *FixedReaderMock) MinimockWriteToInspect()
MinimockWriteToInspect logs each unmet expectation
func (*FixedReaderMock) WriteTo ¶
func (mmWriteTo *FixedReaderMock) WriteTo(w io.Writer) (n int64, err error)
WriteTo implements FixedReader
func (*FixedReaderMock) WriteToAfterCounter ¶
func (mmWriteTo *FixedReaderMock) WriteToAfterCounter() uint64
WriteToAfterCounter returns a count of finished FixedReaderMock.WriteTo invocations
func (*FixedReaderMock) WriteToBeforeCounter ¶
func (mmWriteTo *FixedReaderMock) WriteToBeforeCounter() uint64
WriteToBeforeCounter returns a count of FixedReaderMock.WriteTo invocations
type FixedReaderMockAsByteStringExpectation ¶
type FixedReaderMockAsByteStringExpectation struct { Counter uint64 // contains filtered or unexported fields }
FixedReaderMockAsByteStringExpectation specifies expectation struct of the FixedReader.AsByteString
type FixedReaderMockAsByteStringResults ¶
type FixedReaderMockAsByteStringResults struct {
// contains filtered or unexported fields
}
FixedReaderMockAsByteStringResults contains results of the FixedReader.AsByteString
type FixedReaderMockCopyToExpectation ¶
type FixedReaderMockCopyToExpectation struct { Counter uint64 // contains filtered or unexported fields }
FixedReaderMockCopyToExpectation specifies expectation struct of the FixedReader.CopyTo
func (*FixedReaderMockCopyToExpectation) Then ¶
func (e *FixedReaderMockCopyToExpectation) Then(i1 int) *FixedReaderMock
Then sets up FixedReader.CopyTo return parameters for the expectation previously defined by the When method
type FixedReaderMockCopyToParams ¶
type FixedReaderMockCopyToParams struct {
// contains filtered or unexported fields
}
FixedReaderMockCopyToParams contains parameters of the FixedReader.CopyTo
type FixedReaderMockCopyToResults ¶
type FixedReaderMockCopyToResults struct {
// contains filtered or unexported fields
}
FixedReaderMockCopyToResults contains results of the FixedReader.CopyTo
type FixedReaderMockFixedByteSizeExpectation ¶
type FixedReaderMockFixedByteSizeExpectation struct { Counter uint64 // contains filtered or unexported fields }
FixedReaderMockFixedByteSizeExpectation specifies expectation struct of the FixedReader.FixedByteSize
type FixedReaderMockFixedByteSizeResults ¶
type FixedReaderMockFixedByteSizeResults struct {
// contains filtered or unexported fields
}
FixedReaderMockFixedByteSizeResults contains results of the FixedReader.FixedByteSize
type FixedReaderMockWriteToExpectation ¶
type FixedReaderMockWriteToExpectation struct { Counter uint64 // contains filtered or unexported fields }
FixedReaderMockWriteToExpectation specifies expectation struct of the FixedReader.WriteTo
func (*FixedReaderMockWriteToExpectation) Then ¶
func (e *FixedReaderMockWriteToExpectation) Then(n int64, err error) *FixedReaderMock
Then sets up FixedReader.WriteTo return parameters for the expectation previously defined by the When method
type FixedReaderMockWriteToParams ¶
type FixedReaderMockWriteToParams struct {
// contains filtered or unexported fields
}
FixedReaderMockWriteToParams contains parameters of the FixedReader.WriteTo
type FixedReaderMockWriteToResults ¶
type FixedReaderMockWriteToResults struct {
// contains filtered or unexported fields
}
FixedReaderMockWriteToResults contains results of the FixedReader.WriteTo
type FoldableReader ¶
type FoldableReader interface { FixedReader Foldable }
func CopyFixed ¶
func CopyFixed(v FixedReader) FoldableReader
func WrapBytes ¶
func WrapBytes(data []byte) FoldableReader
type FoldableReaderMock ¶
type FoldableReaderMock struct { AsByteStringMock mFoldableReaderMockAsByteString CopyToMock mFoldableReaderMockCopyTo FixedByteSizeMock mFoldableReaderMockFixedByteSize FoldToUint64Mock mFoldableReaderMockFoldToUint64 WriteToMock mFoldableReaderMockWriteTo // contains filtered or unexported fields }
FoldableReaderMock implements FoldableReader
func NewFoldableReaderMock ¶
func NewFoldableReaderMock(t minimock.Tester) *FoldableReaderMock
NewFoldableReaderMock returns a mock for FoldableReader
func (*FoldableReaderMock) AsByteString ¶
func (mmAsByteString *FoldableReaderMock) AsByteString() (b1 ByteString)
AsByteString implements FoldableReader
func (*FoldableReaderMock) AsByteStringAfterCounter ¶
func (mmAsByteString *FoldableReaderMock) AsByteStringAfterCounter() uint64
AsByteStringAfterCounter returns a count of finished FoldableReaderMock.AsByteString invocations
func (*FoldableReaderMock) AsByteStringBeforeCounter ¶
func (mmAsByteString *FoldableReaderMock) AsByteStringBeforeCounter() uint64
AsByteStringBeforeCounter returns a count of FoldableReaderMock.AsByteString invocations
func (*FoldableReaderMock) CopyTo ¶
func (mmCopyTo *FoldableReaderMock) CopyTo(p []byte) (i1 int)
CopyTo implements FoldableReader
func (*FoldableReaderMock) CopyToAfterCounter ¶
func (mmCopyTo *FoldableReaderMock) CopyToAfterCounter() uint64
CopyToAfterCounter returns a count of finished FoldableReaderMock.CopyTo invocations
func (*FoldableReaderMock) CopyToBeforeCounter ¶
func (mmCopyTo *FoldableReaderMock) CopyToBeforeCounter() uint64
CopyToBeforeCounter returns a count of FoldableReaderMock.CopyTo invocations
func (*FoldableReaderMock) FixedByteSize ¶
func (mmFixedByteSize *FoldableReaderMock) FixedByteSize() (i1 int)
FixedByteSize implements FoldableReader
func (*FoldableReaderMock) FixedByteSizeAfterCounter ¶
func (mmFixedByteSize *FoldableReaderMock) FixedByteSizeAfterCounter() uint64
FixedByteSizeAfterCounter returns a count of finished FoldableReaderMock.FixedByteSize invocations
func (*FoldableReaderMock) FixedByteSizeBeforeCounter ¶
func (mmFixedByteSize *FoldableReaderMock) FixedByteSizeBeforeCounter() uint64
FixedByteSizeBeforeCounter returns a count of FoldableReaderMock.FixedByteSize invocations
func (*FoldableReaderMock) FoldToUint64 ¶
func (mmFoldToUint64 *FoldableReaderMock) FoldToUint64() (u1 uint64)
FoldToUint64 implements FoldableReader
func (*FoldableReaderMock) FoldToUint64AfterCounter ¶
func (mmFoldToUint64 *FoldableReaderMock) FoldToUint64AfterCounter() uint64
FoldToUint64AfterCounter returns a count of finished FoldableReaderMock.FoldToUint64 invocations
func (*FoldableReaderMock) FoldToUint64BeforeCounter ¶
func (mmFoldToUint64 *FoldableReaderMock) FoldToUint64BeforeCounter() uint64
FoldToUint64BeforeCounter returns a count of FoldableReaderMock.FoldToUint64 invocations
func (*FoldableReaderMock) MinimockAsByteStringDone ¶
func (m *FoldableReaderMock) MinimockAsByteStringDone() bool
MinimockAsByteStringDone returns true if the count of the AsByteString invocations corresponds the number of defined expectations
func (*FoldableReaderMock) MinimockAsByteStringInspect ¶
func (m *FoldableReaderMock) MinimockAsByteStringInspect()
MinimockAsByteStringInspect logs each unmet expectation
func (*FoldableReaderMock) MinimockCopyToDone ¶
func (m *FoldableReaderMock) MinimockCopyToDone() bool
MinimockCopyToDone returns true if the count of the CopyTo invocations corresponds the number of defined expectations
func (*FoldableReaderMock) MinimockCopyToInspect ¶
func (m *FoldableReaderMock) MinimockCopyToInspect()
MinimockCopyToInspect logs each unmet expectation
func (*FoldableReaderMock) MinimockFinish ¶
func (m *FoldableReaderMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*FoldableReaderMock) MinimockFixedByteSizeDone ¶
func (m *FoldableReaderMock) MinimockFixedByteSizeDone() bool
MinimockFixedByteSizeDone returns true if the count of the FixedByteSize invocations corresponds the number of defined expectations
func (*FoldableReaderMock) MinimockFixedByteSizeInspect ¶
func (m *FoldableReaderMock) MinimockFixedByteSizeInspect()
MinimockFixedByteSizeInspect logs each unmet expectation
func (*FoldableReaderMock) MinimockFoldToUint64Done ¶
func (m *FoldableReaderMock) MinimockFoldToUint64Done() bool
MinimockFoldToUint64Done returns true if the count of the FoldToUint64 invocations corresponds the number of defined expectations
func (*FoldableReaderMock) MinimockFoldToUint64Inspect ¶
func (m *FoldableReaderMock) MinimockFoldToUint64Inspect()
MinimockFoldToUint64Inspect logs each unmet expectation
func (*FoldableReaderMock) MinimockWait ¶
func (m *FoldableReaderMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*FoldableReaderMock) MinimockWriteToDone ¶
func (m *FoldableReaderMock) MinimockWriteToDone() bool
MinimockWriteToDone returns true if the count of the WriteTo invocations corresponds the number of defined expectations
func (*FoldableReaderMock) MinimockWriteToInspect ¶
func (m *FoldableReaderMock) MinimockWriteToInspect()
MinimockWriteToInspect logs each unmet expectation
func (*FoldableReaderMock) WriteTo ¶
func (mmWriteTo *FoldableReaderMock) WriteTo(w io.Writer) (n int64, err error)
WriteTo implements FoldableReader
func (*FoldableReaderMock) WriteToAfterCounter ¶
func (mmWriteTo *FoldableReaderMock) WriteToAfterCounter() uint64
WriteToAfterCounter returns a count of finished FoldableReaderMock.WriteTo invocations
func (*FoldableReaderMock) WriteToBeforeCounter ¶
func (mmWriteTo *FoldableReaderMock) WriteToBeforeCounter() uint64
WriteToBeforeCounter returns a count of FoldableReaderMock.WriteTo invocations
type FoldableReaderMockAsByteStringExpectation ¶
type FoldableReaderMockAsByteStringExpectation struct { Counter uint64 // contains filtered or unexported fields }
FoldableReaderMockAsByteStringExpectation specifies expectation struct of the FoldableReader.AsByteString
type FoldableReaderMockAsByteStringResults ¶
type FoldableReaderMockAsByteStringResults struct {
// contains filtered or unexported fields
}
FoldableReaderMockAsByteStringResults contains results of the FoldableReader.AsByteString
type FoldableReaderMockCopyToExpectation ¶
type FoldableReaderMockCopyToExpectation struct { Counter uint64 // contains filtered or unexported fields }
FoldableReaderMockCopyToExpectation specifies expectation struct of the FoldableReader.CopyTo
func (*FoldableReaderMockCopyToExpectation) Then ¶
func (e *FoldableReaderMockCopyToExpectation) Then(i1 int) *FoldableReaderMock
Then sets up FoldableReader.CopyTo return parameters for the expectation previously defined by the When method
type FoldableReaderMockCopyToParams ¶
type FoldableReaderMockCopyToParams struct {
// contains filtered or unexported fields
}
FoldableReaderMockCopyToParams contains parameters of the FoldableReader.CopyTo
type FoldableReaderMockCopyToResults ¶
type FoldableReaderMockCopyToResults struct {
// contains filtered or unexported fields
}
FoldableReaderMockCopyToResults contains results of the FoldableReader.CopyTo
type FoldableReaderMockFixedByteSizeExpectation ¶
type FoldableReaderMockFixedByteSizeExpectation struct { Counter uint64 // contains filtered or unexported fields }
FoldableReaderMockFixedByteSizeExpectation specifies expectation struct of the FoldableReader.FixedByteSize
type FoldableReaderMockFixedByteSizeResults ¶
type FoldableReaderMockFixedByteSizeResults struct {
// contains filtered or unexported fields
}
FoldableReaderMockFixedByteSizeResults contains results of the FoldableReader.FixedByteSize
type FoldableReaderMockFoldToUint64Expectation ¶
type FoldableReaderMockFoldToUint64Expectation struct { Counter uint64 // contains filtered or unexported fields }
FoldableReaderMockFoldToUint64Expectation specifies expectation struct of the FoldableReader.FoldToUint64
type FoldableReaderMockFoldToUint64Results ¶
type FoldableReaderMockFoldToUint64Results struct {
// contains filtered or unexported fields
}
FoldableReaderMockFoldToUint64Results contains results of the FoldableReader.FoldToUint64
type FoldableReaderMockWriteToExpectation ¶
type FoldableReaderMockWriteToExpectation struct { Counter uint64 // contains filtered or unexported fields }
FoldableReaderMockWriteToExpectation specifies expectation struct of the FoldableReader.WriteTo
func (*FoldableReaderMockWriteToExpectation) Then ¶
func (e *FoldableReaderMockWriteToExpectation) Then(n int64, err error) *FoldableReaderMock
Then sets up FoldableReader.WriteTo return parameters for the expectation previously defined by the When method
type FoldableReaderMockWriteToParams ¶
type FoldableReaderMockWriteToParams struct {
// contains filtered or unexported fields
}
FoldableReaderMockWriteToParams contains parameters of the FoldableReader.WriteTo
type FoldableReaderMockWriteToResults ¶
type FoldableReaderMockWriteToResults struct {
// contains filtered or unexported fields
}
FoldableReaderMockWriteToResults contains results of the FoldableReader.WriteTo