Documentation ¶
Overview ¶
Package opensrs provides a client for the OpenSRS API. In order to use this package you will need a OpenSRS account.
Index ¶
- Constants
- func FromXml(b []byte, v interface{}) error
- func String(s string) *string
- func ToXml(v interface{}) (b []byte, err error)
- type BaseRequest
- type BaseResponse
- type Body
- type Bool
- type Client
- type DataBlock
- type DomainsService
- type DtArray
- type DtAssoc
- type ErrorResponse
- type Header
- type Item
- type LookupRequest
- type LookupRequestAttributes
- type LookupResponse
- type LookupResponseAttributes
- type Map
- type NameSuggestItem
- type NameSuggestItems
- type NameSuggestLookup
- type NameSuggestPremium
- type NameSuggestRequest
- type NameSuggestRequestAttributes
- type NameSuggestResponse
- type NameSuggestResponseAttributes
- type NameSuggestServiceOverride
- type NameSuggestSuggestion
- type OPSEnvelope
- type PremiumBrokeredTransferResponse
- type PremiumMakeOfferResponse
- type URL
Constants ¶
View Source
const (
Version = "0.0.1"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseRequest ¶
type BaseResponse ¶
type Client ¶
type DomainsService ¶
type DomainsService struct {
Client *Client
}
func (*DomainsService) Lookup ¶
func (s *DomainsService) Lookup(attr LookupRequestAttributes) (*LookupResponse, error)
func (*DomainsService) NameSuggest ¶
func (s *DomainsService) NameSuggest(attr NameSuggestRequestAttributes) (*NameSuggestResponse, error)
type ErrorResponse ¶
type ErrorResponse struct { Err error HttpResponse *http.Response OpenSRSResponse *BaseResponse }
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type LookupRequest ¶
type LookupRequest struct { BaseRequest Attributes LookupRequestAttributes `json:"attributes"` }
type LookupRequestAttributes ¶
type LookupResponse ¶
type LookupResponse struct { BaseResponse Attributes LookupResponseAttributes `json:"attributes"` }
type NameSuggestItem ¶
type NameSuggestItems ¶
type NameSuggestItems struct { Count string `json:"count"` ResponseText string `json:"response_text"` ResponseCode string `json:"response_code"` IsSuccess Bool `json:"is_success"` Items []NameSuggestItem `json:"items"` }
type NameSuggestLookup ¶
type NameSuggestPremium ¶
type NameSuggestRequest ¶
type NameSuggestRequest struct { BaseRequest Attributes NameSuggestRequestAttributes `json:"attributes"` }
Requests
type NameSuggestRequestAttributes ¶
type NameSuggestRequestAttributes struct { Languages []string `json:"languages,omitempty"` MaxWaitTime string `json:"max_wait_time,omitempty"` SearchKey string `json:"search_key,omitempty"` SearchString string `json:"searchstring,omitempty"` ServiceOverride NameSuggestServiceOverride `json:"service_override,omitempty"` Services []string `json:"services,omitempty"` SkipRegistryLookup bool `json:"skip_registry_lookup,omitempty"` TLDs []string `json:"tlds,omitempty"` }
type NameSuggestResponse ¶
type NameSuggestResponse struct { BaseResponse IsSearchComplete Bool `json:"is_search_complete"` SearchKey string `json:"search_key"` Attributes NameSuggestResponseAttributes `json:"attributes"` }
Response
type NameSuggestResponseAttributes ¶
type NameSuggestResponseAttributes struct { Lookup NameSuggestItems `json:"lookup"` PersonalNames NameSuggestItems `json:"personal_names"` Premium NameSuggestItems `json:"premium"` PremiumBrokeredTransfer PremiumBrokeredTransferResponse `json:"premium_brokered_transfer"` PremiumMakeOffer PremiumMakeOfferResponse `json:"premium_make_offer"` Suggestion NameSuggestItems `json:"suggestion"` }
type NameSuggestServiceOverride ¶
type NameSuggestServiceOverride struct { Lookup NameSuggestLookup `json:"lookup,omitempty"` PersonalNames []string `json:"personal_names,omitempty"` Premium NameSuggestPremium `json:"premium,omitempty"` Suggestion NameSuggestSuggestion `json:"suggestion,omitempty"` }
type NameSuggestSuggestion ¶
type OPSEnvelope ¶
type PremiumBrokeredTransferResponse ¶
type PremiumBrokeredTransferResponse struct {
PremiumMakeOfferResponse
}
type PremiumMakeOfferResponse ¶
type PremiumMakeOfferResponse struct { Count string `json:"count"` ResponseText string `json:"response_text"` ResponseCode string `json:"response_code"` Items []NameSuggestItem `json:"items"` }
Click to show internal directories.
Click to hide internal directories.