// GetDomain retrieves detailed information about the named domain.
515410
func (mg *MailgunImpl) GetDomain(ctx context.Context, domain string) (DomainResponse, error) {
	r := newHTTPRequest(generatePublicApiUrl(mg, domainsEndpoint) + "/" + domain)
	r.setClient(mg.Client())
	r.setBasicAuth(basicAuthUser, mg.APIKey())
	var resp DomainResponse
	err := getResponseFromJSON(ctx, r, &resp)
	return resp, err
}
365885
func (d *Domain) GetName() (string, error) {
	var err C.virError
	name := C.virDomainGetNameWrapper(d.ptr, &err)
	if name == nil {
		return "", makeError(&err)
	}
	return C.GoString(name), nil
}
974962
func (s *CreateDBInstanceInput) SetDomain(v string) *CreateDBInstanceInput {
	s.Domain = &v
	return s
}
629654
func getMainDomain(domain string) string {
	domain = dns01.UnFqdn(domain)

	split := dns.Split(domain)
	if strings.HasSuffix(strings.ToLower(domain), "duckdns.org") {
		if len(split) < 3 {
			return ""
		}

		firstSubDomainIndex := split[len(split)-3]
		return domain[firstSubDomainIndex:]
	}

	return domain[split[len(split)-1]:]
}
836668
func (s *RegisterActivityTypeInput) SetDomain(v string) *RegisterActivityTypeInput {
	s.Domain = &v
	return s
}
159957
func (p Protos) GetDomain() (string, error) {
	req, err := http.NewRequest("GET", p.createURL("info/domain"), nil)
	if err != nil {
		return "", err
	}
	domain := struct{ Domain string }{}

	payload, err := p.makeRequest(req)
	if err != nil {
		return "", err
	}

	err = json.Unmarshal(payload, &domain)
	if err != nil {
		return "", err
	}

	return domain.Domain, nil
}
137348
func (s *ListOpenWorkflowExecutionsInput) SetDomain(v string) *ListOpenWorkflowExecutionsInput {
	s.Domain = &v
	return s
}
1195362
func GetSearchDomains(resolvConf []byte) []string {
	domains := []string{}
	for _, line := range getLines(resolvConf, []byte("#")) {
		match := searchRegexp.FindSubmatch(line)
		if match == nil {
			continue
		}
		domains = strings.Fields(string(match[1]))
	}
	return domains
}
934419
func (l *Locale) Get(str string, vars ...interface{}) string {
	return l.GetD(l.GetDomain(), str, vars...)
}
480974
func (actor Actor) GetDomain(domainGUID string) (Domain, Warnings, error) {
	var allWarnings Warnings

	domain, warnings, err := actor.GetSharedDomain(domainGUID)
	allWarnings = append(allWarnings, warnings...)
	switch err.(type) {
	case nil:
		return domain, allWarnings, nil
	case actionerror.DomainNotFoundError:
	default:
		return Domain{}, allWarnings, err
	}

	domain, warnings, err = actor.GetPrivateDomain(domainGUID)
	allWarnings = append(allWarnings, warnings...)
	switch err.(type) {
	case nil:
		return domain, allWarnings, nil
	default:
		return Domain{}, allWarnings, err
	}
}
1065704
func (s *CountOpenWorkflowExecutionsInput) SetDomain(v string) *CountOpenWorkflowExecutionsInput {
	s.Domain = &v
	return s
}
160819
func (c *Client) GetDomain(i *GetDomainInput) (*Domain, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	if i.Version == 0 {
		return nil, ErrMissingVersion
	}

	if i.Name == "" {
		return nil, ErrMissingName
	}

	path := fmt.Sprintf("/service/%s/version/%d/domain/%s", i.Service, i.Version, i.Name)
	resp, err := c.Get(path, nil)
	if err != nil {
		return nil, err
	}

	var d *Domain
	if err := decodeJSON(&d, resp.Body); err != nil {
		return nil, err
	}
	return d, nil
}
605123
func (s *CountClosedWorkflowExecutionsInput) SetDomain(v string) *CountClosedWorkflowExecutionsInput {
	s.Domain = &v
	return s
}
677065
func (d *DNS) GetDomainResources(domainID int) ([]*Resource, error) {
	params := linode.Parameters{
		"DomainID": strconv.Itoa(domainID),
	}

	var list []*Resource
	_, err := d.linode.Request("domain.resource.list", params, &list)
	if err != nil {
		return nil, err
	}
	return list, nil
}
962878
func (s *DomainsService) GetDomain(accountID string, domainIdentifier string) (*domainResponse, error) {
	path := versioned(domainPath(accountID, domainIdentifier))
	domainResponse := &domainResponse{}

	resp, err := s.client.get(path, domainResponse)
	if err != nil {
		return nil, err
	}

	domainResponse.HttpResponse = resp
	return domainResponse, nil
}
316504
func (c *Client) DeleteDNSDomain(domain string) error {
	values := url.Values{
		"domain": {domain},
	}

	if err := c.post(`dns/delete_domain`, values, nil); err != nil {
		return err
	}
	return nil
}
1249201
func GetDomain() string {
	var dom string
	globalConfig.RLock()
	if globalConfig.storage != nil {
		dom = globalConfig.storage.GetDomain()
	}
	if dom == "" {
		dom = globalConfig.domain
	}
	globalConfig.RUnlock()

	return dom
}