Documentation
¶
Index ¶
- Variables
- func AllSupportedTargets() []types.Target
- func AllSupportedTemplateNames() []string
- func CheckLanguageSupported(language string) booldeprecated
- func GetAllTemplateDependencies() (map[string][]TemplateDependency, error)
- func GetAvailableTemplates() []string
- func GetCPEToTemplatesMap() (map[string][]DependencyWithTemplate, error)
- func GetLanguageConfigFields(target types.Target, newSDK bool) ([]config.SDKGenConfigField, error)
- func GetMinimumTargetVersion() map[string]string
- func GetSupportedLanguages() []stringdeprecated
- func GetSupportedMCPTargets() []types.Target
- func GetSupportedMCPTemplateNames() []string
- func GetSupportedSDKTargets() []types.Target
- func GetSupportedSDKTemplateNames() []string
- func GetSupportedTargets() []types.Targetdeprecated
- func GetSupportedTerraformTargets() []types.Target
- func GetSupportedTerraformTemplateNames() []string
- func GetTargetFromTargetString(target string) (types.Target, error)
- func GetUniqueCPEs() ([]string, error)
- func IsSupportedMCPTemplateName(templateName string) bool
- func IsSupportedSDKTemplateName(templateName string) bool
- func IsSupportedTemplateName(templateName string) bool
- func IsSupportedTerraformTemplateName(templateName string) bool
- func ResolveConfig(cfg *config.Configuration, target types.Target, outDir string, ...) error
- type DependencyWithTemplate
- type TemplateDependency
Constants ¶
This section is empty.
Variables ¶
var SupportedSDKDocsLanguages = []string{"go", "python", "typescript", "csharp", "unity", "java", "curl"}
Functions ¶
func AllSupportedTargets ¶
func AllSupportedTemplateNames ¶
func AllSupportedTemplateNames() []string
func CheckLanguageSupported
deprecated
func GetAllTemplateDependencies ¶
func GetAllTemplateDependencies() (map[string][]TemplateDependency, error)
GetAllTemplateDependencies returns the structured dependency list for all targets
func GetAvailableTemplates ¶
func GetAvailableTemplates() []string
func GetCPEToTemplatesMap ¶
func GetCPEToTemplatesMap() (map[string][]DependencyWithTemplate, error)
GetCPEToTemplatesMap returns a map of CPE to all templates that use it This properly handles cases where multiple templates share the same dependency
func GetLanguageConfigFields ¶
func GetMinimumTargetVersion ¶
func GetSupportedLanguages
deprecated
func GetSupportedLanguages() []string
Deprecated: Use AllSupportedTemplateNames or GetSupportedSDKTemplateNames instead.
func GetSupportedMCPTargets ¶
Returns the supported MCP targets based on the templates directories.
func GetSupportedMCPTemplateNames ¶
func GetSupportedMCPTemplateNames() []string
Returns the supported MCP template names based on the templates directories.
func GetSupportedSDKTargets ¶
Returns the supported SDK targets based on the templates directories.
func GetSupportedSDKTemplateNames ¶
func GetSupportedSDKTemplateNames() []string
Returns the supported SDK template names based on the templates directories.
func GetSupportedTargets
deprecated
func GetSupportedTerraformTargets ¶
Returns the supported Terraform targets based on the templates directories.
func GetSupportedTerraformTemplateNames ¶
func GetSupportedTerraformTemplateNames() []string
Returns the supported Terraform template names based on the templates directories.
func GetUniqueCPEs ¶
GetUniqueCPEs returns a deduplicated list of all CPE identifiers across all targets
func IsSupportedMCPTemplateName ¶
Returns true if given template name is a supported MCP template.
Checks include:
- Whether the template is outside MCP template naming.
- Whether the template name exists in the templates directory.
- Whether the template is hidden (i.e., does not have a "HIDDEN" file in its directory).
func IsSupportedSDKTemplateName ¶
Returns true if given template name is a supported SDK template.
Checks include:
- Whether the template is outside SDK templates, such as "common" (used for shared code), starts with "mcp-" (MCP templates), "terraform" (Terraform template).
- Whether the template name exists in the templates directory.
- Whether the template is hidden (i.e., does not have a "HIDDEN" file in its directory).
func IsSupportedTemplateName ¶
func IsSupportedTerraformTemplateName ¶
Returns true if given template name is a supported Terraform template.
Checks include:
- Whether the template is outside Terraform template naming.
- Whether the template name exists in the templates directory.
- Whether the template is hidden (i.e., does not have a "HIDDEN" file in its directory).
func ResolveConfig ¶
func ResolveConfig(cfg *config.Configuration, target types.Target, outDir string, fs filesystem.FileSystem) error
Types ¶
type DependencyWithTemplate ¶
type DependencyWithTemplate struct {
TemplateName string
Dependency TemplateDependency
}
DependencyWithTemplate associates a dependency with its source template
type TemplateDependency ¶
type TemplateDependency struct {
Name string `mapstructure:"name"`
Version string `mapstructure:"version"`
CPE string `mapstructure:"cpe"`
Ecosystem string `mapstructure:"ecosystem"`
Category string `mapstructure:"category"`
Condition string `mapstructure:"condition,omitempty"`
}
TemplateDependency represents a structured dependency with CPE identifier for security scanning
func GetTemplateDependencies ¶
func GetTemplateDependencies(target types.Target) ([]TemplateDependency, error)
GetTemplateDependencies returns the structured dependency list for a given target