Documentation ¶
Index ¶
- Variables
- func List(fsys afero.Fs, path string) (iter.Seq[*Test], error)
- func MediaTypeEntries() []ginkgo.TableEntry
- func MockOsStdin(reader io.Reader) tdl.Stdin
- func MockTermStdin() tdl.Stdin
- func NewGitHubClient() *github.Client
- type Cache
- type MockFileInfo
- type MockGenerator
- func (m *MockGenerator) Execute(ctx context.Context, spec *tdlv1alpha1.Spec) (afero.Fs, error)
- func (m *MockGenerator) String() string
- func (m *MockGenerator) WithExecute(fn func(context.Context, *tdlv1alpha1.Spec) (afero.Fs, error)) *MockGenerator
- func (m *MockGenerator) WithName(name string) *MockGenerator
- func (m *MockGenerator) WithString(fn func() string) *MockGenerator
- type MockOs
- type MockPlugin
- func (p *MockPlugin) Generator(ctx context.Context, m tdl.Meta) (tdl.Generator, error)
- func (m *MockPlugin) Meta() tdl.Meta
- func (p *MockPlugin) Prepare(ctx context.Context) error
- func (p *MockPlugin) String() string
- func (p *MockPlugin) Supports(target tdl.Target) bool
- func (p *MockPlugin) Tool(ctx context.Context, m tdl.Meta) (tdl.Tool, error)
- func (p *MockPlugin) WithGenerator(fn func(context.Context, tdl.Meta) (tdl.Generator, error)) *MockPlugin
- func (m *MockPlugin) WithString(fn func() string) *MockPlugin
- type MockTarget
- func (m *MockTarget) Choose(available iter.Seq[tdl.Plugin]) (tdl.Plugin, error)
- func (m *MockTarget) Meta() tdl.Meta
- func (m *MockTarget) String() string
- func (m *MockTarget) WithGenerator(fn func(iter.Seq[tdl.Plugin]) (tdl.Plugin, error)) *MockTarget
- func (m *MockTarget) WithString(fn func() string) *MockTarget
- type RawTest
- type Test
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MediaTypeEntries ¶
func MediaTypeEntries() []ginkgo.TableEntry
func MockTermStdin ¶ added in v0.0.31
func NewGitHubClient ¶
Types ¶
type Cache ¶
type Cache struct { GetFunc func(string) (*tdl.CacheItem, error) WriterFunc func(string) (io.WriteCloser, error) }
func NewCacheFrom ¶ added in v0.0.33
func NewTmpCache ¶ added in v0.0.33
type MockFileInfo ¶ added in v0.0.31
type MockFileInfo struct { IsDirFn func() bool ModTimeFn func() time.Time ModeFn func() fs.FileMode NameFn func() string SizeFn func() int64 SysFn func() any }
func (MockFileInfo) IsDir ¶ added in v0.0.31
func (f MockFileInfo) IsDir() bool
IsDir implements fs.FileInfo.
func (MockFileInfo) ModTime ¶ added in v0.0.31
func (f MockFileInfo) ModTime() time.Time
ModTime implements fs.FileInfo.
func (MockFileInfo) Mode ¶ added in v0.0.31
func (f MockFileInfo) Mode() fs.FileMode
Mode implements fs.FileInfo.
func (MockFileInfo) Name ¶ added in v0.0.31
func (f MockFileInfo) Name() string
Name implements fs.FileInfo.
func (MockFileInfo) Size ¶ added in v0.0.31
func (f MockFileInfo) Size() int64
Size implements fs.FileInfo.
func (MockFileInfo) Sys ¶ added in v0.0.31
func (f MockFileInfo) Sys() any
Sys implements fs.FileInfo.
type MockGenerator ¶
type MockGenerator struct { ExecuteFunc func(context.Context, *tdlv1alpha1.Spec) (afero.Fs, error) StringFunc func() string }
func (*MockGenerator) Execute ¶
func (m *MockGenerator) Execute( ctx context.Context, spec *tdlv1alpha1.Spec, ) (afero.Fs, error)
Execute implements tdl.Generator.
func (*MockGenerator) String ¶ added in v0.0.32
func (m *MockGenerator) String() string
String implements tdl.Generator.
func (*MockGenerator) WithExecute ¶
func (m *MockGenerator) WithExecute( fn func(context.Context, *tdlv1alpha1.Spec) (afero.Fs, error), ) *MockGenerator
func (*MockGenerator) WithName ¶
func (m *MockGenerator) WithName(name string) *MockGenerator
func (*MockGenerator) WithString ¶
func (m *MockGenerator) WithString( fn func() string, ) *MockGenerator
type MockOs ¶ added in v0.0.31
type MockOs struct { FsValue afero.Fs StderrValue io.Writer StdoutValue io.Writer StdinValue tdl.Stdin }
type MockPlugin ¶
type MockPlugin struct { GeneratorFunc func(context.Context, tdl.Meta) (tdl.Generator, error) ToolFunc func(context.Context, tdl.Meta) (tdl.Tool, error) SupportsFunc func(tdl.Target) bool MetaValue tdl.Meta StringFunc func() string PrepareFunc func(context.Context) error }
func (*MockPlugin) Meta ¶ added in v0.0.33
func (m *MockPlugin) Meta() tdl.Meta
Meta implements tdl.GeneratorPlugin.
func (*MockPlugin) Prepare ¶ added in v0.0.33
func (p *MockPlugin) Prepare(ctx context.Context) error
String implements tdl.Plugin.
func (*MockPlugin) Supports ¶ added in v0.0.33
func (p *MockPlugin) Supports(target tdl.Target) bool
func (*MockPlugin) WithGenerator ¶
func (p *MockPlugin) WithGenerator( fn func(context.Context, tdl.Meta) (tdl.Generator, error), ) *MockPlugin
func (*MockPlugin) WithString ¶
func (m *MockPlugin) WithString( fn func() string, ) *MockPlugin
type MockTarget ¶
type MockTarget struct { ChooseFunc func(iter.Seq[tdl.Plugin]) (tdl.Plugin, error) MetaFunc func() tdl.Meta StringFunc func() string }
func (*MockTarget) Meta ¶ added in v0.0.33
func (m *MockTarget) Meta() tdl.Meta
Meta implements tdl.Target.
func (*MockTarget) WithGenerator ¶ added in v0.0.32
func (m *MockTarget) WithGenerator( fn func(iter.Seq[tdl.Plugin]) (tdl.Plugin, error), ) *MockTarget
func (*MockTarget) WithString ¶
func (m *MockTarget) WithString( fn func() string, ) *MockTarget
Source Files ¶
Click to show internal directories.
Click to hide internal directories.