Documentation
¶
Index ¶
- Variables
- type Client
- type Command
- type ContactCheck
- type ContactCreate
- type ContactDelete
- type ContactInfo
- type ContactUpdate
- type Disclose
- type DomainCheck
- type DomainCreate
- type DomainDelete
- type DomainInfo
- type DomainRenew
- type DomainTransfer
- type DomainUpdate
- type DomainUpdateAction
- type DomainUpdateChange
- type DsData
- type HostAddress
- type HostCheck
- type HostCreate
- type HostDelete
- type HostInfo
- type HostUpdate
- type IPAddress
- type LoginData
- type LogoutData
- type Period
- type Poll
- type PostalAddress
- type PostalInfo
- type Status
- type Templates
- type VoiceFax
Constants ¶
This section is empty.
Variables ¶
var CommandConfig = []*Command{ { Name: "contact", SubCommand: []*Command{ { Name: "check", DefaultData: &ContactCheck{ ContactIDs: []string{ "contact-1", }, ClTrID: "ABC-123", }, Template: "contact_check.xml", }, { Name: "create", DefaultData: &ContactCreate{ ID: "contact-1", PostalInfo: []*PostalInfo{{ Location: "loc", Name: "My Office", Organization: "My Org", Address: &PostalAddress{ Street: []string{ "Drottninggatan", }, City: "Stockholm", PostalCode: "12345", CountryCode: "SE", }, }}, Voice: &VoiceFax{ X: "46", Number: "+46.070123456", }, Email: "abc@def.se", Disclose: &Disclose{ Disclose: null.BoolFrom(true).Ptr(), LocalName: true, Fax: true, }, OrganisationNumber: "[SE]802405-0190", ValueAddedTaxNumber: "SE802405019001", ClTrID: "ABC-123", }, Template: "contact_create.xml", }, { Name: "delete", DefaultData: &ContactDelete{ ID: "contact-1", ClTrID: "ABC-123", }, Template: "contact_delete.xml", }, { Name: "info", DefaultData: &ContactInfo{ ID: "contact-1", ClTrID: "ABC-123", }, Template: "contact_info.xml", }, { Name: "update", DefaultData: &ContactUpdate{ ID: "contact-1", ClTrID: "ABC-123", }, Template: "contact_update.xml", }, }, }, { Name: "domain", SubCommand: []*Command{ { Name: "check", DefaultData: &DomainCheck{ DomainNames: []string{ "domain1.se", "domain2.se", }, ClTrID: "ABC-1234", }, Template: "domain_check.xml", }, { Name: "create", DefaultData: &DomainCreate{ Name: "domain1.se", Period: &Period{ Unit: "m", Time: 12, }, Hosts: []string{ "host1.ns", }, Registrant: "contact-1", ClTrID: "ABC-123", }, Template: "domain_create.xml", }, { Name: "delete", DefaultData: &DomainDelete{ Name: "domain1.se", ClTrID: "ABC-123", }, Template: "domain_delete.xml", }, { Name: "info", DefaultData: &DomainInfo{ Name: "domain1.se", ClTrID: "ABC-123", }, Template: "domain_info.xml", }, { Name: "renew", DefaultData: &DomainRenew{ Name: "domain1.se", CurrentExpirationDate: time.Now().AddDate(0, 1, 0).Format("2006-01-02"), ClTrID: "ABC-123", }, Template: "domain_renew.xml", }, { Name: "transfer", DefaultData: &DomainTransfer{ Name: "domain1.se", Password: "123456pw!", ClTrID: "ABC-123", }, Template: "domain_transfer.xml", }, { Name: "update", DefaultData: &DomainUpdate{ Name: "domain1.se", ClTrID: "ABC-123", }, Template: "domain_update.xml", }, }, }, { Name: "host", SubCommand: []*Command{ { Name: "check", DefaultData: &HostCheck{ HostNames: []string{ "host1.ns", }, ClTrID: "ABC-123", }, Template: "host_check.xml", }, { Name: "create", DefaultData: &HostCreate{ Name: "host1.ns", Addresses: []*HostAddress{{ IP: "192.168.1.2", Version: "v4", }}, ClTrID: "ABC-123", }, Template: "host_create.xml", }, { Name: "delete", DefaultData: &HostDelete{ Name: "host1.ns", ClTrID: "ABC-123", }, Template: "host_delete.xml", }, { Name: "info", DefaultData: &HostInfo{ Name: "host1.ns", ClTrID: "ABC-123", }, Template: "host_info.xml", }, { Name: "update", DefaultData: &HostUpdate{ Name: "host1.ns", ClTrID: "ABC-123", }, Template: "host_update.xml", }, }, }, { Name: "login", DefaultData: &LoginData{ Username: "epp100000", Password: "apa", Namespaces: []string{ "urn:ietf:params:xml:ns:host-1.0", "urn:ietf:params:xml:ns:contact-1.0", "urn:ietf:params:xml:ns:domain-1.0", }, ExtensionNamespaces: []string{ "urn:ietf:params:xml:ns:secDNS-1.0", "urn:ietf:params:xml:ns:secDNS-1.1", "urn:se:iis:xml:epp:iis-1.2", "urn:se:iis:xml:epp:registryLock-1.0", }, Version: "1.0", Lang: "en", ClTrID: "ABC-12345", }, Template: "login.xml", }, { Name: "hello", Template: "hello.xml", }, { Name: "logout", DefaultData: &LogoutData{ClTrID: "ABC-1234"}, Template: "logout.xml", }, { Name: "poll", DefaultData: &Poll{ Operation: "ack", MessageID: "1", ClTrID: "ABC-123", }, Template: "poll.xml", }, }
CommandConfig configuration of default data or the different commands.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Greeting string Templates Templates // contains filtered or unexported fields }
Client hold the information needed for the client to get and send messages to and from the server.
func (*Client) KeepAlive ¶
KeepAlive send hello commands to the epp server to keep the connection alive.
func (*Client) SendCommand ¶
SendCommand will write the request given on the server tls connection. Then read the response and return the result.
type ContactCheck ¶
ContactCheck the available data for a contact check command.
type ContactCreate ¶
type ContactCreate struct { ID string `xml:"id"` PostalInfo []*PostalInfo `xml:"postalInfo"` Voice *VoiceFax `xml:"voice"` Fax *VoiceFax `xml:"fax"` Email string `xml:"email"` Disclose *Disclose `xml:"disclose"` OrganisationNumber string `xml:"orgno"` ValueAddedTaxNumber string `xml:"vatno"` ClTrID string `xml:"clTrID"` }
ContactCreate the available data for a contact create command.
type ContactDelete ¶
ContactDelete the available data for a contact delete command.
type ContactInfo ¶
type ContactInfo struct { ID string `xml:"id"` ClTrID string `xml:"clTrID"` Pw string `xml:"pw"` ROID string `xml:"roid"` }
ContactInfo the available data for a contact info command.
type ContactUpdate ¶
type ContactUpdate struct { ID string `xml:"id"` PostalInfo []*PostalInfo `xml:"postalInfo"` Voice *VoiceFax `xml:"voice"` Fax *VoiceFax `xml:"fax"` Email string `xml:"email"` Disclose *Disclose `xml:"disclose"` ClTrID string `xml:"clTrID"` }
ContactUpdate the available data for a contact update command.
type Disclose ¶
type Disclose struct { Disclose *bool `xml:"disclose"` InternationalName bool `xml:"name:int"` LocalName bool `xml:"name:loc"` InternationalOrg bool `xml:"org:int"` LocalOrg bool `xml:"org:loc"` InternationalAddr bool `xml:"addr:int"` LocalAddr bool `xml:"addr:loc"` Voice bool `xml:"voice"` Fax bool `xml:"fax"` Email bool `xml:"email"` }
Disclose hold information about which fields should be disclosed.
type DomainCheck ¶
DomainCheck the available data for a domain check command.
type DomainCreate ¶
type DomainCreate struct { Name string `xml:"name"` Period *Period `xml:"period"` Hosts []string `xml:"hostObj"` HostAttributes []string `xml:"hostName"` Password string `xml:"pw"` Registrant string `xml:"registrant"` DsData []*DsData `xml:"dsData"` RegistryLock string `xml:"unlock"` ClTrID string `xml:"clTrID"` }
DomainCreate the available data for a domain create command.
type DomainDelete ¶
DomainDelete the available data for a domain delete command.
type DomainInfo ¶
type DomainInfo struct { Name string `xml:"name"` Hosts string `xml:"hosts"` ClTrID string `xml:"clTrID"` }
DomainInfo the available data for a domain info command.
type DomainRenew ¶
type DomainRenew struct { Name string `xml:"name"` CurrentExpirationDate string `xml:"currExpDate"` Period *Period `xml:"period"` ClTrID string `xml:"clTrID"` }
DomainRenew the available data for a domain renew command.
type DomainTransfer ¶
type DomainTransfer struct { Name string `xml:"name"` Password string `xml:"pw"` Hosts []string `xml:"hostObj"` ClTrID string `xml:"clTrID"` }
DomainTransfer the available data for a domain transfer command.
type DomainUpdate ¶
type DomainUpdate struct { Name string `xml:"name"` Add *DomainUpdateAction `xml:"add"` Remove *DomainUpdateAction `xml:"rem"` Change *DomainUpdateChange `xml:"chg"` DNSSecAdd []*DsData `xml:"secDNS:add"` DNSSecRemove []*DsData `xml:"secDNS:rem"` DNSSecRemoveAll bool `xml:"secDNS:rem:all"` RegistryLock string `xml:"unlock"` ClientDelete *bool `xml:"clientDelete"` ClientDeleteAtExpDate bool `xml:"clientDelete:atExpDate"` ClTrID string `xml:"clTrID"` }
DomainUpdate the available data for a domain update command.
type DomainUpdateAction ¶
type DomainUpdateAction struct { Hosts []string `xml:"hostObj"` HostAttributes []string `xml:"hostAttr"` Statuses []*Status `xml:"status"` }
DomainUpdateAction hold information for the domain add and rem elements.
type DomainUpdateChange ¶
DomainUpdateChange hold information for the domain chg element.
type DsData ¶
type DsData struct { KeyTag int `xml:"keyTag"` Algorithm int `xml:"alg"` DigestType int `xml:"digestType"` Digest string `xml:"digest"` }
DsData information for a dnssec element.
type HostAddress ¶
HostAddress hold information about the host address element.
type HostCreate ¶
type HostCreate struct { Name string `xml:"name"` Addresses []*HostAddress `xml:"addr"` ClTrID string `xml:"clTrID"` }
HostCreate the available data for a host create command.
type HostDelete ¶
HostDelete the available data for a host delete command.
type HostUpdate ¶
type HostUpdate struct { Name string `xml:"name"` AddAddresses []*HostAddress `xml:"add"` RemoveAddresses []*HostAddress `xml:"rem"` ChangeAddresses []*HostAddress `xml:"chg"` ClTrID string `xml:"clTrID"` }
HostUpdate the available data for a host update command.
type LoginData ¶
type LoginData struct { Username string `xml:"clID"` Password string `xml:"pw"` Namespaces []string `xml:"objURI"` ExtensionNamespaces []string `xml:"extURI"` Version string `xml:"version"` Lang string `xml:"lang"` ClTrID string `xml:"clTrID"` }
LoginData the available data for a login command.
type LogoutData ¶
type LogoutData struct {
ClTrID string `xml:"clTrID"`
}
LogoutData the available data for a logout command.
type Poll ¶
type Poll struct { Operation string `xml:"op"` MessageID string `xml:"msgID"` ClTrID string `xml:"clTrID"` }
Poll the available data for a poll command.
type PostalAddress ¶
type PostalAddress struct { Street []string `xml:"street"` City string `xml:"city"` StateOrProvince string `xml:"sp"` PostalCode string `xml:"pc"` CountryCode string `xml:"cc"` }
PostalAddress hold information for the addr element.
type PostalInfo ¶
type PostalInfo struct { Location string `xml:"loc"` Name string `xml:"name"` Organization string `xml:"org"` Address *PostalAddress `xml:"addr"` }
PostalInfo hold information for the postalInfo element.
type Status ¶
type Status struct { Status string `xml:"s"` Language string `xml:"lang"` Message string `xml:"message"` }
Status hold information for the status element.