summaryrefslogtreecommitdiff
path: root/hcldec/gob.go
blob: 27e9be2ee796add424cc22d71ce25e92cd0be90d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

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))
}