mocks

package
v1.48.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 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 added in v1.39.0

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 added in v1.31.0

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