strategy

package
v1.4.418 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 11 Imported by: 0

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

func LoadAllFiles() (strategies map[string]Strategy, err error)

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

func LoadStrategy(filename string) (*Strategy, error)

LoadStrategy loads a strategy from the given name

Jump to

Keyboard shortcuts

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