registry

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = New()
View Source
var ErrSourceNotFound = errors.New("source not registered")

Functions

This section is empty.

Types

type FactoryOptions

type FactoryOptions struct {
	Ref     string
	Version string
}

type LanguageInfo

type LanguageInfo struct {
	Language       string `json:"language"`
	FrameworkCount int    `json:"framework_count"`
}

LanguageInfo holds the name of a language and the count of registered frameworks.

type Registry

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

func New

func New() *Registry

func (*Registry) Alias

func (r *Registry) Alias(alias, canonicalID string)

func (*Registry) Create

func (r *Registry) Create(id string, repoPath string, opts FactoryOptions) (source.Source, error)

func (*Registry) Get

func (r *Registry) Get(id string) (SourceFactory, bool)

func (*Registry) Languages

func (r *Registry) Languages() []LanguageInfo

Languages returns all distinct languages with their framework counts, sorted alphabetically by language name.

func (*Registry) List

func (r *Registry) List() []string

func (*Registry) ListByLanguage

func (r *Registry) ListByLanguage(language string) []string

func (*Registry) Register

func (r *Registry) Register(id string, f SourceFactory)

type SourceFactory

type SourceFactory func(repoPath string, opts FactoryOptions) (source.Source, error)

Jump to

Keyboard shortcuts

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