Debian Codegraph @

dnsimple/services_domains.go

raw symbols SCIP
1 package dnsimplescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/
2
3 import (
4 "contextscip-go gomod github.com/golang/go/src go1.21 context/"
5 "fmtscip-go gomod github.com/golang/go/src go1.21 fmt/"
6 )
7
8 func domainServicesPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/domainServicesPath().(accountID string, domainIdentifier string, serviceIdentifier string) string {
9 if serviceIdentifier != "" {
10 return fmtscip-go gomod github.com/golang/go/src go1.21 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.21 fmt/Sprintf().("/%v/domains/%v/services/%v", accountID, domainIdentifier, serviceIdentifier)
11 }
12 return fmtscip-go gomod github.com/golang/go/src go1.21 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.21 fmt/Sprintf().("/%v/domains/%v/services", accountID, domainIdentifier)
13 }
14
15 // DomainServiceSettings represents optional settings when applying a DNSimple one-click service to a domain.
16 type DomainServiceSettingsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainServiceSettings# struct {
17 Settingsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainServiceSettings#Settings. map[string]string `url:"settings,omitempty"`
18 }
19
20 // AppliedServices lists the applied one-click services for a domain.
21 //
22 // See https://developer.dnsimple.com/v2/services/domains/#applied
23 func (s *ServicesServicescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#) AppliedServicesscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#AppliedServices().(ctx contextscip-go gomod github.com/golang/go/src go1.21 context/.Contextscip-go gomod github.com/golang/go/src go1.21 context/Context#, accountID string, domainIdentifier string, options *ListOptionsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ListOptions#) (*ServicesResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesResponse#, error) {
24 path := versionedscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/versioned().(domainServicesPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/domainServicesPath().(accountID, domainIdentifier, ""))
25 servicesResponse := &ServicesResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesResponse#{}
26
27 path, err := addURLQueryOptionsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/addURLQueryOptions().(path, options)
28 if err != nil {
29 return nil, err
30 }
31
32 resp, err := s.clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#client..getscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#get().(ctx, path, servicesResponse)
33 if err != nil {
34 return servicesResponse, err
35 }
36
37 servicesResponse.HTTPResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Response#HTTPResponse. = resp
38 return servicesResponse, nil
39 }
40
41 // ApplyService applies a one-click services to a domain.
42 //
43 // See https://developer.dnsimple.com/v2/services/domains/#apply
44 func (s *ServicesServicescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#) ApplyServicescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#ApplyService().(ctx contextscip-go gomod github.com/golang/go/src go1.21 context/.Contextscip-go gomod github.com/golang/go/src go1.21 context/Context#, accountID string, serviceIdentifier string, domainIdentifier string, settings DomainServiceSettingsscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/DomainServiceSettings#) (*ServiceResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServiceResponse#, error) {
45 path := versionedscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/versioned().(domainServicesPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/domainServicesPath().(accountID, domainIdentifier, serviceIdentifier))
46 serviceResponse := &ServiceResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServiceResponse#{}
47
48 resp, err := s.clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#client..postscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#post().(ctx, path, settings, nil)
49 if err != nil {
50 return nil, err
51 }
52
53 serviceResponse.HTTPResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Response#HTTPResponse. = resp
54 return serviceResponse, nil
55 }
56
57 // UnapplyService unapplies a one-click services from a domain.
58 //
59 // See https://developer.dnsimple.com/v2/services/domains/#unapply
60 func (s *ServicesServicescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#) UnapplyServicescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#UnapplyService().(ctx contextscip-go gomod github.com/golang/go/src go1.21 context/.Contextscip-go gomod github.com/golang/go/src go1.21 context/Context#, accountID string, serviceIdentifier string, domainIdentifier string) (*ServiceResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServiceResponse#, error) {
61 path := versionedscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/versioned().(domainServicesPathscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/domainServicesPath().(accountID, domainIdentifier, serviceIdentifier))
62 serviceResponse := &ServiceResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServiceResponse#{}
63
64 resp, err := s.clientscip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/ServicesService#client..deletescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Client#delete().(ctx, path, nil, nil)
65 if err != nil {
66 return nil, err
67 }
68
69 serviceResponse.HTTPResponsescip-go gomod github.com/dnsimple/dnsimple-go . `github.com/dnsimple/dnsimple-go/dnsimple`/Response#HTTPResponse. = resp
70 return serviceResponse, nil
71 }