Documentation
¶
Index ¶
- Variables
- func ConcatenateSubsections(subsections []*NodeSubsection) string
- func ExpandGlob(pattern string, knownNodes []string, declaringNode *string) ([]string, error)
- func ExtractAgentContent(node *Node) string
- func ExtractBlock(content []string) string
- func FormatSection(rawHeading string, content []string) string
- func NormalizeText(rawString string) string
- func ReadFileContent(cfsPath oslayer.CfsPath) (string, error)
- func ResolvedOutput(node *Node) *string
- type CfsNodeType
- type CfsReference
- type Node
- type NodeFrontmatter
- type NodeSection
- type NodeSubsection
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFileUnreadable = errors.New("file unreadable") ErrMalformedYAML = errors.New("malformed YAML") ErrUnknownFrontmatterField = errors.New("unknown frontmatter field") ErrNotASpecReference = errors.New("not a SPEC/ reference") ErrHasQualifier = errors.New("logical name has qualifier") ErrUnexpectedContentBeforeFirstHeading = errors.New("unexpected content before first heading") ErrNodeNameDoesNotMatch = errors.New("node name does not match") ErrDuplicatePublicSection = errors.New("duplicate # Public section") ErrDuplicateAgentSection = errors.New("duplicate # Agent section") ErrDuplicatePrivateSection = errors.New("duplicate # Private section") ErrUnrecognizedSection = errors.New("unrecognized section") ErrDuplicateSubsection = errors.New("duplicate subsection") ErrUnrecognizedPrefix = errors.New("unrecognized prefix") ErrInvalidName = errors.New("invalid name") ErrNoOutput = errors.New("no output declared") ErrInvalidPath = errors.New("invalid path") ErrInvalidGlob = errors.New("invalid glob pattern") ErrEmptyNodeList = errors.New("knownNodes is nil or empty") )
Functions ¶
func ConcatenateSubsections ¶
func ConcatenateSubsections(subsections []*NodeSubsection) string
func ExpandGlob ¶
func ExtractAgentContent ¶
func ExtractBlock ¶
func FormatSection ¶
func NormalizeText ¶
func ResolvedOutput ¶
Types ¶
type CfsNodeType ¶
type CfsNodeType int
const ( CfsNodeTypeSpec CfsNodeType = iota CfsNodeTypeArtifact CfsNodeType = iota CfsNodeTypeVerdict CfsNodeType = iota CfsNodeTypeExternal CfsNodeType = iota )
type CfsReference ¶
type CfsReference struct {
NodeType CfsNodeType
LogicalName string
Qualifier *string
Path string
ParentName *string
}
func CfsReferenceFromName ¶
func CfsReferenceFromName(logicalName string) (*CfsReference, error)
func CfsReferenceFromPath ¶
func CfsReferenceFromPath(cfsPath oslayer.CfsPath) (*CfsReference, error)
type Node ¶
type Node struct {
Reference CfsReference
Frontmatter *NodeFrontmatter
NameSection NodeSection
Public *NodeSection
Agent *NodeSection
Private *NodeSection
}
type NodeFrontmatter ¶
type NodeSection ¶
type NodeSection struct {
Heading string
RawHeading string
Content []string
Subsections []*NodeSubsection
}
type NodeSubsection ¶
Click to show internal directories.
Click to hide internal directories.