github.com/hoffie/larasync@v0.0.0-20151025221940-0384d2bddcef/repository/tracker/nib.go (about)

     1  package tracker
     2  
     3  // NIBTracker enables a client repository to have a path
     4  // to nib lookup.
     5  type NIBTracker interface {
     6  	// Add registers the given nibID for the given path.
     7  	Add(path string, nibID string) error
     8  	// Remove removes the given path from being tracked.
     9  	Remove(path string) error
    10  	// Get returns the nibID for the given path.
    11  	Get(path string) (*NIBSearchResponse, error)
    12  	// SearchPrefix returns all nibIDs with the given path.
    13  	// The map being returned has the paths
    14  	SearchPrefix(prefix string) ([]*NIBSearchResponse, error)
    15  }