gitlab

package
v0.0.0-...-f4d96fc Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CiConfig

type CiConfig struct {
	Spec Spec  `yaml:"spec"`
	Jobs []Job `yaml:"-"`
}

CiConfig represents the GitLab CI configuration.

func (*CiConfig) UnmarshalYAML

func (gitlabCiConfig *CiConfig) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML is called when using yaml.Unmarshal on a GitLabCiConfig type.

Parameters:

  • node: The YAML node to unmarshal.

Returns:

  • error: An error if unmarshalling fails.

type Component

type Component struct {
	Jobs        []Job
	Description string
	Name        string
	Inputs      []Input
}

Component represents a GitLab CI component.

type ComponentsDocumentation

type ComponentsDocumentation struct {
	RepoURL    string
	Version    string
	Components []Component
}

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 Job

type Job struct {
	Name    string
	Comment string
}

Job represents a job in the GitLab CI configuration.

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.

type Spec

type Spec struct {
	Inputs  []Input `yaml:"inputs"`
	Comment string  `yaml:"-"`
}

Spec defines the "spec" keyword of the GitLab CI configuration.

Jump to

Keyboard shortcuts

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