0d6247f4cf
A BlockLabelSpec can be placed in the nested spec structure of one of the block specs to require and obtain labels on that block. This is a more generic methodology than BlockMapSpec since it allows the result to be a list or set with the labels inside the values, rather than forcing all the label tuples to be unique and losing the ordering by collapsing into a map structure.
24 lines
681 B
Go
24 lines
681 B
Go
package hcldec
|
|
|
|
import (
|
|
"encoding/gob"
|
|
)
|
|
|
|
func init() {
|
|
// Every Spec implementation should be registered with gob, so that
|
|
// specs can be sent over gob channels, such as using
|
|
// github.com/hashicorp/go-plugin with plugins that need to describe
|
|
// what shape of configuration they are expecting.
|
|
gob.Register(ObjectSpec(nil))
|
|
gob.Register(TupleSpec(nil))
|
|
gob.Register((*AttrSpec)(nil))
|
|
gob.Register((*LiteralSpec)(nil))
|
|
gob.Register((*ExprSpec)(nil))
|
|
gob.Register((*BlockSpec)(nil))
|
|
gob.Register((*BlockListSpec)(nil))
|
|
gob.Register((*BlockSetSpec)(nil))
|
|
gob.Register((*BlockMapSpec)(nil))
|
|
gob.Register((*BlockLabelSpec)(nil))
|
|
gob.Register((*DefaultSpec)(nil))
|
|
}
|