discover

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package discover provides AST-based pipeline and job discovery from Go source files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveredJob

type DiscoveredJob struct {
	Name         string   `json:"name"`
	VariableName string   `json:"variable_name"`
	FilePath     string   `json:"file_path"`
	Line         int      `json:"line"`
	Stage        string   `json:"stage,omitempty"`
	Dependencies []string `json:"dependencies,omitempty"`
}

DiscoveredJob represents a job discovered from Go source code.

type DiscoveredPipeline

type DiscoveredPipeline struct {
	Name         string          `json:"name"`
	VariableName string          `json:"variable_name"`
	FilePath     string          `json:"file_path"`
	Line         int             `json:"line"`
	Jobs         []DiscoveredJob `json:"jobs,omitempty"`
}

DiscoveredPipeline represents a pipeline discovered from Go source code.

type DiscoveredRunnerConfig

type DiscoveredRunnerConfig struct {
	VariableName string `json:"variable_name"`
	FilePath     string `json:"file_path"`
	Line         int    `json:"line"`
}

DiscoveredRunnerConfig represents a runner config discovered from Go source code.

type Discoverer

type Discoverer struct {
	// contains filtered or unexported fields
}

Discoverer finds pipeline and job declarations in Go source files.

func New

func New() *Discoverer

New creates a new Discoverer.

func (*Discoverer) Discover

func (d *Discoverer) Discover(dir string) (*Result, error)

Discover finds all pipeline and job declarations in the given directory.

type Result

type Result struct {
	Pipelines     []DiscoveredPipeline     `json:"pipelines,omitempty"`
	Jobs          []DiscoveredJob          `json:"jobs,omitempty"`
	RunnerConfigs []DiscoveredRunnerConfig `json:"runner_configs,omitempty"`
}

Result contains all discovered pipelines and jobs.

Jump to

Keyboard shortcuts

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