// Exists return whether or not the service image already exists
967458
func Exists(ctx context.Context, clt client.ImageAPIClient, image string) (bool, error) {
	_, err := InspectImage(ctx, clt, image)
	if err != nil {
		if client.IsErrNotFound(err) {
			return false, nil
		}
		return false, err
	}
	return true, nil
}
101655
func (s *Store) Exists(ctx context.Context, name string) bool {
	_, err := s.Get(ctx, name)
	return err == nil
}
996085
func (c *MemoryStore) Exists(key string) (bool, error) {
	if _, exists := c.cache.Get(key); exists {
		return true, nil
	}
	return false, nil
}
1073843
func (r *DNSResolver) Exists(name string) (bool, error) {
	ips, err := net.LookupIP(name)
	err = errDNS(err)
	if err != nil {
		return false, err
	}
	return len(ips) > 0, nil
}
831201
func (batch *UpdateBatch) Exists(ns string, key string) bool {
	nsUpdates, ok := batch.updates[ns]
	if !ok {
		return false
	}
	_, ok = nsUpdates.m[key]
	return ok
}
1044020
func (cd *Codec) Exists(key string) bool {
	return cd.Get(key, nil) == nil
}
754998
func (s *StoreToPodLister) Exists(pod *api.Pod) (bool, error) {
	_, exists, err := s.Store.Get(pod)
	if err != nil {
		return false, err
	}
	return exists, nil
}
1056370
func (c *Cookies) Exists(key string) bool {
	c.Mu.Lock()
	if c.Storage == nil {
		c.Storage = make(map[string]string, zero)
		c.Mu.Unlock()
		return false
	}
	if _, ok := c.Storage[key]; ok {
		c.Mu.Unlock()
		return ok
	}
	c.Mu.Unlock()
	return false
}
997928
func Exists(path string, fs afero.Fs) (bool, error) {
	return afero.Exists(fs, path)
}
164714
func (r *RepositoryService) Exists(model interface{}, id int) bool {
	db, err := r.Connections.Make()

	if err != nil {
		return false
	}

	itemCount := 0
	db.Model(model).Where("id = ?", id).Count(&itemCount)

	return itemCount > 0
}
27176
func (instanceApi *InstanceApi) Exists(id string) (bool, error) {
	_, err := instanceApi.Get(id)
	if err != nil {
		if ccaError, ok := err.(api.CcaErrorResponse); ok && ccaError.StatusCode == 404 {
			return false, nil
		}
		return false, err
	}
	return true, nil
}
513075
func (cfs *cacheFSObjects) Exists(ctx context.Context, bucket, object string) bool {
	_, err := cfs.GetObjectInfo(ctx, bucket, object, ObjectOptions{})
	return err == nil
}
362199
func (z *zookeeperKV) exists(key string) (bool, error) {
	key = z.domain + normalize(key)
	exists, _, err := z.client.Exists(key)
	if err != nil {
		return false, err
	}
	return exists, nil
}
168653
func (s Int64Slice) Exists(x int64) bool {
	i := s.Search(x)
	if i == len(s) {
		return false
	}

	return s[i] == x
}
81025
func (c *Client) Exists(path string) (bool, error) {
	if strings.HasPrefix(path, "s3://") {
		s3Conn, err := s3ConnectionInformation(path, c.Region)
		if err != nil {
			return false, err
		}
		return existsS3(s3Conn)
	}
	return existsLocal(path)
}
1336423
func (r *RedisStore) Exists(key string) (bool, error) {
	cmd := r.client.Exists(key)
	return cmd.Val(), cmd.Err()
}
515110
func (c *Conf) Exist() bool {
	_, err := os.Stat(c.Path())
	return (err == nil)
}