hcl/schema.go

22 lines
538 B
Go
Raw Normal View History

package hcl
2017-05-13 17:44:11 -07:00
2017-05-19 08:42:11 -07:00
// BlockHeaderSchema represents the shape of a block header, and is
// used for matching blocks within bodies.
type BlockHeaderSchema struct {
Type string
2017-05-13 17:44:11 -07:00
LabelNames []string
2017-05-19 08:42:11 -07:00
}
// AttributeSchema represents the requirements for an attribute, and is used
// for matching attributes within bodies.
type AttributeSchema struct {
Name string
Required bool
2017-05-13 17:44:11 -07:00
}
// BodySchema represents the desired shallow structure of a body.
type BodySchema struct {
2017-05-19 08:42:11 -07:00
Attributes []AttributeSchema
Blocks []BlockHeaderSchema
2017-05-13 17:44:11 -07:00
}