2020-10-30 07:26:22 -04:00
|
|
|
package addrs
|
|
|
|
|
|
|
|
// Referenceable is an interface implemented by all address types that can
|
|
|
|
// appear as references in configuration language expressions.
|
|
|
|
type Referenceable interface {
|
2020-11-04 07:20:05 -05:00
|
|
|
// referenceableSigil is private to ensure that all Referenceables are
|
|
|
|
// implentented in this current package. For now this does nothing.
|
2020-10-30 07:26:22 -04:00
|
|
|
referenceableSigil()
|
|
|
|
|
|
|
|
// String produces a string representation of the address that could be
|
|
|
|
// parsed as a HCL traversal and passed to ParseRef to produce an identical
|
|
|
|
// result.
|
|
|
|
String() string
|
|
|
|
}
|
|
|
|
|
2020-11-04 07:20:05 -05:00
|
|
|
// referenceable is an empty struct that implements Referenceable, add it to
|
|
|
|
// your Referenceable struct so that it can be recognized as such.
|
2020-10-30 07:26:22 -04:00
|
|
|
type referenceable struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r referenceable) referenceableSigil() {
|
|
|
|
}
|