// GetDomainID returns an ID of specified domain.
324661
func (c *Client) GetDomainID(domainName string) (string, error) {
	domainList := &DomainListResponse{}

	err := c.do(http.MethodGet, "/v1/domains", nil, domainList)
	if err != nil {
		return "", err
	}

	for _, domain := range domainList.Domains {
		if domain.Name == domainName {
			return domain.ID, nil
		}
	}
	return "", fmt.Errorf("no such domain: %s", domainName)
}
757247
func (extr *ContentExtractor) GetDomain(canonicalLink string) string {
	u, err := url.Parse(canonicalLink)
	if err == nil {
		return u.Host
	}
	return ""
}
480502
func (t *Team) GetNodeID() string {
	if t == nil || t.NodeID == nil {
		return ""
	}
	return *t.NodeID
}
977838
func (c *Client) GetDomainInformation(fqdn string) (*Data, error) {
	authZone, err := dns01.FindZoneByFqdn(fqdn)
	if err != nil {
		return nil, err
	}

	result, err := c.doRequest(http.MethodGet, "domain", nil)
	if err != nil {
		return nil, err
	}

	var domains []Data
	if len(result) > 0 {
		err = json.Unmarshal(result, &domains)
		if err != nil {
			return nil, fmt.Errorf("CloudXNS: domains unmarshaling error: %v", err)
		}
	}

	for _, data := range domains {
		if data.Domain == authZone {
			return &data, nil
		}
	}

	return nil, fmt.Errorf("CloudXNS: zone %s not found for domain %s", authZone, fqdn)
}
932895
func (g *Gist) GetNodeID() string {
	if g == nil || g.NodeID == nil {
		return ""
	}
	return *g.NodeID
}
1034990
func (s *ElasticsearchDomainStatus) SetDomainId(v string) *ElasticsearchDomainStatus {
	s.DomainId = &v
	return s
}
147256
func (t *Tag) GetNodeID() string {
	if t == nil || t.NodeID == nil {
		return ""
	}
	return *t.NodeID
}
603362
func (l *Locale) GetDomain() string {
	l.RLock()
	dom := l.defaultDomain
	l.RUnlock()
	return dom
}
278687
func GetDomain(store kv.Storage) (*domain.Domain, error) {
	return domap.Get(store)
}
550848
func (a *Client) GetIdentityID(params *GetIdentityIDParams) (*GetIdentityIDOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetIdentityIDParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "GetIdentityID",
		Method:             "GET",
		PathPattern:        "/identity/{id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetIdentityIDReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetIdentityIDOK), nil

}
413456
func GetID() string {
	id := "ttnctl"
	if user, err := user.Current(); err == nil {
		id += "-" + user.Username
	}
	if hostname, err := os.Hostname(); err == nil {
		id += "@" + hostname
	}
	return id
}
104964
func (r *RepoStatus) GetNodeID() string {
	if r == nil || r.NodeID == nil {
		return ""
	}
	return *r.NodeID
}
1263773
func (g *GistFork) GetNodeID() string {
	if g == nil || g.NodeID == nil {
		return ""
	}
	return *g.NodeID
}
229910
func GetDomainPassword(targetName string) (*DomainPassword, error) {
	cred, err := sysCredRead(targetName, sysCRED_TYPE_DOMAIN_PASSWORD)
	if cred != nil {
		return &DomainPassword{*cred}, err
	}
	return nil, err
}
1305243
func (d *Domain) GetUUID() ([]byte, error) {
	var cUuid [C.VIR_UUID_BUFLEN](byte)
	cuidPtr := unsafe.Pointer(&cUuid)
	var err C.virError
	result := C.virDomainGetUUIDWrapper(d.ptr, (*C.uchar)(cuidPtr), &err)
	if result != 0 {
		return []byte{}, makeError(&err)
	}
	return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil
}
713857
func (ca *CertAuthorityV2) ID() *CertAuthID {
	return &CertAuthID{DomainName: ca.Spec.ClusterName, Type: ca.Spec.Type}
}
395219
func (d *DNS) GetDomain(domain string) (*Domain, error) {
	list, err := d.GetDomains(nil)
	if err != nil {
		return nil, err
	}

	for _, d := range list {
		if strings.EqualFold(d.Domain, domain) {
			return d, nil
		}
	}

	return nil, linode.NewError(errors.New("dns: requested domain not found"))
}