Documentation
¶
Overview ¶
Package mdcred converts markdown credential definitions to VCTM format files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvertResult ¶
type ConvertResult struct {
Slug string // base name without .md extension
SourcePath string // absolute path to the source .md file
Files map[string]string // format name → output file path
}
ConvertResult describes a credential converted from markdown.
func ConvertDir ¶
func ConvertDir(dir, baseURL string) ([]ConvertResult, error)
ConvertDir scans dir (and subdirectories) for markdown credential files (those with vct: or doctype: in YAML front matter — mdoc-only credentials have no vct) and converts them to VCTM/MDDL/etc. format files alongside the source markdown. It returns the list of converted credentials. Already-existing output files are skipped (the repo may have pre-built them).
func ConvertDirPath ¶ added in v0.12.0
func ConvertDirPath(dir, subPath, baseURL string) ([]ConvertResult, error)
ConvertDirPath works like ConvertDir but restricts discovery to the given relative subPath within dir. If subPath is empty, the entire dir is scanned.