Files
marka/template/structs.go
Max Richter 75d6dab008
All checks were successful
Build and Push Server / build-and-push (push) Successful in 7m4s
feat: reimplement pathAlias for yaml fields
2025-10-24 11:12:35 +02:00

33 lines
613 B
Go

package template
type BlockType string
const (
DataBlock BlockType = "data" // content between lines "{" and "}"
MatchingBlock BlockType = "matching" // everything outside data blocks
)
type BlockField struct {
Path string
PathAliases []string
CodecType CodecType
Value any
Hidden bool
}
type Block struct {
Type BlockType
Path string
PathAliases []string
Codec CodecType
ListTemplate string
Fields []BlockField
Optional bool
Value any
content Slice
}
func (b Block) GetContent() string {
return b.content.String()
}