mocked

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockedAppendable

type MockedAppendable struct {
	MetadataFn             func() []byte
	SizeFn                 func() (int64, error)
	OffsetFn               func() int64
	SetOffsetFn            func(off int64) error
	DiscardUptoFn          func(off int64) error
	AppendFn               func(bs []byte) (off int64, n int, err error)
	FlushFn                func() error
	SyncFn                 func() error
	SwitchToReadOnlyModeFn func() error
	ReadAtFn               func(bs []byte, off int64) (int, error)
	CopyFn                 func(dstPath string) error
	CloseFn                func() error
	CompressionFormatFn    func() int
	CompressionLevelFn     func() int
}

func (*MockedAppendable) Append

func (a *MockedAppendable) Append(bs []byte) (off int64, n int, err error)

func (*MockedAppendable) Close

func (a *MockedAppendable) Close() error

func (*MockedAppendable) CompressionFormat added in v1.0.5

func (a *MockedAppendable) CompressionFormat() int

func (MockedAppendable) CompressionLevel added in v1.0.5

func (a MockedAppendable) CompressionLevel() int

func (*MockedAppendable) Copy added in v0.9.1

func (a *MockedAppendable) Copy(dstPath string) error

func (*MockedAppendable) DiscardUpto added in v1.2.3

func (a *MockedAppendable) DiscardUpto(off int64) error

func (*MockedAppendable) Flush

func (a *MockedAppendable) Flush() error

func (*MockedAppendable) Metadata

func (a *MockedAppendable) Metadata() []byte

func (*MockedAppendable) Offset

func (a *MockedAppendable) Offset() int64

func (*MockedAppendable) ReadAt

func (a *MockedAppendable) ReadAt(bs []byte, off int64) (int, error)

func (*MockedAppendable) SetOffset

func (a *MockedAppendable) SetOffset(off int64) error

func (*MockedAppendable) Size

func (a *MockedAppendable) Size() (int64, error)

func (*MockedAppendable) SwitchToReadOnlyMode added in v1.3.2

func (a *MockedAppendable) SwitchToReadOnlyMode() error

func (*MockedAppendable) Sync

func (a *MockedAppendable) Sync() error

Jump to

Keyboard shortcuts

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