Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RepoConfigFileName is the expected name of the configuration // file for a TTP repository such as ForgeArmory. // We export it for tests RepoConfigFileName = "ttpforge-repo-config.yaml" // RepoPrefixSep divides the repo name reference from the TTP/template/etc path RepoPrefixSep = "//" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo interface { ListTTPs() ([]string, error) FindTTP(ttpPath string) (string, error) FindTemplate(templatePath string) (string, error) GetFs() afero.Fs GetName() string GetFullPath() string }
Repo provides an interface for finding TTPs and templates from a repo such as ForgeArmory
type RepoCollection ¶ added in v1.0.1
type RepoCollection interface { GetRepo(repoName string) (Repo, error) ResolveTTPRef(ttpRef string) (Repo, string, error) ListTTPs() ([]string, error) }
RepoCollection provides useful methods for resolving and navigating TTPs stored in various different repositories
func NewRepoCollection ¶ added in v1.0.1
NewRepoCollection validates the provided repo specs and assembles them into a RepoCollection
**Parameters:**
fsys: base file system (used for unit testing) specs: a list of repo.Spec entries (usually from the config file)
**Returns:**
RepoCollection: assembled RepoCollection, or nil if there was an error error: an error if there is a problem
Click to show internal directories.
Click to hide internal directories.