2023-05-02 11:33:06 -04:00
|
|
|
// Copyright IBM Corp. 2014, 2026
|
2023-08-10 18:43:27 -04:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-05-02 11:33:06 -04:00
|
|
|
|
2018-03-30 22:58:57 -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 {
|
2018-04-03 21:03:47 -04:00
|
|
|
// All implementations of this interface must be covered by the type switch
|
|
|
|
|
// in lang.Scope.buildEvalContext.
|
2018-03-30 22:58:57 -04:00
|
|
|
referenceableSigil()
|
2018-04-03 21:03:47 -04:00
|
|
|
|
2021-07-10 18:18:19 -04:00
|
|
|
// All Referenceable address types must have unique keys.
|
|
|
|
|
UniqueKeyer
|
|
|
|
|
|
2018-04-03 21:03:47 -04:00
|
|
|
// 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
|
2018-03-30 22:58:57 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type referenceable struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (r referenceable) referenceableSigil() {
|
|
|
|
|
}
|