Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultStrategiesGitRepoFolder = "data/strategies"
View Source
const DefaultStrategiesGitRepoUrl = "https://github.com/danielmiessler/fabric.git"
Variables ¶
This section is empty.
Functions ¶
func LoadAllFiles ¶
Types ¶
type StrategiesManager ¶
type StrategiesManager struct {
*plugins.PluginBase
Strategies map[string]Strategy
DefaultGitRepoUrl *plugins.SetupQuestion
DefaultFolder *plugins.SetupQuestion
}
func NewStrategiesManager ¶
func NewStrategiesManager() (sm *StrategiesManager)
func (*StrategiesManager) IsConfigured ¶
func (sm *StrategiesManager) IsConfigured() (ret bool)
func (*StrategiesManager) ListStrategies ¶
func (sm *StrategiesManager) ListStrategies(shellCompleteList bool) error
ListStrategies prints available strategies
func (*StrategiesManager) PopulateDB ¶
func (sm *StrategiesManager) PopulateDB() (err error)
PopulateDB downloads strategies from the internet and populates the strategies folder
func (*StrategiesManager) Setup ¶
func (sm *StrategiesManager) Setup() (err error)
type Strategy ¶
type Strategy struct {
Name string `json:"name"`
Description string `json:"description"`
Prompt string `json:"prompt"`
}
func LoadStrategy ¶
LoadStrategy loads a strategy from the given name. The resolved path is validated to stay within the strategy directory to prevent path traversal.
Click to show internal directories.
Click to hide internal directories.