repository

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdRepository

type CmdRepository struct{}

func (*CmdRepository) Exec

func (repo *CmdRepository) Exec(writer io.Writer, command string, args ...string) error

type CmdRepositoryInterface

type CmdRepositoryInterface interface {
	Exec(writer io.Writer, command string, args ...string) error
}

type FsMockRepository

type FsMockRepository struct {
	Files []string
}

func (*FsMockRepository) Create

func (repo *FsMockRepository) Create(path string, body []byte) error

func (*FsMockRepository) CreateDir

func (repo *FsMockRepository) CreateDir(path string) error

func (*FsMockRepository) Ext

func (repo *FsMockRepository) Ext(path string) string

func (*FsMockRepository) HomeDir

func (repo *FsMockRepository) HomeDir() (string, error)

func (*FsMockRepository) IsDir

func (repo *FsMockRepository) IsDir(path string) (bool, error)

func (*FsMockRepository) IsExist

func (repo *FsMockRepository) IsExist(path string) bool

func (*FsMockRepository) ListDirs

func (repo *FsMockRepository) ListDirs(path string) ([]string, error)

func (*FsMockRepository) ListFiles

func (repo *FsMockRepository) ListFiles(path string) ([]string, error)

func (*FsMockRepository) Read

func (repo *FsMockRepository) Read(path string) ([]byte, error)

func (*FsMockRepository) Remove

func (repo *FsMockRepository) Remove(path string) error

func (*FsMockRepository) WorkDir

func (repo *FsMockRepository) WorkDir() (string, error)

type FsRepository

type FsRepository struct{}

func (*FsRepository) Create

func (repo *FsRepository) Create(path string, body []byte) error

func (*FsRepository) CreateDir

func (repo *FsRepository) CreateDir(path string) error

func (*FsRepository) Ext

func (repo *FsRepository) Ext(path string) string

func (*FsRepository) HomeDir

func (repo *FsRepository) HomeDir() (string, error)

func (*FsRepository) IsDir

func (repo *FsRepository) IsDir(path string) (bool, error)

func (*FsRepository) IsExist

func (repo *FsRepository) IsExist(path string) bool

func (*FsRepository) ListDirs

func (repo *FsRepository) ListDirs(path string) ([]string, error)

func (*FsRepository) ListFiles

func (repo *FsRepository) ListFiles(path string) ([]string, error)

func (*FsRepository) Read

func (repo *FsRepository) Read(path string) ([]byte, error)

func (*FsRepository) Remove

func (repo *FsRepository) Remove(path string) error

func (*FsRepository) WorkDir

func (repo *FsRepository) WorkDir() (string, error)

type FsRepositoryInterface

type FsRepositoryInterface interface {
	Ext(path string) string
	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)
}

type LogRepository

type LogRepository struct{}

func (*LogRepository) Fatal

func (repo *LogRepository) Fatal(err error)

func (*LogRepository) Info

func (repo *LogRepository) Info(format string, v ...any)

type LogRepositoryInterface

type LogRepositoryInterface interface {
	Info(format string, v ...any)
	Fatal(err error)
}

type Repos

func New

func New() Repos

func NewMock

func NewMock() Repos

Jump to

Keyboard shortcuts

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