big tings
This commit is contained in:
30
template/structs.go
Normal file
30
template/structs.go
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
CodecType CodecType
|
||||
Required bool
|
||||
Value any
|
||||
}
|
||||
|
||||
type Block struct {
|
||||
Type BlockType
|
||||
Path string
|
||||
Codec CodecType
|
||||
Required bool
|
||||
ListTemplate string
|
||||
Fields []BlockField
|
||||
Value any
|
||||
content string
|
||||
}
|
||||
|
||||
func (b Block) GetContent() string {
|
||||
return b.content
|
||||
}
|
Reference in New Issue
Block a user