internal

package
v4.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOK    = "ok"
	StatusError = "error"
)

Response status.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRecRequest

type AddRecRequest struct {
	Text string `xml:",chardata"`

	SiteID int    `xml:"site-id,omitempty"`
	Type   string `xml:"type,omitempty"`
	Host   string `xml:"host,omitempty"`
	Value  string `xml:"value,omitempty"`
}

type AddRecResponse

type AddRecResponse struct {
	Text string `xml:",chardata"`

	Result RecResult `xml:"result,omitempty"`
}

type Client

type Client struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client the Plesk API client.

func NewClient

func NewClient(baseURL *url.URL, login string, password string) *Client

NewClient created a new Client.

type DNSInputType

type DNSInputType struct {
	Text string `xml:",chardata"`

	AddRec []AddRecRequest `xml:"add_rec,omitempty"`
	DelRec []DelRecRequest `xml:"del_rec,omitempty"`
}

type DNSResponseType

type DNSResponseType struct {
	Text string `xml:",chardata"`

	AddRec []AddRecResponse `xml:"add_rec,omitempty"`
	DelRec []DelRecResponse `xml:"del_rec,omitempty"`
}

type DNSSelectionFilterType

type DNSSelectionFilterType struct {
	Text string `xml:",chardata"`

	ID int `xml:"id"`
}

type DelRecRequest

type DelRecRequest struct {
	Text string `xml:",chardata"`

	Filter DNSSelectionFilterType `xml:"filter"`
}

type DelRecResponse

type DelRecResponse struct {
	Text string `xml:",chardata"`

	Result RecResult `xml:"result"`
}

type RecResult

type RecResult struct {
	Text string `xml:",chardata"`

	ID int `xml:"id"`

	Status  string `xml:"status"`
	ErrCode string `xml:"errcode"`
	ErrText string `xml:"errtext"`
}

func (RecResult) Error

func (r RecResult) Error() string

type RequestPacketType

type RequestPacketType struct {
	XMLName xml.Name `xml:"packet"`
	Text    string   `xml:",chardata"`

	DNS  *DNSInputType    `xml:"dns,omitempty"`
	Site *SiteTypeRequest `xml:"site,omitempty"`
}

type ResponsePacketType

type ResponsePacketType struct {
	XMLName xml.Name `xml:"packet"`
	Text    string   `xml:",chardata"`

	DNS    DNSResponseType  `xml:"dns,omitempty"`
	Site   SiteResponseType `xml:"site,omitempty"`
	System *System          `xml:"system,omitempty"`
}

type SiteDatasetType

type SiteDatasetType struct {
	Text string `xml:",chardata"`

	GenInfo *SiteGenInfoType `xml:"gen_info,omitempty"`
}

type SiteFilterType

type SiteFilterType struct {
	Text string `xml:",chardata"`

	Name string `xml:"name"`
}

type SiteGenInfoType

type SiteGenInfoType struct {
	Text string `xml:",chardata"`

	CrDate       string `xml:"cr_date,omitempty"`
	Name         string `xml:"name,omitempty"`
	ASCIIName    string `xml:"ascii-name,omitempty"`
	Status       string `xml:"status,omitempty"`
	RealSize     string `xml:"real_size,omitempty"`
	DNSIPAddress string `xml:"dns_ip_address,omitempty"`
	HType        string `xml:"htype,omitempty"`
	GUID         string `xml:"guid,omitempty"`
	WebspaceGUID string `xml:"webspace-guid,omitempty"`
	SbSiteUUID   string `xml:"sb-site-uuid,omitempty"`
	WebspaceID   string `xml:"webspace-id,omitempty"`
	Description  string `xml:"description,omitempty"`
}

type SiteGetRequest

type SiteGetRequest struct {
	Text string `xml:",chardata"`

	Filter  *SiteFilterType `xml:"filter,omitempty"`
	Dataset SiteDatasetType `xml:"dataset,omitempty"`
}

type SiteGetResponse

type SiteGetResponse struct {
	Text string `xml:",chardata"`

	Result *SiteResult `xml:"result,omitempty"`
}

type SiteResponseType

type SiteResponseType struct {
	Text string `xml:",chardata"`

	Get SiteGetResponse `xml:"get"`
}

type SiteResult

type SiteResult struct {
	Text string `xml:",chardata"`

	ID       int    `xml:"id"`
	FilterID string `xml:"filter-id"`

	Status  string `xml:"status"`
	ErrCode string `xml:"errcode"`
	ErrText string `xml:"errtext"`

	Data *SiteResultData `xml:"data"`
}

func (SiteResult) Error

func (s SiteResult) Error() string

type SiteResultData

type SiteResultData struct {
	Text string `xml:",chardata"`

	GenInfo *SiteGenInfoType `xml:"gen_info"`
}

type SiteTypeRequest

type SiteTypeRequest struct {
	Text string `xml:",chardata"`

	Get SiteGetRequest `xml:"get"`
}

type System

type System struct {
	Text string `xml:",chardata"`

	Status  string `xml:"status"`
	ErrCode string `xml:"errcode"`
	ErrText string `xml:"errtext"`
}

func (System) Error

func (s System) Error() string

Jump to

Keyboard shortcuts

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