longbits

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 11 Imported by: 11

Documentation

Index

Constants

View Source
const BitsStringPrefix = "0x"
View Source
const EmptyByteString = ByteString("")

Variables

This section is empty.

Functions

func BitPos

func BitPos(index int) (bytePos int, bitPos uint8)

func BytesToDigestString

func BytesToDigestString(s FoldableReader, prefix string) string

func BytesToGroupedString

func BytesToGroupedString(s []byte, prefix string, separator string, everyN int) string

func EqualFixedLenWriterTo

func EqualFixedLenWriterTo(t, o FixedReader) bool

func FillBitsWithStaticNoise

func FillBitsWithStaticNoise(base uint32, v []byte)

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 FoldToUint64(v []byte) uint64

Array size must be aligned to 8 bytes

func FoldUint64

func FoldUint64(v uint64) uint32

func ReadFixedSize

func ReadFixedSize(v FoldableReader) []byte

Types

type BitBuilder

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

func NewBitBuilder

func NewBitBuilder(expectedLen int) BitBuilder

func (BitBuilder) Append

func (p BitBuilder) Append(bit bool) BitBuilder

func (BitBuilder) AppendN

func (p BitBuilder) AppendN(bitCount int, bit bool) BitBuilder

func (BitBuilder) Copy

func (p BitBuilder) Copy() BitBuilder

func (BitBuilder) Done

func (p BitBuilder) Done() ([]byte, int)

func (BitBuilder) DoneAndCopy

func (p BitBuilder) DoneAndCopy() ([]byte, int)

func (BitBuilder) DoneToByteString

func (p BitBuilder) DoneToByteString() (ByteString, int)

func (BitBuilder) IsZero

func (p BitBuilder) IsZero() bool

func (BitBuilder) Len

func (p BitBuilder) Len() int

type Bits128

type Bits128 [16]byte

func NewBits128

func NewBits128(lo, hi uint64) Bits128

func NewBits128FromBytes

func NewBits128FromBytes(bytes []byte) *Bits128

func (*Bits128) AsByteString

func (v *Bits128) AsByteString() ByteString

func (*Bits128) AsBytes

func (v *Bits128) AsBytes() []byte

func (Bits128) Compare

func (v Bits128) Compare(other Bits128) int

func (*Bits128) FixedByteSize

func (v *Bits128) FixedByteSize() int

func (*Bits128) FoldToUint64

func (v *Bits128) FoldToUint64() uint64

func (*Bits128) Read

func (v *Bits128) Read(p []byte) (n int, err error)

func (Bits128) String

func (v Bits128) String() string

func (*Bits128) WriteTo

func (v *Bits128) WriteTo(w io.Writer) (int64, error)

type Bits224

type Bits224 [28]byte

func NewBits224FromBytes

func NewBits224FromBytes(bytes []byte) *Bits224

func (*Bits224) AsByteString

func (v *Bits224) AsByteString() ByteString

func (*Bits224) AsBytes

func (v *Bits224) AsBytes() []byte

func (Bits224) Compare

func (v Bits224) Compare(other Bits224) int

func (*Bits224) FixedByteSize

func (v *Bits224) FixedByteSize() int

func (*Bits224) FoldToUint64

func (v *Bits224) FoldToUint64() uint64

func (*Bits224) Read

func (v *Bits224) Read(p []byte) (n int, err error)

func (Bits224) String

func (v Bits224) String() string

func (*Bits224) WriteTo

func (v *Bits224) WriteTo(w io.Writer) (int64, error)

type Bits256

type Bits256 [32]byte

func NewBits256FromBytes

func NewBits256FromBytes(bytes []byte) *Bits256

func (*Bits256) AsByteString

func (v *Bits256) AsByteString() ByteString

func (*Bits256) AsBytes

func (v *Bits256) AsBytes() []byte

func (Bits256) Compare

func (v Bits256) Compare(other Bits256) int

func (*Bits256) FixedByteSize

func (v *Bits256) FixedByteSize() int

func (*Bits256) FoldToBits128

func (v *Bits256) FoldToBits128() Bits128

func (*Bits256) FoldToBits224

func (v *Bits256) FoldToBits224() Bits224

func (*Bits256) FoldToUint64

func (v *Bits256) FoldToUint64() uint64

func (*Bits256) Read

func (v *Bits256) Read(p []byte) (n int, err error)

func (Bits256) String

func (v Bits256) String() string

func (*Bits256) WriteTo

func (v *Bits256) WriteTo(w io.Writer) (int64, error)

type Bits512

type Bits512 [64]byte

func NewBits512FromBytes

func NewBits512FromBytes(bytes []byte) *Bits512

func (*Bits512) AsByteString

func (v *Bits512) AsByteString() ByteString

func (*Bits512) AsBytes

func (v *Bits512) AsBytes() []byte

func (Bits512) Compare

func (v Bits512) Compare(other Bits512) int

func (*Bits512) FixedByteSize

func (v *Bits512) FixedByteSize() int

func (*Bits512) FoldToBits224

func (v *Bits512) FoldToBits224() Bits224

func (*Bits512) FoldToBits256

func (v *Bits512) FoldToBits256() Bits256

func (*Bits512) FoldToUint64

func (v *Bits512) FoldToUint64() uint64

func (*Bits512) Read

func (v *Bits512) Read(p []byte) (n int, err error)

func (Bits512) String

func (v Bits512) String() string

func (*Bits512) WriteTo

func (v *Bits512) WriteTo(w io.Writer) (int64, error)

type Bits64

type Bits64 [8]byte

func FoldToBits64

func FoldToBits64(v []byte) Bits64

Array size doesnt need to be aligned

func NewBits64

func NewBits64(v uint64) Bits64

func NewBits64FromBytes

func NewBits64FromBytes(bytes []byte) *Bits64

func (*Bits64) AsByteString

func (v *Bits64) AsByteString() ByteString

func (*Bits64) AsBytes

func (v *Bits64) AsBytes() []byte

func (Bits64) Compare

func (v Bits64) Compare(other Bits64) int

func (*Bits64) FixedByteSize

func (v *Bits64) FixedByteSize() int

func (*Bits64) FoldToUint64

func (v *Bits64) FoldToUint64() uint64

func (*Bits64) Read

func (v *Bits64) Read(p []byte) (n int, err error)

func (Bits64) String

func (v Bits64) String() string

func (*Bits64) WriteTo

func (v *Bits64) WriteTo(w io.Writer) (int64, error)

type ByteString

type ByteString string

func NewByteString

func NewByteString(v []byte) ByteString

func NewByteStringOf

func NewByteStringOf(s string) ByteString

func NewFillByteString

func NewFillByteString(len int, fill byte) ByteString

func NewZeroByteString

func NewZeroByteString(len int) ByteString

func (*ByteString) AsByteString

func (v *ByteString) AsByteString() ByteString

func (*ByteString) AsBytes

func (v *ByteString) AsBytes() []byte

func (ByteString) AsReader

func (v ByteString) AsReader() FoldableReader

func (ByteString) BitBool

func (v ByteString) BitBool(index int) bool

func (ByteString) BitByte

func (v ByteString) BitByte(index int) byte

func (ByteString) BitLen

func (v ByteString) BitLen() int

func (ByteString) BitMasked

func (v ByteString) BitMasked(index int) (value byte, mask uint8)

func (ByteString) BitPos

func (v ByteString) BitPos(index int) (bytePos int, bitPos uint8)

func (ByteString) Byte

func (v ByteString) Byte(index int) byte

func (*ByteString) FixedByteSize

func (v *ByteString) FixedByteSize() int

func (ByteString) FoldToBits64

func (v ByteString) FoldToBits64() Bits64

func (*ByteString) FoldToUint64

func (v *ByteString) FoldToUint64() uint64

func (*ByteString) Read

func (v *ByteString) Read(p []byte) (n int, err error)

func (ByteString) SearchBit

func (v ByteString) SearchBit(startAt int, bit bool) int

func (ByteString) String

func (v ByteString) String() string

func (*ByteString) WriteTo

func (v *ByteString) WriteTo(w io.Writer) (int64, error)

type FixedReader

type FixedReader interface {
	io.WriterTo
	io.Reader
	AsBytes() []byte
	AsByteString() ByteString

	FixedByteSize() int
}

func NewFixedReader

func NewFixedReader(data []byte) FixedReader

func NewImmutableFixedSize

func NewImmutableFixedSize(data []byte) FixedReader

func NewMutableFixedSize

func NewMutableFixedSize(data []byte) FixedReader

type FixedReaderMock

type FixedReaderMock struct {
	AsByteStringMock mFixedReaderMockAsByteString

	AsBytesMock mFixedReaderMockAsBytes

	FixedByteSizeMock mFixedReaderMockFixedByteSize

	ReadMock mFixedReaderMockRead

	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) AsBytes

func (mmAsBytes *FixedReaderMock) AsBytes() (ba1 []byte)

AsBytes implements FixedReader

func (*FixedReaderMock) AsBytesAfterCounter

func (mmAsBytes *FixedReaderMock) AsBytesAfterCounter() uint64

AsBytesAfterCounter returns a count of finished FixedReaderMock.AsBytes invocations

func (*FixedReaderMock) AsBytesBeforeCounter

func (mmAsBytes *FixedReaderMock) AsBytesBeforeCounter() uint64

AsBytesBeforeCounter returns a count of FixedReaderMock.AsBytes 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) MinimockAsBytesDone

func (m *FixedReaderMock) MinimockAsBytesDone() bool

MinimockAsBytesDone returns true if the count of the AsBytes invocations corresponds the number of defined expectations

func (*FixedReaderMock) MinimockAsBytesInspect

func (m *FixedReaderMock) MinimockAsBytesInspect()

MinimockAsBytesInspect 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) MinimockReadDone

func (m *FixedReaderMock) MinimockReadDone() bool

MinimockReadDone returns true if the count of the Read invocations corresponds the number of defined expectations

func (*FixedReaderMock) MinimockReadInspect

func (m *FixedReaderMock) MinimockReadInspect()

MinimockReadInspect 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) Read

func (mmRead *FixedReaderMock) Read(p []byte) (n int, err error)

Read implements FixedReader

func (*FixedReaderMock) ReadAfterCounter

func (mmRead *FixedReaderMock) ReadAfterCounter() uint64

ReadAfterCounter returns a count of finished FixedReaderMock.Read invocations

func (*FixedReaderMock) ReadBeforeCounter

func (mmRead *FixedReaderMock) ReadBeforeCounter() uint64

ReadBeforeCounter returns a count of FixedReaderMock.Read invocations

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 FixedReaderMockAsBytesExpectation

type FixedReaderMockAsBytesExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

FixedReaderMockAsBytesExpectation specifies expectation struct of the FixedReader.AsBytes

type FixedReaderMockAsBytesResults

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

FixedReaderMockAsBytesResults contains results of the FixedReader.AsBytes

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 FixedReaderMockReadExpectation

type FixedReaderMockReadExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

FixedReaderMockReadExpectation specifies expectation struct of the FixedReader.Read

func (*FixedReaderMockReadExpectation) Then

Then sets up FixedReader.Read return parameters for the expectation previously defined by the When method

type FixedReaderMockReadParams

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

FixedReaderMockReadParams contains parameters of the FixedReader.Read

type FixedReaderMockReadResults

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

FixedReaderMockReadResults contains results of the FixedReader.Read

type FixedReaderMockWriteToExpectation

type FixedReaderMockWriteToExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

FixedReaderMockWriteToExpectation specifies expectation struct of the FixedReader.WriteTo

func (*FixedReaderMockWriteToExpectation) Then

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 Foldable

type Foldable interface {
	FoldToUint64() uint64
}

type FoldableReader

type FoldableReader interface {
	FixedReader
	Foldable
}

func CopyFixedSize

func CopyFixedSize(v FoldableReader) FoldableReader

func CopyToImmutable

func CopyToImmutable(v FoldableReader) FoldableReader

func CopyToMutable

func CopyToMutable(v FoldableReader) FoldableReader

type FoldableReaderMock

type FoldableReaderMock struct {
	AsByteStringMock mFoldableReaderMockAsByteString

	AsBytesMock mFoldableReaderMockAsBytes

	FixedByteSizeMock mFoldableReaderMockFixedByteSize

	FoldToUint64Mock mFoldableReaderMockFoldToUint64

	ReadMock mFoldableReaderMockRead

	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) AsBytes

func (mmAsBytes *FoldableReaderMock) AsBytes() (ba1 []byte)

AsBytes implements FoldableReader

func (*FoldableReaderMock) AsBytesAfterCounter

func (mmAsBytes *FoldableReaderMock) AsBytesAfterCounter() uint64

AsBytesAfterCounter returns a count of finished FoldableReaderMock.AsBytes invocations

func (*FoldableReaderMock) AsBytesBeforeCounter

func (mmAsBytes *FoldableReaderMock) AsBytesBeforeCounter() uint64

AsBytesBeforeCounter returns a count of FoldableReaderMock.AsBytes 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) MinimockAsBytesDone

func (m *FoldableReaderMock) MinimockAsBytesDone() bool

MinimockAsBytesDone returns true if the count of the AsBytes invocations corresponds the number of defined expectations

func (*FoldableReaderMock) MinimockAsBytesInspect

func (m *FoldableReaderMock) MinimockAsBytesInspect()

MinimockAsBytesInspect 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) MinimockReadDone

func (m *FoldableReaderMock) MinimockReadDone() bool

MinimockReadDone returns true if the count of the Read invocations corresponds the number of defined expectations

func (*FoldableReaderMock) MinimockReadInspect

func (m *FoldableReaderMock) MinimockReadInspect()

MinimockReadInspect 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) Read

func (mmRead *FoldableReaderMock) Read(p []byte) (n int, err error)

Read implements FoldableReader

func (*FoldableReaderMock) ReadAfterCounter

func (mmRead *FoldableReaderMock) ReadAfterCounter() uint64

ReadAfterCounter returns a count of finished FoldableReaderMock.Read invocations

func (*FoldableReaderMock) ReadBeforeCounter

func (mmRead *FoldableReaderMock) ReadBeforeCounter() uint64

ReadBeforeCounter returns a count of FoldableReaderMock.Read invocations

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 FoldableReaderMockAsBytesExpectation

type FoldableReaderMockAsBytesExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

FoldableReaderMockAsBytesExpectation specifies expectation struct of the FoldableReader.AsBytes

type FoldableReaderMockAsBytesResults

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

FoldableReaderMockAsBytesResults contains results of the FoldableReader.AsBytes

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 FoldableReaderMockReadExpectation

type FoldableReaderMockReadExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

FoldableReaderMockReadExpectation specifies expectation struct of the FoldableReader.Read

func (*FoldableReaderMockReadExpectation) Then

Then sets up FoldableReader.Read return parameters for the expectation previously defined by the When method

type FoldableReaderMockReadParams

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

FoldableReaderMockReadParams contains parameters of the FoldableReader.Read

type FoldableReaderMockReadResults

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

FoldableReaderMockReadResults contains results of the FoldableReader.Read

type FoldableReaderMockWriteToExpectation

type FoldableReaderMockWriteToExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

FoldableReaderMockWriteToExpectation specifies expectation struct of the FoldableReader.WriteTo

func (*FoldableReaderMockWriteToExpectation) Then

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

Jump to

Keyboard shortcuts

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