requests

package
v0.0.0-...-41af103 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EPPPollOperationRequest         = "req"
	EPPPollOperationAcknowledgement = "ack"
)

Variables

View Source
var EPPLoginRIPNOptions = EPPLoginOptions{
	Version:  "1.0",
	Language: "ru",
}
View Source
var EPPLoginRIPNServies = []string{
	"http://www.ripn.net/epp/ripn-epp-1.0",
	"http://www.ripn.net/epp/ripn-eppcom-1.0",
	"http://www.ripn.net/epp/ripn-contact-1.0",
	"http://www.ripn.net/epp/ripn-domain-1.0",
	"http://www.ripn.net/epp/ripn-host-1.0",
	"http://www.ripn.net/epp/ripn-registrar-1.0",
	"http://www.ripn.net/epp/ripn-domain-1.1",
}

Functions

func NewRIPNEPPTransferDomainInfo

func NewRIPNEPPTransferDomainInfo(domainName string) types.EPPDomainTransferInfo

func NewRIPNEPPTransferDomainInfoWithAuth

func NewRIPNEPPTransferDomainInfoWithAuth(domainName, authInfo string) types.EPPDomainTransferInfo

Types

type EPPCommandRequest

type EPPCommandRequest struct {
	XMLName             xml.Name `xml:"command"`
	Body                interface{}
	ClientTransactionID string `xml:"clTRID"`
}

func NewEPPLoginRequest

func NewEPPLoginRequest(clientID, password string, options EPPLoginOptions, services []string) EPPCommandRequest

func NewEPPLogoutRequest

func NewEPPLogoutRequest() EPPCommandRequest

func NewEPPPollAcknowledgement

func NewEPPPollAcknowledgement(id string) EPPCommandRequest

func NewEPPPollRequest

func NewEPPPollRequest() EPPCommandRequest

func NewEPPRIPNLoginRequest

func NewEPPRIPNLoginRequest(clientID, password string) EPPCommandRequest

func NewRIPNEPPCreateDomainRequest

func NewRIPNEPPCreateDomainRequest(domainName string, period types.EPPDomainPeriod, registrant string,
	description []string, authInfo *types.EPPDomainAuthInfo) EPPCommandRequest

func NewRIPNEPPCreateHostRequest

func NewRIPNEPPCreateHostRequest(hostName string, addresses []types.EPPHostAddr) EPPCommandRequest

func NewRIPNEPPCreateOrganizationRequest

func NewRIPNEPPCreateOrganizationRequest(contactID string, organization types.EPPContactOrganization, verified bool, oidEsia string) EPPCommandRequest

func NewRIPNEPPCreatePersonRequest

func NewRIPNEPPCreatePersonRequest(contactID string, person types.EPPContactPerson, verified bool, oidEsia string) EPPCommandRequest

func NewRIPNEPPDeleteContactRequest

func NewRIPNEPPDeleteContactRequest(contactID string) EPPCommandRequest

func NewRIPNEPPDeleteDomainRequest

func NewRIPNEPPDeleteDomainRequest(domainName string) EPPCommandRequest

func NewRIPNEPPDeleteHostRequest

func NewRIPNEPPDeleteHostRequest(hostName string) EPPCommandRequest

func NewRIPNEPPInfoContactRequest

func NewRIPNEPPInfoContactRequest(contactID, authinfo string) EPPCommandRequest

func NewRIPNEPPInfoDomainRequest

func NewRIPNEPPInfoDomainRequest(domainName, authinfo string) EPPCommandRequest

func NewRIPNEPPInfoHostRequest

func NewRIPNEPPInfoHostRequest(hostName string) EPPCommandRequest

func NewRIPNEPPInfoRegistrarRequest

func NewRIPNEPPInfoRegistrarRequest(registrarID string) EPPCommandRequest

func NewRIPNEPPRenewDomainRequest

func NewRIPNEPPRenewDomainRequest(domainName string, curExpDate string, period types.EPPDomainPeriod) EPPCommandRequest

func NewRIPNEPPTransferApprove

func NewRIPNEPPTransferApprove(domainName string) EPPCommandRequest

func NewRIPNEPPTransferCancel

func NewRIPNEPPTransferCancel(domainName, authInfo string) EPPCommandRequest

func NewRIPNEPPTransferReject

func NewRIPNEPPTransferReject(domainName string) EPPCommandRequest

func NewRIPNEPPTransferRequest

func NewRIPNEPPTransferRequest(domainName, authInfo string) EPPCommandRequest

func NewRIPNEPPUpdateContactRequest

func NewRIPNEPPUpdateContactRequest(contactID string, change *types.EPPContactData) EPPCommandRequest

func NewRIPNEPPUpdateDomainRequest

func NewRIPNEPPUpdateDomainRequest(domainName string, change, add, remove *types.EPPDomainData) EPPCommandRequest

func NewRIPNEPPUpdateHostRequest

func NewRIPNEPPUpdateHostRequest(hostName string, change *types.EPPHostData) EPPCommandRequest

func NewRIPNEPPUpdateRegistrarRequest

func NewRIPNEPPUpdateRegistrarRequest(registrarID string, change, add, remove *types.EPPRegistrarData) EPPCommandRequest

func WrapEPPCommand

func WrapEPPCommand(body interface{}) EPPCommandRequest

type EPPCommandResponse

type EPPCommandResponse struct {
	XMLName xml.Name `xml:"response"`
	Result  struct {
		Code    int               `xml:"code,attr"`
		Message EPPMessage        `xml:"msg"`
		ExtData *EPPResultExtData `xml:"extData,omitempty"`
	} `xml:"result"`
	MessageQueue   *EPPMessageQueue `xml:"msgQ,omitempty"`
	Data           *EPPResponseData `xml:"resData,omitempty"`
	TransactionIDs struct {
		ClientTransactionID string `xml:"clTRID"`
		ServerTransactionID string `xml:"svTRID"`
	} `xml:"trID"`
}

type EPPContainer

type EPPContainer struct {
	XMLName         xml.Name            `xml:"http://www.ripn.net/epp/ripn-epp-1.0 epp"`
	CommandRequest  *EPPCommandRequest  `xml:",omitempty"`
	CommandResponse *EPPCommandResponse `xml:",omitempty"`
	HelloRequest    *EPPHelloRequest    `xml:",omitempty"`
	HelloResponse   *EPPHelloResponse   `xml:",omitempty"`
}

type EPPCreateContactRequest

type EPPCreateContactRequest struct {
	XMLName   xml.Name `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:create"`
	ContactID string   `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:id"`
	types.EPPContactData
}

type EPPCreateContactResponse

type EPPCreateContactResponse struct {
	XMLName     xml.Name  `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:creData"`
	ContactID   string    `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:id"`
	CreatedDate time.Time `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:crDate"`
}

type EPPCreateDomainRequest

type EPPCreateDomainRequest struct {
	XMLName    xml.Name `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:create"`
	DomainName string   `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:name"`
	types.EPPDomainData
}

type EPPCreateDomainResponse

type EPPCreateDomainResponse struct {
	XMLName     xml.Name  `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:creData"`
	DomainName  string    `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:name"`
	CreatedDate time.Time `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:crDate"`
	ExpiryDate  time.Time `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:exDate"`
}

type EPPCreateHostRequest

type EPPCreateHostRequest struct {
	XMLName  xml.Name `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:create"`
	HostName string   `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:name"`
	types.EPPHostData
}

type EPPCreateHostResponse

type EPPCreateHostResponse struct {
	XMLName     xml.Name  `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:creData"`
	HostName    string    `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:name"`
	CreatedDate time.Time `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:crDate"`
}

type EPPCreateRequest

type EPPCreateRequest struct {
	XMLName xml.Name `xml:"create"`
	Body    interface{}
}

type EPPCreateResponse

type EPPCreateResponse struct {
	CreateContactResponse *EPPCreateContactResponse `xml:",omitempty"`
	CreateHostResponse    *EPPCreateHostResponse    `xml:",omitempty"`
	CreateDomainResponse  *EPPCreateDomainResponse  `xml:",omitempty"`
}

type EPPDeleteContactRequest

type EPPDeleteContactRequest struct {
	XMLName   xml.Name `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:delete"`
	ContactID string   `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:id"`
}

type EPPDeleteDomainRequest

type EPPDeleteDomainRequest struct {
	XMLName    xml.Name `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:delete"`
	DomainName string   `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:name"`
}

type EPPDeleteHostRequest

type EPPDeleteHostRequest struct {
	XMLName  xml.Name `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:delete"`
	HostName string   `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:name"`
}

type EPPDeleteRequest

type EPPDeleteRequest struct {
	XMLName xml.Name `xml:"delete"`
	Body    interface{}
}

type EPPHelloRequest

type EPPHelloRequest struct {
	XMLName xml.Name `xml:"hello"`
}

func NewEPPHelloRequest

func NewEPPHelloRequest() EPPHelloRequest

type EPPHelloResponse

type EPPHelloResponse struct {
	XMLName     xml.Name `xml:"greeting"`
	ServerID    string   `xml:"svID"`
	ServerDate  string   `xml:"svDate"`
	ServiceMenu struct {
		Version    string   `xml:"version"`
		Language   []string `xml:"lang"`
		ObjectURIs []struct {
			URI            string `xml:",chardata"`
			XSD            string `xml:",attr"`
			SchemaLocation string `xml:"schemaLocation,attr"`
		} `xml:"objURI"`
	} `xml:"svcMenu"`
	DataCollectionPolicy struct {
		Access struct {
			All              *struct{} `xml:"all"`
			None             *struct{} `xml:"none"`
			Null             *struct{} `xml:"null"`
			Personal         *struct{} `xml:"personal"`
			PersonalAndOther *struct{} `xml:"personalAndOther"`
		} `xml:"access"`
		Statement struct {
			Purpose struct {
				Admin        *struct{} `xml:"admin"`
				Provisioning *struct{} `xml:"prov"`
				Contact      *struct{} `xml:"contact"`
				Other        *struct{} `xml:"other"`
			} `xml:"purpose"`
			Recipient struct {
				Other     *struct{} `xml:"other"`
				Ours      *struct{} `xml:"ours"`
				Public    *struct{} `xml:"public"`
				Same      *struct{} `xml:"same"`
				Unrelated *struct{} `xml:"unrelated"`
			} `xml:"recipient"`
			Retention struct {
				Business   *struct{} `xml:"business"`
				Indefinite *struct{} `xml:"indefinite"`
				Legal      *struct{} `xml:"legal"`
				None       *struct{} `xml:"none"`
				Stated     *struct{} `xml:"stated"`
			} `xml:"retention"`
		} `xml:"statement"`
	} `xml:"dcp"`
}

type EPPInfoContactRequest

type EPPInfoContactRequest struct {
	XMLName   xml.Name                  `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:info"`
	ContactID string                    `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:id"`
	AuthInfo  *types.EPPContactAuthInfo `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:authInfo,omitempty"`
}

type EPPInfoContactResponse

type EPPInfoContactResponse struct {
	XMLName     xml.Name `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:infData"`
	ContactID   string   `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:id"`
	ContactROID string   `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:roid"`
	Status      []types.EPPContactStatus
	types.EPPContactData
	types.EPPContactExtendedData
}

type EPPInfoDomainRequest

type EPPInfoDomainRequest struct {
	XMLName    xml.Name                 `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:info"`
	DomainName string                   `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:name"`
	AuthInfo   *types.EPPDomainAuthInfo `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:authInfo,omitempty"`
}

type EPPInfoDomainResponse

type EPPInfoDomainResponse struct {
	XMLName    xml.Name `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:infData"`
	DomainName string   `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:name"`
	DomainROID string   `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:roid"`
	Status     []types.EPPDomainStatus
	types.EPPDomainData
	types.EPPDomainExtendedData
}

type EPPInfoHostRequest

type EPPInfoHostRequest struct {
	XMLName  xml.Name `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:info"`
	HostName string   `xml:"name"`
}

type EPPInfoHostResponse

type EPPInfoHostResponse struct {
	XMLName  xml.Name `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:infData"`
	HostName string   `xml:"name"`
	HostROID string   `xml:"roid"`
	Status   []types.EPPHostStatus
	types.EPPHostData
	types.EPPHostExtendedData
}

type EPPInfoRegistrarRequest

type EPPInfoRegistrarRequest struct {
	XMLName     xml.Name `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:info"`
	RegistrarID string   `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:id"`
}

type EPPInfoRegistrarResponse

type EPPInfoRegistrarResponse struct {
	XMLName     xml.Name `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:infData"`
	RegistrarID string   `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:id"`
	Status      []types.EPPRegistrarStatus
	types.EPPRegistrarData
	types.EPPRegistrarExtendedData
}

type EPPInfoRequest

type EPPInfoRequest struct {
	XMLName xml.Name `xml:"info"`
	Body    interface{}
}

type EPPInfoResponse

type EPPInfoResponse struct {
	InfoContactResponse   *EPPInfoContactResponse   `xml:",omitempty"`
	InfoHostResponse      *EPPInfoHostResponse      `xml:",omitempty"`
	InfoDomainResponse    *EPPInfoDomainResponse    `xml:",omitempty"`
	InfoRegistrarResponse *EPPInfoRegistrarResponse `xml:",omitempty"`
}

type EPPLoginCommand

type EPPLoginCommand struct {
	XMLName     xml.Name         `xml:"login"`
	ClientID    string           `xml:"clID"`
	Password    string           `xml:"pw"`
	NewPassword string           `xml:"newPW,omitempty"`
	Options     EPPLoginOptions  `xml:"options"`
	Services    EPPLoginServices `xml:"svcs"`
}

type EPPLoginOptions

type EPPLoginOptions struct {
	Version  string `xml:"version"`
	Language string `xml:"lang"`
}

type EPPLoginServices

type EPPLoginServices struct {
	ObjectURIs []string `xml:"objURI"`
}

type EPPLogoutCommand

type EPPLogoutCommand struct {
	XMLName xml.Name `xml:"logout"`
}

type EPPMessage

type EPPMessage struct {
	Text     string `xml:",chardata"`
	Language string `xml:"lang,attr"`
}

type EPPMessageQueue

type EPPMessageQueue struct {
	Count   int        `xml:"count,attr"`
	ID      string     `xml:"id,attr"`
	QDate   time.Time  `xml:"qDate"`
	Message EPPMessage `xml:"msg"`
}

type EPPPollOperation

type EPPPollOperation string

type EPPPollRequest

type EPPPollRequest struct {
	XMLName   xml.Name         `xml:"poll"`
	Operation EPPPollOperation `xml:"op,attr"`
	MessageID string           `xml:"msgID,attr,omitempty"`
}

type EPPPollResponse

type EPPPollResponse EPPTransferResponse

EPPPollResponse has any data only on transfer notifications

type EPPRenewDomainRequest

type EPPRenewDomainRequest struct {
	XMLName           xml.Name `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:renew"`
	DomainName        string   `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:name"`
	CurrentExpiryDate string   `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:curExpDate"`
	Period            types.EPPDomainPeriod
}

type EPPRenewRequest

type EPPRenewRequest struct {
	XMLName xml.Name `xml:"renew"`
	Body    interface{}
}

type EPPResponseData

type EPPResponseData struct {
	*EPPCreateResponse `xml:",omitempty"`
	*EPPInfoResponse   `xml:",omitempty"`
	TransferResponse   *EPPTransferResponse `xml:",omitempty"`
}

type EPPResultExtData

type EPPResultExtData struct {
	Reason string `xml:"reason"`
}

type EPPTransferRequest

type EPPTransferRequest struct {
	XMLName   xml.Name                   `xml:"transfer"`
	Operation types.EPPTransferOperation `xml:"op,attr"`
	Body      interface{}
}

type EPPTransferResponse

type EPPTransferResponse struct {
	XMLName    xml.Name                `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:trnData"`
	DomainName string                  `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:name"`
	Status     types.EPPTransferStatus `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:trStatus"`
	ResultID   string                  `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:reID"`
	ResultDate time.Time               `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:reDate"`
	ActionID   string                  `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:acID"`
	ActionDate time.Time               `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:acDate"`
	ExpiryDate time.Time               `xml:"http://www.ripn.net/epp/ripn-domain-1.1 domain:exDate,omitempty"`
}

type EPPUpdateContactRequest

type EPPUpdateContactRequest struct {
	XMLName   xml.Name              `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:update"`
	ContactID string                `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:id"`
	Change    *types.EPPContactData `xml:"http://www.ripn.net/epp/ripn-contact-1.0 contact:chg"`
}

type EPPUpdateDomainRequest

type EPPUpdateDomainRequest struct {
	XMLName    xml.Name             `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:update"`
	DomainName string               `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:name"`
	Change     *types.EPPDomainData `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:chg"`
	Add        *types.EPPDomainData `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:add"`
	Remove     *types.EPPDomainData `xml:"http://www.ripn.net/epp/ripn-domain-1.0 domain:rem"`
}

type EPPUpdateHostRequest

type EPPUpdateHostRequest struct {
	XMLName  xml.Name           `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:update"`
	HostName string             `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:name"`
	Change   *types.EPPHostData `xml:"http://www.ripn.net/epp/ripn-host-1.0 host:chg"`
}

type EPPUpdateRegistrarRequest

type EPPUpdateRegistrarRequest struct {
	XMLName     xml.Name                `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:update"`
	RegistrarID string                  `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:id"`
	Change      *types.EPPRegistrarData `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:chg"`
	Add         *types.EPPRegistrarData `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:add"`
	Remove      *types.EPPRegistrarData `xml:"http://www.ripn.net/epp/ripn-registrar-1.0 registrar:rem"`
}

type EPPUpdateRequest

type EPPUpdateRequest struct {
	XMLName xml.Name `xml:"update"`
	Body    interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL