Documentation
¶
Index ¶
- Variables
- type FactoryOptions
- type LanguageInfo
- type Registry
- func (r *Registry) Alias(alias, canonicalID string)
- func (r *Registry) Create(id string, repoPath string, opts FactoryOptions) (source.Source, error)
- func (r *Registry) Get(id string) (SourceFactory, bool)
- func (r *Registry) Languages() []LanguageInfo
- func (r *Registry) List() []string
- func (r *Registry) ListByLanguage(language string) []string
- func (r *Registry) Register(id string, f SourceFactory)
- type SourceFactory
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 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 (*Registry) Languages ¶
func (r *Registry) Languages() []LanguageInfo
Languages returns all distinct languages with their framework counts, sorted alphabetically by language name.
func (*Registry) ListByLanguage ¶
func (*Registry) Register ¶
func (r *Registry) Register(id string, f SourceFactory)
type SourceFactory ¶
type SourceFactory func(repoPath string, opts FactoryOptions) (source.Source, error)
Click to show internal directories.
Click to hide internal directories.