file

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Copier

type Copier interface {
	CopyToFile(path string, reader io.Reader) (int64, error)
}

Copier defines an interface that is able to copy data from a reader to a file

type MockCopier

type MockCopier struct {
	CopyToFileImplementation func(path string, reader io.Reader) (int64, error)
}

MockCopier provides a mock implementation of the Copier interface

func (*MockCopier) CopyToFile

func (c *MockCopier) CopyToFile(path string, reader io.Reader) (int64, error)

CopyToFile copies data from a reader to a file

type OsCopier

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

OsCopier provides the ability to copy data to files

func NewOsCopier

func NewOsCopier() *OsCopier

NewOsCopier creates a new OsCopier instance

func (*OsCopier) CopyToFile

func (c *OsCopier) CopyToFile(path string, reader io.Reader) (int64, error)

CopyToFile copies data from a reader to a file

Jump to

Keyboard shortcuts

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