Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPermissionDenied = NewError(403, "Permission denied. Failed to verify the URL ownership.", "PERMISSION_DENIED") ErrNotFound = NewError(404, "Requested entity was not found.", "NOT_FOUND") )
Functions ¶
func Is ¶
Is calls errors.Is from the std library.
Using this function prevents importing multiple packages with the same name (errors).
func ParseError ¶
ParseError parses the response from r and returns the Error.
Types ¶
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Status string `json:"status,omitempty"` }
Error stores the error response from Google.
See: https://developers.google.com/webmaster-tools/v1/errors
func (Error) Is ¶
Is implements the errors.Is.
The Code, the Status and the Message fields must be equal.
func (Error) MarshalJSON ¶
func (Error) String ¶
String implements the fmt.Stringer interface.
Returns Status if set or Message.
func (*Error) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.