Rename search.IGetRecentPermanodes to search.GetRecentPermanoder

Better Go style. Plus Permanoder is funny. And IFoo looks like C#.

Change-Id: Ie418117c15a145c6c61a2f7e5fb31ae53a5d8bb6
This commit is contained in:
Brad Fitzpatrick 2015-02-02 10:45:41 +01:00
parent 6425d033fd
commit 5c0e9a1fbe
2 changed files with 5 additions and 8 deletions

View File

@ -440,9 +440,9 @@ func (c *Client) SyncHandlers() ([]*SyncInfo, error) {
return c.syncHandlers, nil
}
var _ search.IGetRecentPermanodes = (*Client)(nil)
var _ search.GetRecentPermanoder = (*Client)(nil)
// GetRecentPermanodes implements search.IGetRecentPermanodes against a remote server over HTTP.
// GetRecentPermanodes implements search.GetRecentPermanoder against a remote server over HTTP.
func (c *Client) GetRecentPermanodes(req *search.RecentRequest) (*search.RecentResponse, error) {
sr, err := c.SearchRoot()
if err != nil {

View File

@ -67,18 +67,15 @@ type Handler struct {
wsHub *wsHub
}
// IGetRecentPermanodes is the interface encapsulating the GetRecentPermanodes query.
type IGetRecentPermanodes interface {
// GetRecentPermanoder is the interface containing the GetRecentPermanodes method.
type GetRecentPermanoder interface {
// GetRecentPermanodes returns recently-modified permanodes.
// This is a higher-level query returning more metadata than the index.GetRecentPermanodes,
// which only scans the blobrefs but doesn't return anything about the permanodes.
// TODO: rename this one?
GetRecentPermanodes(*RecentRequest) (*RecentResponse, error)
}
var (
_ IGetRecentPermanodes = (*Handler)(nil)
)
var _ GetRecentPermanoder = (*Handler)(nil)
func NewHandler(index index.Interface, owner blob.Ref) *Handler {
sh := &Handler{