// Get returns a session for the given name after adding it to the registry.
//
// See CookieStore.Get().
169684
func (s *FilesystemStore) Get(r *http.Request, name string) (*Session, error) {
	return GetRegistry(r).Get(s, name)
}
1087738
func (ctx *ResourceContext) Get(name string) interface{} {
	if ctx.Values != nil {
		if v, ok := ctx.Values[name]; ok {
			return v
		}
	}
	return nil
}
834869
func (c *UserStore) Get(ctx context.Context, q chronograf.UserQuery) (*chronograf.User, error) {
	if q.Name == nil {
		return nil, fmt.Errorf("query must specify name")
	}
	u, err := c.Ctrl.User(ctx, *q.Name)
	if err != nil {
		return nil, err
	}

	ur, err := c.Ctrl.UserRoles(ctx)
	if err != nil {
		return nil, err
	}

	role := ur[*q.Name]
	cr := role.ToChronograf()
	// For now we are removing all users from a role being returned.
	for i, r := range cr {
		r.Users = []chronograf.User{}
		cr[i] = r
	}
	return &chronograf.User{
		Name:        u.Name,
		Permissions: ToChronograf(u.Permissions),
		Roles:       cr,
	}, nil
}
1215647
func (c *TodoController) Get() []todo.Item {
	return c.Service.Get(c.Session.ID())
}
396327
func (s *mutatingWebhookConfigurationLister) Get(name string) (*v1beta1.MutatingWebhookConfiguration, error) {
	obj, exists, err := s.indexer.GetByKey(name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(v1beta1.Resource("mutatingwebhookconfiguration"), name)
	}
	return obj.(*v1beta1.MutatingWebhookConfiguration), nil
}
301584
func (c *namespaces) Get(name string) (result *api.Namespace, err error) {
	result = &api.Namespace{}
	err = c.client.Get().
		Resource("namespaces").
		Name(name).
		Do().
		Into(result)
	return
}
454511
func (s *session) Get(table Table, opts ...GetOption) (bool, error) {
	action, ok, err := s.get(table, s.applyGetOption(opts), table.TableMeta().Fields()...)
	if err != nil {
		return ok, s.catch("Get: "+action, err)
	}
	return ok, nil
}
466960
func (f Caches) Get(name string) *Cache {
	return f[strings.ToLower(name)]
}
1228167
func (s *memcacheStore) Get(id string) Session {
	s.mux.RLock()
	defer s.mux.RUnlock()

	// First check our "cache"
	if sess := s.sessions[id]; sess != nil {
		return sess
	}

	// Next check in Memcache
	var err error
	var sess *sessionImpl

	for i := 0; i < s.retries; i++ {
		var sess_ sessionImpl
		_, err = s.codec.Get(s.ctx, s.keyPrefix+id, &sess_)
		if err == memcache.ErrCacheMiss {
			break // It's not in the Memcache (e.g. invalid sess id or was removed from Memcache by AppEngine)
		}
		if err == nil {
			sess = &sess_
			break
		}
		// Service error? Retry..
	}

	if sess == nil {
		if err != nil && err != memcache.ErrCacheMiss {
			log.Errorf(s.ctx, "Failed to get session from memcache, id: %s, error: %v", id, err)
		}

		// Ok, we didn't get it from Memcache (either was not there or Memcache service is unavailable).
		// Now it's time to check in the Datastore.
		key := datastore.NewKey(s.ctx, s.dsEntityName, id, 0, nil)
		for i := 0; i < s.retries; i++ {
			e := SessEntity{}
			err = datastore.Get(s.ctx, key, &e)
			if err == datastore.ErrNoSuchEntity {
				return nil // It's not in the Datastore either
			}
			if err != nil {
				// Service error? Retry..
				continue
			}
			if e.Expires.Before(time.Now()) {
				// Session expired.
				datastore.Delete(s.ctx, key) // Omitting error check...
				return nil
			}
			var sess_ sessionImpl
			if err = s.codec.Unmarshal(e.Value, &sess_); err != nil {
				break // Invalid data in stored session entity...
			}
			sess = &sess_
			break
		}
	}

	if sess == nil {
		log.Errorf(s.ctx, "Failed to get session from datastore, id: %s, error: %v", id, err)
		return nil
	}

	// Yes! We have it!
	// "Actualize" it, but first, Mutex is not marshaled, so create a new one:
	sess.mux = &sync.RWMutex{}
	sess.Access()
	s.sessions[id] = sess
	return sess
}
830307
func (p *SessionStore) Get(key string) interface{} {
	p.RLock()
	defer p.RUnlock()
	if v, ok := p.values[key]; ok {
		return v
	}
	return nil
}
592660
func (l *Session) Get() (rets.Requester, *rets.CapabilityURLs, error) {
	if l.requester == nil {
		req, closer, urls, err := l.create()
		if err != nil {
			return nil, nil, fmt.Errorf("rets session create")
		}
		l.requester = req
		l.urls = urls
		l.closer = closer
	}
	return l.requester, l.urls, nil
}
1038264
func (c *userIdentityMappings) Get(name string, options v1.GetOptions) (result *user.UserIdentityMapping, err error) {
	result = &user.UserIdentityMapping{}
	err = c.client.Get().
		Resource("useridentitymappings").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}
870567
func (ns *dynamicNamespaceListerShim) Get(name string) (runtime.Object, error) {
	return ns.namespaceLister.Get(name)
}
1139991
func (m *CookieManager) Get(r *http.Request) Session {
	c, err := r.Cookie(m.sessIDCookieName)
	if err != nil {
		return nil
	}

	return m.store.Get(c.Value)
}
625551
func (c *limitRanges) Get(name string) (result *api.LimitRange, err error) {
	result = &api.LimitRange{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("limitranges").
		Name(name).
		Do().
		Into(result)
	return
}
203349
func Get(name string, c echo.Context) (*sessions.Session, error) {
	store := c.Get(key).(sessions.Store)
	return store.Get(c.Request(), name)
}
471814
func (reg *Registry) Get(printerName string) *Printer {
	reg.mu.Lock()
	defer reg.mu.Unlock()
	for _, p := range reg.printers {
		if p.Name == printerName {
			return p
		}
	}
	return nil
}