Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DocOutput ¶
type DocOutput struct {
Short string `json:"short"`
Long string `json:"long"`
Examples string `json:"examples"`
Image string `json:"image"`
Description string `json:"description"`
Tags []string `json:"tags"`
SourceURL string `json:"sourceURL"`
ExamplePackageURLs []string `json:"examplePackageURLs"`
License string `json:"license"`
Hidden bool `json:"hidden"`
}
DocOutput is the canonical JSON structure for --doc output. The SDK owns this schema as the single source of truth. Downstream consumers (e.g. catalog Hugo pipeline, metadata-schema.json) validate against a subset of these fields.
type Metadata ¶
type Metadata struct {
Image string `yaml:"image" json:"image"`
Description string `yaml:"description" json:"description"`
Tags []string `yaml:"tags" json:"tags"`
SourceURL string `yaml:"sourceURL" json:"sourceURL"`
ExamplePackageURLs []string `yaml:"examplePackageURLs" json:"examplePackageURLs"`
License string `yaml:"license" json:"license"`
Hidden bool `yaml:"hidden" json:"hidden"`
}
Metadata holds parsed metadata.yaml content.
func ParseMetadata ¶
ParseMetadata parses metadata.yaml content into a Metadata struct. Returns zero-value Metadata and an error if YAML is invalid. Returns successfully with partial fields if optional fields are missing.
type Sections ¶
Sections holds parsed README marker content.
func ParseMarkers ¶
ParseMarkers extracts mdtogo marker sections from README content. Missing markers result in empty strings for the corresponding sections. When no markers are present at all, the full content (trimmed) is returned as the Long description.