mocks

package
v0.0.0-...-86d635b Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockFile

func NewMockFile() oswrapper.File

Types

type MockFile

type MockFile struct {
	ChmodImpl func(os.FileMode) error
	NameImpl  func() string
	SyncImpl  func() error
	WriteImpl func([]byte) (int, error)
}

func (*MockFile) Chmod

func (f *MockFile) Chmod(fileMode os.FileMode) error

func (*MockFile) Close

func (f *MockFile) Close() error

func (*MockFile) Name

func (f *MockFile) Name() string

func (*MockFile) Read

func (f *MockFile) Read([]byte) (int, error)

func (*MockFile) Sync

func (f *MockFile) Sync() error

func (*MockFile) Write

func (f *MockFile) Write(content []byte) (int, error)

func (*MockFile) WriteAt

func (f *MockFile) WriteAt(b []byte, off int64) (n int, err error)

Jump to

Keyboard shortcuts

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