mock

package
v0.0.0-...-e89a0ad Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Folder

type Folder struct {
	MemFolder *memory.Folder

	GetPathMock       func() string
	ListFolderMock    func() (objects []storage.Object, subFolders []storage.Folder, err error)
	DeleteObjectsMock func(objectRelativePaths []string) error
	ExistsMock        func(objectRelativePath string) (bool, error)
	GetSubFolderMock  func(subFolderRelativePath string) storage.Folder
	ReadObjectMock    func(objectRelativePath string) (io.ReadCloser, error)
	PutObjectMock     func(name string, content io.Reader) error
	CopyObjectMock    func(srcPath string, dstPath string) error
}

func NewFolder

func NewFolder(memFolder *memory.Folder) *Folder

func (*Folder) CopyObject

func (f *Folder) CopyObject(srcPath string, dstPath string) error

func (*Folder) DeleteObjects

func (f *Folder) DeleteObjects(objectRelativePaths []string) error

func (*Folder) Exists

func (f *Folder) Exists(objectRelativePath string) (bool, error)

func (*Folder) GetPath

func (f *Folder) GetPath() string

func (*Folder) GetSubFolder

func (f *Folder) GetSubFolder(subFolderRelativePath string) storage.Folder

func (*Folder) ListFolder

func (f *Folder) ListFolder() (objects []storage.Object, subFolders []storage.Folder, err error)

func (*Folder) PutObject

func (f *Folder) PutObject(name string, content io.Reader) error

func (*Folder) ReadObject

func (f *Folder) ReadObject(objectRelativePath string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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