autodiscovery

package
v0.37.7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverAndGenerateBuildGroups

func DiscoverAndGenerateBuildGroups(rootDir string) (container.BuildGroups, error)

DiscoverAndGenerateBuildGroups is a convenience function that combines discovery and build generation

func DiscoverAndGenerateBuildGroupsMultiLang

func DiscoverAndGenerateBuildGroupsMultiLang(rootDir string) (container.BuildGroups, error)

DiscoverAndGenerateBuildGroupsMultiLang is the multi-language equivalent of the Go-only function

func DiscoverAndGenerateBuildGroupsWithFilter

func DiscoverAndGenerateBuildGroupsWithFilter(rootDir string, filter LanguageFilter) (container.BuildGroups, error)

DiscoverAndGenerateBuildGroupsWithFilter discovers projects with language filtering

func DiscoverGoProjectsAndGenerateBuildGroups

func DiscoverGoProjectsAndGenerateBuildGroups(rootDir string) (container.BuildGroups, error)

DiscoverGoProjectsAndGenerateBuildGroups maintains backward compatibility

func GenerateBuildGroups

func GenerateBuildGroups(projects []Project) container.BuildGroups

GenerateBuildGroups creates container.BuildGroups from discovered Go projects

func GenerateBuildGroupsFromCollection

func GenerateBuildGroupsFromCollection(collection *ProjectCollection) container.BuildGroups

GenerateBuildGroupsFromCollection creates container.BuildGroups from a project collection

func GoProjectToBuild

func GoProjectToBuild(project Project) container.Build

GoProjectToBuild converts a discovered Go project to a container.Build configuration

func JavaProjectToBuild

func JavaProjectToBuild(project Project) container.Build

JavaProjectToBuild converts a discovered Java project to a container.Build configuration

func PythonProjectToBuild

func PythonProjectToBuild(project Project) container.Build

PythonProjectToBuild converts a discovered Python project to a container.Build configuration

Types

type DiscoveryOptions

type DiscoveryOptions struct {
	RootDir   string
	Languages LanguageFilter
	Verbose   bool
}

DiscoveryOptions holds configuration for project discovery

type LanguageFilter

type LanguageFilter struct {
	Go     bool
	Python bool
	Java   bool
}

LanguageFilter represents which languages to discover

func AllLanguages

func AllLanguages() LanguageFilter

AllLanguages returns a filter that includes all supported languages

func OnlyGo

func OnlyGo() LanguageFilter

OnlyGo returns a filter that includes only Go projects (for backward compatibility)

type Project

type Project struct {
	MainFile    string
	ModulePath  string
	ModuleName  string
	AppName     string
	SourceFiles []string
	ProtoFiles  []string
	IsService   bool
	BuildType   protos2.BuildType
}

GoProject represents a discovered Go project/module

func DiscoverGoProjects

func DiscoverGoProjects(rootDir string) ([]Project, error)

DiscoverGoProjects scans the given root directory recursively for Go projects

func DiscoverJavaProjects

func DiscoverJavaProjects(rootDir string) ([]Project, error)

DiscoverJavaProjects scans the given root directory recursively for Java projects

func DiscoverPythonProjects

func DiscoverPythonProjects(rootDir string) ([]Project, error)

DiscoverPythonProjects scans the given root directory recursively for Python projects

func (Project) BuilderFunction

func (p Project) BuilderFunction() string

func (Project) ToBuild

func (p Project) ToBuild() container.Build

type ProjectCollection

type ProjectCollection struct {
	GoProjects     []Project
	PythonProjects []Project
	JavaProjects   []Project
}

ProjectCollection holds discovered projects from all supported languages

func ConvertGoProjectsToCollection

func ConvertGoProjectsToCollection(goProjects []Project) *ProjectCollection

ConvertGoProjectsToCollection converts existing Go projects to the new collection format

func DiscoverAllProjects

func DiscoverAllProjects(options DiscoveryOptions) (*ProjectCollection, error)

DiscoverAllProjects scans for projects in all supported languages

func DiscoverProjects

func DiscoverProjects(rootDir string) (*ProjectCollection, error)

DiscoverProjects is a convenience function that discovers all projects with default options

func DiscoverProjectsWithFilter

func DiscoverProjectsWithFilter(rootDir string, filter LanguageFilter) (*ProjectCollection, error)

DiscoverProjectsWithFilter discovers projects for specific languages

func (*ProjectCollection) AllProjects

func (pc *ProjectCollection) AllProjects() []Project

AllProjects returns all discovered projects as a slice of Project interfaces

func (*ProjectCollection) CountByType

func (pc *ProjectCollection) CountByType() map[ProjectType]int

CountByType returns the number of projects discovered for each type

func (*ProjectCollection) IsEmpty

func (pc *ProjectCollection) IsEmpty() bool

IsEmpty returns true if no projects were discovered

type ProjectType

type ProjectType string

ProjectType represents the language/framework type of a discovered project

const (
	ProjectTypeGo     ProjectType = "go"
	ProjectTypePython ProjectType = "python"
	ProjectTypeJava   ProjectType = "java"
)

Jump to

Keyboard shortcuts

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