archivefx

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package archivefx is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"archivefx",
	fx.Provide(
		New,
		NewRepository,
	),
)

Functions

This section is empty.

Types

type ArvSrv

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

func (*ArvSrv) Archive

func (i *ArvSrv) Archive(dir string) (io.Reader, error)

func (*ArvSrv) UnArchive

func (i *ArvSrv) UnArchive(r io.Reader, dest string) error

type IArvSrv

type IArvSrv interface {
	Archive(dir string) (io.Reader, error)
	UnArchive(r io.Reader, dest string) error
}

func New

func New(config *conf.Config, repo IRepository) IArvSrv

type IRepository

type IRepository interface {
	IsExist(path string) bool
	IsDir(path string) (bool, error)
	CreateDir(path string) error
	Create(path string, body []byte) error
	HomeDir() (string, error)
	WorkDir() (string, error)
	Remove(path string) error
	Read(path string) ([]byte, error)
	ListDirs(path string) ([]string, error)
	ListFiles(path string) ([]string, error)
}

func NewRepository

func NewRepository() IRepository

type MockIRepository

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

MockIRepository is a mock of IRepository interface.

func NewMockIRepository

func NewMockIRepository(ctrl *gomock.Controller) *MockIRepository

NewMockIRepository creates a new mock instance.

func (*MockIRepository) Create

func (m *MockIRepository) Create(path string, body []byte) error

Create mocks base method.

func (*MockIRepository) CreateDir

func (m *MockIRepository) CreateDir(path string) error

CreateDir mocks base method.

func (*MockIRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIRepository) HomeDir

func (m *MockIRepository) HomeDir() (string, error)

HomeDir mocks base method.

func (*MockIRepository) IsDir

func (m *MockIRepository) IsDir(path string) (bool, error)

IsDir mocks base method.

func (*MockIRepository) IsExist

func (m *MockIRepository) IsExist(path string) bool

IsExist mocks base method.

func (*MockIRepository) ListDirs

func (m *MockIRepository) ListDirs(path string) ([]string, error)

ListDirs mocks base method.

func (*MockIRepository) ListFiles

func (m *MockIRepository) ListFiles(path string) ([]string, error)

ListFiles mocks base method.

func (*MockIRepository) Read

func (m *MockIRepository) Read(path string) ([]byte, error)

Read mocks base method.

func (*MockIRepository) Remove

func (m *MockIRepository) Remove(path string) error

Remove mocks base method.

func (*MockIRepository) WorkDir

func (m *MockIRepository) WorkDir() (string, error)

WorkDir mocks base method.

type MockIRepositoryMockRecorder

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

MockIRepositoryMockRecorder is the mock recorder for MockIRepository.

func (*MockIRepositoryMockRecorder) Create

func (mr *MockIRepositoryMockRecorder) Create(path, body any) *gomock.Call

Create indicates an expected call of Create.

func (*MockIRepositoryMockRecorder) CreateDir

func (mr *MockIRepositoryMockRecorder) CreateDir(path any) *gomock.Call

CreateDir indicates an expected call of CreateDir.

func (*MockIRepositoryMockRecorder) HomeDir

func (mr *MockIRepositoryMockRecorder) HomeDir() *gomock.Call

HomeDir indicates an expected call of HomeDir.

func (*MockIRepositoryMockRecorder) IsDir

func (mr *MockIRepositoryMockRecorder) IsDir(path any) *gomock.Call

IsDir indicates an expected call of IsDir.

func (*MockIRepositoryMockRecorder) IsExist

func (mr *MockIRepositoryMockRecorder) IsExist(path any) *gomock.Call

IsExist indicates an expected call of IsExist.

func (*MockIRepositoryMockRecorder) ListDirs

func (mr *MockIRepositoryMockRecorder) ListDirs(path any) *gomock.Call

ListDirs indicates an expected call of ListDirs.

func (*MockIRepositoryMockRecorder) ListFiles

func (mr *MockIRepositoryMockRecorder) ListFiles(path any) *gomock.Call

ListFiles indicates an expected call of ListFiles.

func (*MockIRepositoryMockRecorder) Read

func (mr *MockIRepositoryMockRecorder) Read(path any) *gomock.Call

Read indicates an expected call of Read.

func (*MockIRepositoryMockRecorder) Remove

func (mr *MockIRepositoryMockRecorder) Remove(path any) *gomock.Call

Remove indicates an expected call of Remove.

func (*MockIRepositoryMockRecorder) WorkDir

func (mr *MockIRepositoryMockRecorder) WorkDir() *gomock.Call

WorkDir indicates an expected call of WorkDir.

type Repository

type Repository struct{}

func (*Repository) Create

func (i *Repository) Create(path string, body []byte) error

func (*Repository) CreateDir

func (i *Repository) CreateDir(path string) error

func (*Repository) HomeDir

func (i *Repository) HomeDir() (string, error)

func (*Repository) IsDir

func (i *Repository) IsDir(path string) (bool, error)

func (*Repository) IsExist

func (i *Repository) IsExist(path string) bool

func (*Repository) ListDirs

func (i *Repository) ListDirs(path string) ([]string, error)

func (*Repository) ListFiles

func (i *Repository) ListFiles(path string) ([]string, error)

func (*Repository) Read

func (i *Repository) Read(path string) ([]byte, error)

func (*Repository) Remove

func (i *Repository) Remove(path string) error

func (*Repository) WorkDir

func (i *Repository) WorkDir() (string, error)

Jump to

Keyboard shortcuts

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