// IsBlacklisted gets the blacklist status of check
556764
func (c *ConsulAlertClient) IsBlacklisted(check *Check) bool {
	blacklistExist := func() bool {
		kvPairs, _, err := c.api.KV().List("consul-alerts/config/checks/blacklist/", nil)
		return len(kvPairs) != 0 && err == nil
	}

	node := check.Node
	nodeCheckKey := fmt.Sprintf("consul-alerts/config/checks/blacklist/nodes/%s", node)
	nodeBlacklisted := func() bool {
		return c.CheckKeyExists(nodeCheckKey) || c.CheckKeyMatchesRegexp("consul-alerts/config/checks/blacklist/nodes", node)
	}

	service := "_"
	serviceBlacklisted := func() bool { return false }
	if check.ServiceID != "" {
		service = check.ServiceID
		serviceCheckKey := fmt.Sprintf("consul-alerts/config/checks/blacklist/services/%s", service)

		serviceBlacklisted = func() bool {
			return c.CheckKeyExists(serviceCheckKey) || c.CheckKeyMatchesRegexp("consul-alerts/config/checks/blacklist/services", service)
		}
	}

	checkID := check.CheckID
	checkCheckKey := fmt.Sprintf("consul-alerts/config/checks/blacklist/checks/%s", checkID)

	checkBlacklisted := func() bool {
		return c.CheckKeyExists(checkCheckKey) || c.CheckKeyMatchesRegexp("consul-alerts/config/checks/blacklist/checks", checkID)
	}

	status := "_"
	statusBlacklisted := func() bool { return false }
	if check.Status != "" {
		status = check.Status
		statusCheckKey := fmt.Sprintf("consul-alerts/config/checks/blacklist/status/%s", status)
		statusBlacklisted = func() bool {
			return c.CheckKeyExists(statusCheckKey) || c.CheckKeyMatchesRegexp("consul-alerts/config/checks/blacklist/status", status)
		}
	}

	singleKey := fmt.Sprintf("consul-alerts/config/checks/blacklist/single/%s/%s/%s", node, service, checkID)
	singleBlacklisted := func() bool { return c.CheckKeyExists(singleKey) }

	return blacklistExist() && (nodeBlacklisted() || serviceBlacklisted() || checkBlacklisted() || statusBlacklisted() || singleBlacklisted())
}
247356
func (dl *DefaultLogger) IsAllowed(loglevel LogLevel) bool {
	return logLevelPriorities[loglevel] >= logLevelPriorities[dl.GetLogLevel()]
}
351156
func (s *stream) checkIfCompleted() {
	if s.sendStreamCompleted && s.receiveStreamCompleted {
		s.sender.onStreamCompleted(s.StreamID())
	}
}
1093722
func (b *Blacklist) Block(path string) bool {
	_, _, blocked := b.tree.LongestPrefix(path)
	return blocked
}
414443
func (sys *PolicySys) IsAllowed(args policy.Args) bool {
	sys.RLock()
	defer sys.RUnlock()

	// If policy is available for given bucket, check the policy.
	if p, found := sys.bucketPolicyMap[args.BucketName]; found {
		return p.IsAllowed(args)
	}

	// As policy is not available for given bucket name, returns IsOwner i.e.
	// operation is allowed only for owner.
	return args.IsOwner
}
323799
func IsBlack(c color.Color) bool {
	r, g, b, a := c.RGBA()

	return r == br && g == bg && b == bb && a == ba
}
1031827
func IsJobFinished(j *batchv1.Job) bool {
	isFinished, _ := getFinishedStatus(j)
	return isFinished
}
811222
func (pb *Pushbullet) PostPushesChecklist(c *requests.Checklist) (*responses.Checklist, error) {
	res, err := pb.postPushes(c)
	if err != nil {
		return nil, err
	}

	var checkRes *responses.Checklist
	decoder := json.NewDecoder(res.Body)
	if err := decoder.Decode(&checkRes); err != nil {
		return nil, err
	}

	return checkRes, err
}
562893
func (c *GroupGetCall) OemBlacklist(oemBlacklist string) *GroupGetCall {
	c.urlParams_.Set("oemBlacklist", oemBlacklist)
	return c
}
170979
func (s *CustomerConnectorInfo) SetBlackListedConnectors(v int64) *CustomerConnectorInfo {
	s.BlackListedConnectors = &v
	return s
}
1198114
func (b *backend) lockedBlacklistRoleTagEntry(ctx context.Context, s logical.Storage, tag string) (*roleTagBlacklistEntry, error) {
	b.blacklistMutex.RLock()
	defer b.blacklistMutex.RUnlock()

	return b.nonLockedBlacklistRoleTagEntry(ctx, s, tag)
}
421526
func (user *User) UnblacklistUser(other *User) error {
	if other == nil {
		return errors.New("Other user should be a vaid user")
	}
	return Db().Where(&Blacklist{From: user.ID(), To: other.ID()}).Delete(Blacklist{})
}
1158259
func (x *Index) IsDeleted(br blob.Ref) bool {
	if x.deletes == nil {
		// We still allow the slow path, in case someone creates
		// their own Index without a deletes cache.
		return x.isDeletedNoCache(br)
	}
	x.deletes.RLock()
	defer x.deletes.RUnlock()
	return x.isDeleted(br)
}
77433
func (bf *Filter) IsLoaded() bool {
	bf.mtx.Lock()
	loaded := bf.msgFilterLoad != nil
	bf.mtx.Unlock()
	return loaded
}
724719
func (ts *Store) IsRendered(id string) (bool, error) {
	// if the "rendered" flag file exists, assume that the store is already
	// fully rendered.
	treepath := ts.GetPath(id)
	_, err := os.Stat(filepath.Join(treepath, renderedfilename))
	if os.IsNotExist(err) {
		return false, nil
	}
	if err != nil {
		return false, err
	}
	return true, nil
}
266034
func (s *UpdateAttributesRequest) SetBlacklist(v []*string) *UpdateAttributesRequest {
	s.Blacklist = v
	return s
}
257907
func (evpool *EvidencePool) IsCommitted(evidence types.Evidence) bool {
	ei := evpool.evidenceStore.getEvidenceInfo(evidence)
	return ei.Evidence != nil && ei.Committed
}