files

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: AGPL-3.0 Imports: 8 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 LocalRuntime

type LocalRuntime struct{}

func NewLocalRuntime

func NewLocalRuntime() *LocalRuntime

func (*LocalRuntime) CopyFiles

func (*LocalRuntime) CopyFiles(ctx *contexts.Context, src, dest string) (err error)

Copies the filesytem object (file, directory, etc.) to the destination path. Special files (such as sockets or device files) are not included.

func (*LocalRuntime) ListDirectory added in v0.0.15

func (*LocalRuntime) ListDirectory(ctx *contexts.Context, path string) (entries []string, err error)

Lists the names of the immediate subdirectories of the provided path. Non-directory entries are omitted. The returned names are entry names only, not full paths. The directory must exist.

func (*LocalRuntime) SyncFiles

func (lr *LocalRuntime) SyncFiles(ctx *contexts.Context, src, dest string) (err error)

Make the destination path contents match the input directory contents. Special files (such as sockets or device files) are not included.

type MockRuntime

type MockRuntime struct {
	mock.Mock
}

MockRuntime is an autogenerated mock type for the Runtime type

func NewMockRuntime

func NewMockRuntime(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRuntime

NewMockRuntime creates a new instance of MockRuntime. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockRuntime) CopyFiles

func (_m *MockRuntime) CopyFiles(ctx *contexts.Context, src string, dest string) error

CopyFiles provides a mock function with given fields: ctx, src, dest

func (*MockRuntime) EXPECT

func (_m *MockRuntime) EXPECT() *MockRuntime_Expecter

func (*MockRuntime) ListDirectory added in v0.0.15

func (_m *MockRuntime) ListDirectory(ctx *contexts.Context, path string) ([]string, error)

ListDirectory provides a mock function with given fields: ctx, path

func (*MockRuntime) SyncFiles

func (_m *MockRuntime) SyncFiles(ctx *contexts.Context, src string, dest string) error

SyncFiles provides a mock function with given fields: ctx, src, dest

type MockRuntime_CopyFiles_Call

type MockRuntime_CopyFiles_Call struct {
	*mock.Call
}

MockRuntime_CopyFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFiles'

func (*MockRuntime_CopyFiles_Call) Return

func (*MockRuntime_CopyFiles_Call) Run

func (*MockRuntime_CopyFiles_Call) RunAndReturn

type MockRuntime_Expecter

type MockRuntime_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockRuntime_Expecter) CopyFiles

func (_e *MockRuntime_Expecter) CopyFiles(ctx interface{}, src interface{}, dest interface{}) *MockRuntime_CopyFiles_Call

CopyFiles is a helper method to define mock.On call

  • ctx *contexts.Context
  • src string
  • dest string

func (*MockRuntime_Expecter) ListDirectory added in v0.0.15

func (_e *MockRuntime_Expecter) ListDirectory(ctx interface{}, path interface{}) *MockRuntime_ListDirectory_Call

ListDirectory is a helper method to define mock.On call

  • ctx *contexts.Context
  • path string

func (*MockRuntime_Expecter) SyncFiles

func (_e *MockRuntime_Expecter) SyncFiles(ctx interface{}, src interface{}, dest interface{}) *MockRuntime_SyncFiles_Call

SyncFiles is a helper method to define mock.On call

  • ctx *contexts.Context
  • src string
  • dest string

type MockRuntime_ListDirectory_Call added in v0.0.15

type MockRuntime_ListDirectory_Call struct {
	*mock.Call
}

MockRuntime_ListDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDirectory'

func (*MockRuntime_ListDirectory_Call) Return added in v0.0.15

func (*MockRuntime_ListDirectory_Call) Run added in v0.0.15

func (*MockRuntime_ListDirectory_Call) RunAndReturn added in v0.0.15

type MockRuntime_SyncFiles_Call

type MockRuntime_SyncFiles_Call struct {
	*mock.Call
}

MockRuntime_SyncFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncFiles'

func (*MockRuntime_SyncFiles_Call) Return

func (*MockRuntime_SyncFiles_Call) Run

func (*MockRuntime_SyncFiles_Call) RunAndReturn

type Runtime

type Runtime interface {
	CopyFiles(ctx *contexts.Context, src, dest string) error
	SyncFiles(ctx *contexts.Context, src, dest string) error
	ListDirectory(ctx *contexts.Context, path string) ([]string, error)
}

Represents a place (i.e. local or remote) where commands can run.

Jump to

Keyboard shortcuts

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