mocked

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Copyright 2022 Codenotary Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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