Documentation ¶
Index ¶
- type FakeCallbackInvoker
- type FakeDownloader
- type FakeGit
- func (f *FakeGit) Checkout(repo, ref string) error
- func (f *FakeGit) Clone(source *git.URL, target string, c git.CloneConfig) error
- func (f *FakeGit) GetInfo(repo string) *git.SourceInfo
- func (f *FakeGit) LsTree(repo, ref string, recursive bool) ([]os.FileInfo, error)
- func (f *FakeGit) SubmoduleInit(repo string) error
- func (f *FakeGit) SubmoduleUpdate(repo string, init, recursive bool) error
- type FakeInstaller
- type FakeTar
- func (f *FakeTar) Copy() *FakeTar
- func (f *FakeTar) CreateTarFile(base, dir string) (string, error)
- func (f *FakeTar) CreateTarStream(dir string, includeDirInPath bool, writer io.Writer) error
- func (f *FakeTar) CreateTarStreamReader(dir string, includeDirInPath bool) io.ReadCloser
- func (f *FakeTar) CreateTarStreamToTarWriter(dir string, includeDirInPath bool, writer tar.Writer, logger io.Writer) error
- func (f *FakeTar) ExtractTarStream(dir string, reader io.Reader) error
- func (f *FakeTar) ExtractTarStreamFromTarReader(dir string, tarReader tar.Reader, logger io.Writer) error
- func (f *FakeTar) ExtractTarStreamWithLogging(dir string, reader io.Reader, logger io.Writer) error
- func (f *FakeTar) SetExclusionPattern(*regexp.Regexp)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeCallbackInvoker ¶
type FakeCallbackInvoker struct { CallbackURL string Success bool Messages []string Labels map[string]string Result []string }
FakeCallbackInvoker provides the fake callback invoker
func (*FakeCallbackInvoker) ExecuteCallback ¶
func (f *FakeCallbackInvoker) ExecuteCallback(callbackURL string, success bool, labels map[string]string, messages []string) []string
ExecuteCallback executes the fake callback
type FakeDownloader ¶
type FakeDownloader struct { URL []url.URL Target []string Err map[string]error // contains filtered or unexported fields }
FakeDownloader provides a fake downloader interface
func (*FakeDownloader) Download ¶
func (f *FakeDownloader) Download(url *url.URL, target string) (*git.SourceInfo, error)
Download downloads a fake file from the URL
type FakeGit ¶
type FakeGit struct { CloneSource *git.URL CloneTarget string CloneError error CheckoutRepo string CheckoutRef string CheckoutError error SubmoduleInitRepo string SubmoduleInitError error SubmoduleUpdateRepo string SubmoduleUpdateInit bool SubmoduleUpdateRecursive bool SubmoduleUpdateError error }
FakeGit provides a fake Git
func (*FakeGit) GetInfo ¶ added in v1.0.1
func (f *FakeGit) GetInfo(repo string) *git.SourceInfo
GetInfo retrieves the information about the source code and commit
func (*FakeGit) LsTree ¶ added in v1.1.4
LsTree returns a slice of os.FileInfo objects populated with the paths and file modes of files known to Git. This is used on Windows systems where the executable mode metadata is lost on git checkout.
func (*FakeGit) SubmoduleInit ¶ added in v1.0.4
SubmoduleInit initializes / clones submodules.
type FakeInstaller ¶
FakeInstaller provides a fake installer
func (*FakeInstaller) InstallOptional ¶
func (f *FakeInstaller) InstallOptional(scripts []string, dstDir string) []api.InstallResult
InstallOptional downloads and installs optional scripts into dstDir
func (*FakeInstaller) InstallRequired ¶
func (f *FakeInstaller) InstallRequired(scripts []string, dstDir string) ([]api.InstallResult, error)
InstallRequired downloads and installs required scripts into dstDir
type FakeTar ¶
type FakeTar struct { CreateTarBase string CreateTarDir string CreateTarResult string CreateTarError error ExtractTarDir string ExtractTarReader io.Reader ExtractTarError error // contains filtered or unexported fields }
FakeTar provides a fake UNIX tar interface
func (*FakeTar) CreateTarFile ¶
CreateTarFile creates a new fake UNIX tar file
func (*FakeTar) CreateTarStream ¶ added in v1.0.3
CreateTarStream creates a tar from the given directory and streams it to the given writer.
func (*FakeTar) CreateTarStreamReader ¶ added in v1.1.4
func (f *FakeTar) CreateTarStreamReader(dir string, includeDirInPath bool) io.ReadCloser
CreateTarStreamReader returns an io.ReadCloser from which a tar stream can be read. The tar stream is created using CreateTarStream.
func (*FakeTar) CreateTarStreamToTarWriter ¶ added in v1.1.4
func (f *FakeTar) CreateTarStreamToTarWriter(dir string, includeDirInPath bool, writer tar.Writer, logger io.Writer) error
CreateTarStreamToTarWriter creates a tar from the given directory and streams it to the given writer.
func (*FakeTar) ExtractTarStream ¶
ExtractTarStream streams a content of fake tar
func (*FakeTar) ExtractTarStreamFromTarReader ¶ added in v1.1.3
func (f *FakeTar) ExtractTarStreamFromTarReader(dir string, tarReader tar.Reader, logger io.Writer) error
ExtractTarStreamFromTarReader streams a content of fake tar from a tar.Reader
func (*FakeTar) ExtractTarStreamWithLogging ¶ added in v1.0.4
ExtractTarStreamWithLogging streams a content of fake tar
func (*FakeTar) SetExclusionPattern ¶ added in v1.0.3
SetExclusionPattern sets the exclusion pattern