github.com/hernad/nomad@v1.6.112/jobspec2/addrs/referenceable.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package addrs 5 6 // Referenceable is an interface implemented by all address types that can 7 // appear as references in configuration language expressions. 8 type Referenceable interface { 9 // referenceableSigil is private to ensure that all Referenceables are 10 // implentented in this current package. For now this does nothing. 11 referenceableSigil() 12 13 // String produces a string representation of the address that could be 14 // parsed as a HCL traversal and passed to ParseRef to produce an identical 15 // result. 16 String() string 17 } 18 19 // referenceable is an empty struct that implements Referenceable, add it to 20 // your Referenceable struct so that it can be recognized as such. 21 type referenceable struct { 22 } 23 24 func (r referenceable) referenceableSigil() { 25 }