Documentation ¶
Overview ¶
Parsers contains functions to parse the response from the server.
Index ¶
- func GetAccount(doc *html.Node) (string, error)
- func GetRecords(doc *html.Node) ([]models.Record, error)
- func GetStatusMessage(doc *html.Node) (models.StatusMessage, error)
- func GetZones(doc *html.Node) ([]models.Zone, error)
- func LoginStatus(doc *html.Node) auth.Status
- func ParseError(doc *html.Node) (issues []string)
- func ParseStatus(doc *html.Node) string
- type ErrNotFound
- type ErrParsing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccount ¶
GetAccount returns the account name from the HTML body.
func GetRecords ¶
GetRecords returns the records from the HTML body.
func GetStatusMessage ¶
func GetStatusMessage(doc *html.Node) (models.StatusMessage, error)
GetStatusMessage returns the status message from the HTML body.
func LoginStatus ¶
LoginStatus returns the login status from the HTML body.
func ParseError ¶
ParseError returns the error message from the HTML body.
func ParseStatus ¶
ParseStatus returns the dns status from the HTML body.
Types ¶
type ErrNotFound ¶
type ErrNotFound struct {
XPath string
}
ErrNotFound is returned when the element is not found in the document.
func (*ErrNotFound) Error ¶
func (e *ErrNotFound) Error() string
func (*ErrNotFound) Unwrap ¶
func (e *ErrNotFound) Unwrap() []error
type ErrParsing ¶
ErrParsing is returned when an error happens when parsing the document.
func (*ErrParsing) Error ¶
func (e *ErrParsing) Error() string
func (*ErrParsing) Unwrap ¶
func (e *ErrParsing) Unwrap() []error
Click to show internal directories.
Click to hide internal directories.