2017-09-11 23:40:37 +00:00
|
|
|
package hcl
|
2017-05-14 00:44:11 +00:00
|
|
|
|
2017-05-19 15:42:11 +00:00
|
|
|
// BlockHeaderSchema represents the shape of a block header, and is
|
|
|
|
// used for matching blocks within bodies.
|
|
|
|
type BlockHeaderSchema struct {
|
|
|
|
Type string
|
2017-05-14 00:44:11 +00:00
|
|
|
LabelNames []string
|
2017-05-19 15:42:11 +00: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-14 00:44:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// BodySchema represents the desired shallow structure of a body.
|
|
|
|
type BodySchema struct {
|
2017-05-19 15:42:11 +00:00
|
|
|
Attributes []AttributeSchema
|
|
|
|
Blocks []BlockHeaderSchema
|
2017-05-14 00:44:11 +00:00
|
|
|
}
|