Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentsDocumentation ¶
ComponentsDocumentation represents the data needed to document GitLab CI/CD components.
type DocumentationGenerator ¶
type DocumentationGenerator interface {
GenerateDocumentation(
filesystem afero.Fs,
componentDirectory string,
templateFilePath string,
repoURL string,
componentVersion string,
outputFilePath string,
checkOnly bool)
}
DocumentationGenerator defines the interface for generating documentation.
type Input ¶
type Input struct {
Name string `yaml:"-"`
Description string `yaml:"description,omitempty"`
Type string `yaml:"type,omitempty"`
Default interface{} `yaml:"default,omitempty"`
Options []interface{} `yaml:"options,omitempty"`
Regex string `yaml:"regex,omitempty"`
}
Input represents an input parameter for the GitLab CI spec.
type RealDocumentationGenerator ¶
type RealDocumentationGenerator struct{}
RealDocumentationGenerator implements the DocumentationGenerator interface.
func (*RealDocumentationGenerator) GenerateDocumentation ¶
func (r *RealDocumentationGenerator) GenerateDocumentation( filesystem afero.Fs, componentDirectory string, templateFilePath string, repoURL string, componentVersion string, outputFilePath string, checkOnly bool, )
GenerateDocumentation generates documentation for GitLab CI/CD components. It processes the components in the specified directory using a given template.
Parameters:
- filesystem: An interface for interacting with the file system.
- componentDirectory: The directory containing the component YAML files.
- templateFilePath: The path to the template file used for generating documentation.
- repoURL: The URL of the repository containing the components.
- componentVersion: The version or ref of the components to document.
- outputFilePath: The path where the generated documentation will be saved.
- checkOnly: If true, checks if the documentation is up-to-date without writing the file.
Click to show internal directories.
Click to hide internal directories.