repository

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 10 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, workdir string, command string, args []string) (*exec.Cmd, error)

func (*CmdRepository) Kill added in v0.0.7

func (repo *CmdRepository) Kill(cmd *exec.Cmd) error

type CmdRepositoryInterface

type CmdRepositoryInterface interface {
	Exec(writer io.Writer, workdir string, command string, args []string) (*exec.Cmd, error)
	Kill(cmd *exec.Cmd) error
}

type FsMockRepository

type FsMockRepository struct {
	Files []string
}

func (*FsMockRepository) Ext

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

func (*FsMockRepository) IsDir

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

func (*FsMockRepository) IsExist

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

func (*FsMockRepository) Read

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

func (*FsMockRepository) WorkDir

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

type FsRepository

type FsRepository struct{}

func (*FsRepository) Ext

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

func (*FsRepository) IsDir

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

func (*FsRepository) IsExist

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

func (*FsRepository) Read

func (repo *FsRepository) Read(path string) ([]byte, 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)
	WorkDir() (string, error)
	Read(path string) ([]byte, error)
}

type LogRepository

type LogRepository struct{}

func (*LogRepository) Ask added in v0.0.5

func (repo *LogRepository) Ask(message string, defaultValue string) (string, error)

func (*LogRepository) Confirm added in v0.0.5

func (repo *LogRepository) Confirm(message string) (bool, error)

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)
	Ask(message string, defaultValue string) (string, error)
	Confirm(message string) (bool, 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