github.com/lyraproj/hiera@v1.0.0-rc4/api/function.go (about) 1 package api 2 3 // FunctionKind denotes what kind of function this is. 4 type FunctionKind string 5 6 // A Function is a definition of a Hiera lookup function, i.e. a data_dig, data_hash, or lookup_key. 7 type Function interface { 8 // FunctionKind returns the function kind 9 Kind() FunctionKind 10 11 // Name returns the name of the function 12 Name() string 13 14 // Resolve resolves the function on behalf of the given invocation 15 Resolve(ic Invocation) (Function, bool) 16 } 17 18 // KindDataDig is the function kind for data_dig functions 19 const KindDataDig = FunctionKind(`data_dig`) 20 21 // KindDataHash is the function kind for data_dig functions 22 const KindDataHash = FunctionKind(`data_hash`) 23 24 // KindLookupKey is the function kind for data_dig functions 25 const KindLookupKey = FunctionKind(`lookup_key`)