// removeFromDNSName removes the uuid from the list attached to a dns name. It
// will clean up gen.sourceRules if needed.
// shouldStopManaging indicates that no more rules rely on this DNS target
427382
func (gen *RuleGen) removeFromDNSName(dnsName, uuid string) (shouldStopManaging bool) {
	// remove the rule from the set of rules that rely on dnsName.
	// Note: this isn't removing dnsName from gen.sourceRules, that is just
	// below.
	return gen.sourceRules.Remove(dnsName, uuid)
}
77164
func (s *AliasTarget) SetDNSName(v string) *AliasTarget {
	s.DNSName = &v
	return s
}
683941
func (r *resourceRecordChangeset) Remove(rrset dnsprovider.ResourceRecordSet) dnsprovider.ResourceRecordChangeset {
	r.removals = append(r.removals, rrset)
	return r
}
899249
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
	fqdn, _ := dns01.GetRecord(domain, keyAuth)
	zoneName, recordName, err := d.findZoneAndRecordName(fqdn, domain)
	if err != nil {
		return fmt.Errorf("fastdns: %v", err)
	}

	configdns.Init(d.config.Config)

	zone, err := configdns.GetZone(zoneName)
	if err != nil {
		return fmt.Errorf("fastdns: %v", err)
	}

	var removed bool
	for _, r := range zone.Zone.Txt {
		if r != nil && r.Name == recordName {
			if zone.RemoveRecord(r) != nil {
				return fmt.Errorf("fastdns: %v", err)
			}
			removed = true
		}
	}

	if removed {
		return zone.Save()
	}

	return nil
}
498540
func (s *LoadBalancer) SetDNSName(v string) *LoadBalancer {
	s.DNSName = &v
	return s
}
753905
func AuthPlainRemove(domain string, usernames ...string) {
	if u, ok := auth_users[domain]; ok {
		for _, username := range usernames {
			delete(u, username)
		}
	}
}
476927
func removeDNSRecords(nameList string, dnsProvider protokube.DNSProvider) {
	for {
		var removeRecords []dns.Record
		for _, s := range strings.Split(nameList, ",") {
			s = strings.TrimSpace(s)
			if s == "" {
				continue
			}

			removeRecords = append(removeRecords, dns.Record{
				FQDN:       s,
				RecordType: dns.RecordTypeA,
			})
		}

		if len(removeRecords) == 0 {
			return
		}

		if err := dnsProvider.RemoveRecordsImmediate(removeRecords); err != nil {
			glog.Warningf("error removing records %q, will retry: %v", nameList, err)
		} else {
			glog.Infof("removed DNS records %q", nameList)
			return
		}
		time.Sleep(5 * time.Second)
	}
}
844599
func (z *Zones) Remove(name string) {
	z.Lock()

	if zo, ok := z.Z[name]; ok && !zo.NoReload {
		zo.ReloadShutdown <- true
	}

	delete(z.Z, name)

	// TODO(miek): just regenerate Names (might be bad if you have a lot of zones...)
	z.names = []string{}
	for n := range z.Z {
		z.names = append(z.names, n)
	}

	z.Unlock()
}
449993
func (i *Identity) HasDNSNames(dnsNames []string) bool {
	if i.XCert == nil {
		return false
	}
	set := utils.StringsSet(i.XCert.DNSNames)
	for _, dnsName := range dnsNames {
		if _, ok := set[dnsName]; !ok {
			return false
		}
	}
	return true
}
168945
func validName(s string) bool {
	_, ok := dns.IsDomainName(s)
	if !ok {
		return false
	}
	if len(dns.Name(s).String()) > 255 {
		return false
	}

	return true
}
506257
func (b *HogeJSONBuilder) RemoveByNames(names ...string) *HogeJSONBuilder {
	for _, name := range names {
		info := b._structPropertyMap[name]
		if info == nil {
			continue
		}
		delete(b._properties, info.fieldName)
	}
	return b
}
902633
func (s *ListHostedZonesByNameOutput) SetNextDNSName(v string) *ListHostedZonesByNameOutput {
	s.NextDNSName = &v
	return s
}
129245
func (state *UserState) RemoveUser(username string) {
	state.usernames.Del(username)
	// Remove additional data as well
	// TODO: Ideally, remove all keys belonging to the user.
	state.users.DelKey(username, "loggedin")
}
621991
func RemoveHeaders(names []string, headers http.Header) {
	for _, h := range names {
		headers.Del(h)
	}
}
1205257
func (s *ReactionsService) Remove(name string) *ReactionsRemoveCall {
	var call ReactionsRemoveCall
	call.service = s
	call.name = name
	return &call
}
110067
func (g *Generator) RemoveLinuxNamespace(ns string) error {
	namespace, err := mapStrToNamespace(ns, "")
	if err != nil {
		return err
	}

	if g.Config == nil || g.Config.Linux == nil {
		return nil
	}
	for i, ns := range g.Config.Linux.Namespaces {
		if ns.Type == namespace.Type {
			g.Config.Linux.Namespaces = append(g.Config.Linux.Namespaces[:i], g.Config.Linux.Namespaces[i+1:]...)
			return nil
		}
	}
	return nil
}
1338912
func IsDNSName(str string) bool {
	if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 {
		// constraints already violated
		return false
	}
	return rxDNSName.MatchString(str)
}