code: func (m *Manager) ListRegistryEntries(username string, globalid string) (registryEntries []RegistryEntry, err error) {
  	var selector bson.M
  	if username != "" {
  		selector = bson.M{"username": username}
  	} else {
  		selector = bson.M{"globalid": globalid}
  	}
  	result := struct {
  		Entries []RegistryEntry
  	}{}
  	err = m.getRegistryCollection().Find(selector).Select(bson.M{"entries": 1}).One(&result)
  	if err == mgo.ErrNotFound {
  		err = nil
  		registryEntries = []RegistryEntry{}
  		return
  	}
  	registryEntries = result.Entries
  	return
  }
docs: //ListRegistryEntries gets all registry entries for a user or organization