github.com/hashicorp/hcl/v2@v2.20.0/schema.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package hcl 5 6 // BlockHeaderSchema represents the shape of a block header, and is 7 // used for matching blocks within bodies. 8 type BlockHeaderSchema struct { 9 Type string 10 LabelNames []string 11 } 12 13 // AttributeSchema represents the requirements for an attribute, and is used 14 // for matching attributes within bodies. 15 type AttributeSchema struct { 16 Name string 17 Required bool 18 } 19 20 // BodySchema represents the desired shallow structure of a body. 21 type BodySchema struct { 22 Attributes []AttributeSchema 23 Blocks []BlockHeaderSchema 24 }