mocked

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

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