Documentation
¶
Overview ¶
Package generator provides an interface for generating files from code.
Index ¶
- type Generator
- type MockGenerator
- type MockGenerator_Expecter
- type MockGenerator_Generate_Call
- func (_c *MockGenerator_Generate_Call[T, Options]) Return(s string, err error) *MockGenerator_Generate_Call[T, Options]
- func (_c *MockGenerator_Generate_Call[T, Options]) Run(run func(model T, opts Options)) *MockGenerator_Generate_Call[T, Options]
- func (_c *MockGenerator_Generate_Call[T, Options]) RunAndReturn(run func(model T, opts Options) (string, error)) *MockGenerator_Generate_Call[T, Options]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
Generator is implemented by specific distribution generators (kind, k3d, kustomization). The Options type parameter allows each implementation to define its own options structure.
type MockGenerator ¶ added in v1.12.2
MockGenerator is an autogenerated mock type for the Generator type
func NewMockGenerator ¶ added in v1.12.2
func NewMockGenerator[T any, Options any](t interface { mock.TestingT Cleanup(func()) }) *MockGenerator[T, Options]
NewMockGenerator creates a new instance of MockGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockGenerator[T, Options]) EXPECT ¶ added in v1.12.2
func (_m *MockGenerator[T, Options]) EXPECT() *MockGenerator_Expecter[T, Options]
func (*MockGenerator[T, Options]) Generate ¶ added in v1.12.2
func (_mock *MockGenerator[T, Options]) Generate(model T, opts Options) (string, error)
Generate provides a mock function for the type MockGenerator
type MockGenerator_Expecter ¶ added in v1.12.2
type MockGenerator_Expecter[T any, Options any] struct { // contains filtered or unexported fields }
func (*MockGenerator_Expecter[T, Options]) Generate ¶ added in v1.12.2
func (_e *MockGenerator_Expecter[T, Options]) Generate(model interface{}, opts interface{}) *MockGenerator_Generate_Call[T, Options]
Generate is a helper method to define mock.On call
- model T
- opts Options
type MockGenerator_Generate_Call ¶ added in v1.12.2
MockGenerator_Generate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Generate'
func (*MockGenerator_Generate_Call[T, Options]) Return ¶ added in v1.12.2
func (_c *MockGenerator_Generate_Call[T, Options]) Return(s string, err error) *MockGenerator_Generate_Call[T, Options]
func (*MockGenerator_Generate_Call[T, Options]) Run ¶ added in v1.12.2
func (_c *MockGenerator_Generate_Call[T, Options]) Run(run func(model T, opts Options)) *MockGenerator_Generate_Call[T, Options]
func (*MockGenerator_Generate_Call[T, Options]) RunAndReturn ¶ added in v1.12.2
func (_c *MockGenerator_Generate_Call[T, Options]) RunAndReturn(run func(model T, opts Options) (string, error)) *MockGenerator_Generate_Call[T, Options]
Directories
¶
| Path | Synopsis |
|---|---|
|
Package k3dgenerator provides utilities for generating k3d cluster configurations.
|
Package k3dgenerator provides utilities for generating k3d cluster configurations. |
|
Package kindgenerator provides utilities for generating kind cluster configurations.
|
Package kindgenerator provides utilities for generating kind cluster configurations. |
|
Package kustomizationgenerator provides utilities for generating kustomization.yaml files.
|
Package kustomizationgenerator provides utilities for generating kustomization.yaml files. |
|
Package testutils provides generator-specific test utilities.
|
Package testutils provides generator-specific test utilities. |
|
Package yamlgenerator provides YAML generation functionality for arbitrary models.
|
Package yamlgenerator provides YAML generation functionality for arbitrary models. |