mocks

package
v0.0.0-...-873fb03 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileNotFoundError

func FileNotFoundError(path string) string

Types

type BuilderMock

type BuilderMock struct {
	mock.Mock
}

func (*BuilderMock) Build

func (b *BuilderMock) Build(info formula.BuildInfo) error

func (*BuilderMock) HasBuilt

func (b *BuilderMock) HasBuilt() bool

type ConfigRunnerMock

type ConfigRunnerMock struct {
	mock.Mock
}

func (*ConfigRunnerMock) Create

func (c *ConfigRunnerMock) Create(runType formula.RunnerType) error

func (*ConfigRunnerMock) Find

type CredResolverMock

type CredResolverMock struct {
	mock.Mock
}

func (*CredResolverMock) Resolve

func (i *CredResolverMock) Resolve(name string) (string, error)

type DetailManagerMock

type DetailManagerMock struct {
	mock.Mock
}

func (*DetailManagerMock) LatestTag

func (d *DetailManagerMock) LatestTag(repo formula.Repo) string

type DirManager

type DirManager struct {
	mock.Mock
}

func (*DirManager) Create

func (d *DirManager) Create(dir string) error

func (*DirManager) Exists

func (d *DirManager) Exists(path string) bool

func (*DirManager) IsDir

func (d *DirManager) IsDir(dir string) bool

func (*DirManager) List

func (d *DirManager) List(dir string, hiddenDir bool) ([]string, error)

type DirManagerMock

type DirManagerMock struct {
	mock.Mock
}

func (*DirManagerMock) Create

func (d *DirManagerMock) Create(dir string) error

func (*DirManagerMock) List

func (d *DirManagerMock) List(dir string, hiddenDir bool) ([]string, error)

func (*DirManagerMock) Remove

func (d *DirManagerMock) Remove(dir string) error

type EnvFinderMock

type EnvFinderMock struct {
	mock.Mock
}

func (*EnvFinderMock) Find

func (e *EnvFinderMock) Find() (env.Holder, error)

type FileManager

type FileManager struct {
	mock.Mock
}

func (*FileManager) Append

func (f *FileManager) Append(path string, content []byte) error

func (*FileManager) Copy

func (f *FileManager) Copy(src, dst string) error

func (*FileManager) Create

func (f *FileManager) Create(path string, data io.ReadCloser) error

func (*FileManager) Exists

func (f *FileManager) Exists(path string) bool

func (*FileManager) List

func (f *FileManager) List(file string) ([]string, error)

func (*FileManager) ListNews

func (f *FileManager) ListNews(oldPath, newPath string) ([]string, error)

func (*FileManager) Move

func (f *FileManager) Move(oldPath, newPath string, files []string) error

func (*FileManager) Read

func (f *FileManager) Read(path string) ([]byte, error)

func (*FileManager) Remove

func (f *FileManager) Remove(path string) error

func (*FileManager) Write

func (f *FileManager) Write(path string, content []byte) error

type FileManagerMock

type FileManagerMock struct {
	mock.Mock
}

func (*FileManagerMock) Append

func (fi *FileManagerMock) Append(path string, content []byte) error

func (*FileManagerMock) Exists

func (fi *FileManagerMock) Exists(string) bool

func (*FileManagerMock) ListNews

func (fi *FileManagerMock) ListNews(oldPath, newPath string) ([]string, error)

func (*FileManagerMock) Move

func (fi *FileManagerMock) Move(oldPath, newPath string, files []string) error

func (*FileManagerMock) Read

func (fi *FileManagerMock) Read(string) ([]byte, error)

func (*FileManagerMock) Remove

func (fi *FileManagerMock) Remove(path string) error

func (*FileManagerMock) Write

func (fi *FileManagerMock) Write(string, []byte) error

type FormCreator

type FormCreator struct {
	mock.Mock
}

func (*FormCreator) Build

func (f *FormCreator) Build(info formula.BuildInfo) error

func (*FormCreator) Create

func (f *FormCreator) Create(cf formula.Create) error

type GitRepositoryMock

type GitRepositoryMock struct {
	mock.Mock
}

func (*GitRepositoryMock) LatestTag

func (g *GitRepositoryMock) LatestTag(info git.RepoInfo) (git.Tag, error)

func (*GitRepositoryMock) Tags

func (g *GitRepositoryMock) Tags(info git.RepoInfo) (git.Tags, error)

func (*GitRepositoryMock) Zipball

func (g *GitRepositoryMock) Zipball(info git.RepoInfo, version string) (io.ReadCloser, error)

type InputBoolMock

type InputBoolMock struct {
	mock.Mock
}

func (*InputBoolMock) Bool

func (i *InputBoolMock) Bool(name string, items []string, helper ...string) (bool, error)

type InputDefaultTextMock

type InputDefaultTextMock struct {
	mock.Mock
}

func (*InputDefaultTextMock) Text

func (i *InputDefaultTextMock) Text(input formula.Input) (string, error)

type InputIntMock

type InputIntMock struct {
	mock.Mock
}

func (*InputIntMock) Int

func (i *InputIntMock) Int(name string, helper ...string) (int64, error)

type InputListMock

type InputListMock struct {
	mock.Mock
}

func (*InputListMock) List

func (i *InputListMock) List(name string, items []string, helper ...string) (string, error)

type InputMultiselectMock

type InputMultiselectMock struct {
	mock.Mock
}

func (*InputMultiselectMock) Multiselect

func (i *InputMultiselectMock) Multiselect(input formula.Input) ([]string, error)

type InputPasswordMock

type InputPasswordMock struct {
	mock.Mock
}

func (*InputPasswordMock) Password

func (i *InputPasswordMock) Password(label string, helper ...string) (string, error)

type InputPathMock

type InputPathMock struct {
	mock.Mock
}

func (*InputPathMock) Read

func (i *InputPathMock) Read(text string) (string, error)

type InputTextMock

type InputTextMock struct {
	mock.Mock
}

func (*InputTextMock) Text

func (i *InputTextMock) Text(name string, required bool, helper ...string) (string, error)

type InputTextValidatorMock

type InputTextValidatorMock struct {
	mock.Mock
}

func (*InputTextValidatorMock) Text

func (i *InputTextValidatorMock) Text(name string, validate func(interface{}) error, helper ...string) (string, error)

type InputURLMock

type InputURLMock struct {
	mock.Mock
}

func (*InputURLMock) URL

func (i *InputURLMock) URL(name, defaultValue string) (string, error)

type LocalBuilderMock

type LocalBuilderMock struct {
	mock.Mock
}

func (*LocalBuilderMock) Init

func (lb *LocalBuilderMock) Init(workspaceDir string, repoName string) (string, error)

type PostRunner

type PostRunner struct {
	mock.Mock
}

func (*PostRunner) PostRun

func (po *PostRunner) PostRun(p formula.Setup, docker bool) error

type PreRunBuilder

type PreRunBuilder struct {
	mock.Mock
}

func (*PreRunBuilder) Build

func (prb *PreRunBuilder) Build(relativePath string) error

type RepoInfo

type RepoInfo struct {
	mock.Mock
}

func (*RepoInfo) LatestTagUrl

func (ri *RepoInfo) LatestTagUrl() string

func (*RepoInfo) TagsUrl

func (ri *RepoInfo) TagsUrl() string

func (*RepoInfo) Token

func (ri *RepoInfo) Token() string

func (*RepoInfo) TokenHeader

func (ri *RepoInfo) TokenHeader() string

func (*RepoInfo) ZipUrl

func (ri *RepoInfo) ZipUrl(version string) string

type RepoManager

type RepoManager struct {
	mock.Mock
}

func (*RepoManager) Add

func (r *RepoManager) Add(repo formula.Repo) error

func (*RepoManager) Create

func (r *RepoManager) Create(repo formula.Repo) error

func (*RepoManager) Delete

func (r *RepoManager) Delete(name formula.RepoName) error

func (*RepoManager) LatestTag

func (r *RepoManager) LatestTag(repo formula.Repo) string

func (*RepoManager) List

func (r *RepoManager) List() (formula.Repos, error)

func (*RepoManager) SetPriority

func (r *RepoManager) SetPriority(name formula.RepoName, priority int) error

func (*RepoManager) Update

func (r *RepoManager) Update(name formula.RepoName, version formula.RepoVersion) error

func (*RepoManager) Write

func (r *RepoManager) Write(repos formula.Repos) error

type RitConfigMock

type RitConfigMock struct {
	mock.Mock
}

func (*RitConfigMock) Read

func (r *RitConfigMock) Read() (config.Configs, error)

func (*RitConfigMock) Write

func (r *RitConfigMock) Write(configs config.Configs) error

type TemplateManagerMock

type TemplateManagerMock struct {
	mock.Mock
}

func (*TemplateManagerMock) LangTemplateFiles

func (tm *TemplateManagerMock) LangTemplateFiles(lang string) ([]template.File, error)

func (*TemplateManagerMock) Languages

func (tm *TemplateManagerMock) Languages() ([]string, error)

func (*TemplateManagerMock) ResolverNewPath

func (tm *TemplateManagerMock) ResolverNewPath(oldPath, newDir, lang, workspacePath string) (string, error)

func (*TemplateManagerMock) Validate

func (tm *TemplateManagerMock) Validate() error

type TreeManager

type TreeManager struct {
	mock.Mock
}

func (*TreeManager) Check

func (t *TreeManager) Check() []api.CommandID

func (*TreeManager) Generate

func (t *TreeManager) Generate(repoPath string) (formula.Tree, error)

func (*TreeManager) MergedTree

func (t *TreeManager) MergedTree(core bool) formula.Tree

func (*TreeManager) Tree

func (t *TreeManager) Tree() (map[formula.RepoName]formula.Tree, error)

func (*TreeManager) TreeByRepo

func (t *TreeManager) TreeByRepo(repoName formula.RepoName) (formula.Tree, error)

type TutorialFindSetterMock

type TutorialFindSetterMock struct {
	mock.Mock
}

func (*TutorialFindSetterMock) Find

func (*TutorialFindSetterMock) Set

type WorkspaceForm

type WorkspaceForm struct {
	mock.Mock
}

func (*WorkspaceForm) Add

func (w *WorkspaceForm) Add(workspace formula.Workspace) error

func (*WorkspaceForm) CurrentHash

func (w *WorkspaceForm) CurrentHash(formulaPath string) (string, error)

func (*WorkspaceForm) Delete

func (w *WorkspaceForm) Delete(workspace formula.Workspace) error

func (*WorkspaceForm) List

func (w *WorkspaceForm) List() (formula.Workspaces, error)

func (*WorkspaceForm) PreviousHash

func (w *WorkspaceForm) PreviousHash(formulaPath string) (string, error)

func (*WorkspaceForm) Update

func (w *WorkspaceForm) Update(workspace formula.Workspace) error

func (*WorkspaceForm) UpdateHash

func (w *WorkspaceForm) UpdateHash(formulaPath string, hash string) error

func (*WorkspaceForm) Validate

func (w *WorkspaceForm) Validate(workspace formula.Workspace) error

type WorkspaceListHasherMock

type WorkspaceListHasherMock struct {
	mock.Mock
}

func (*WorkspaceListHasherMock) CurrentHash

func (w *WorkspaceListHasherMock) CurrentHash(formulaPath string) (string, error)

func (*WorkspaceListHasherMock) List

func (*WorkspaceListHasherMock) PreviousHash

func (w *WorkspaceListHasherMock) PreviousHash(formulaPath string) (string, error)

func (*WorkspaceListHasherMock) UpdateHash

func (w *WorkspaceListHasherMock) UpdateHash(formulaPath string, hash string) error

type WorkspaceMock

type WorkspaceMock struct {
	mock.Mock
}

func (*WorkspaceMock) Add

func (w *WorkspaceMock) Add(workspace formula.Workspace) error

func (*WorkspaceMock) List

func (w *WorkspaceMock) List() (formula.Workspaces, error)

Jump to

Keyboard shortcuts

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