github.com/lyraproj/hiera@v1.0.0-rc4/api/dataprovider.go (about)

     1  package api
     2  
     3  import (
     4  	"github.com/lyraproj/dgo/dgo"
     5  )
     6  
     7  // A DataProvider performs a lookup using a configured lookup function.
     8  type DataProvider interface {
     9  	// Hierarchy returns the entry where this provider was configured
    10  	Hierarchy() Entry
    11  
    12  	// FullName returns a descriptive name of the data provider. Used by the explainer
    13  	FullName() string
    14  
    15  	// Perform a lookup of the given key, invocation and location, and return the result.
    16  	// The invocation is guaranteed to be a resolved locations derived from the locations
    17  	// present in this providers hierarchy, or nil if no location is present.
    18  	LookupKey(key Key, ic Invocation, location Location) dgo.Value
    19  }