Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Call(string, interface{}, interface{}) error
CallRaw(string, interface{}) ([]byte, error)
}
Backend is an interface for calls against Liquid Web's API.
type LWAPIError ¶
type LWAPIError struct {
ErrorMsg string `json:"error,omitempty"`
ErrorClass string `json:"error_class,omitempty"`
ErrorFullMsg string `json:"full_message,omitempty"`
}
A LWAPIError is used to identify error responses when JSON unmarshalling json from a byte slice.
func (LWAPIError) Error ¶
func (e LWAPIError) Error() string
Given a LWAPIError, returns a string containing the ErrorClass and ErrorFullMsg.
func (LWAPIError) HasError ¶
func (e LWAPIError) HasError() bool
HasError returns boolean if ErrorClass was present or not. You can use this function to determine if a LWAPIRes response indicates an error or not.
type LWAPIRes ¶
LWAPIRes is a convenient interface used (for example) by Call to ensure a passed struct knows how to indicate whether or not it had an error.
type ListMeta ¶
type ListMeta struct {
ItemCount types.FlexInt `json:"item_count,omitempty"`
ItemTotal types.FlexInt `json:"item_total,omitempty"`
PageNum types.FlexInt `json:"page_num,omitempty"`
PageSize types.FlexInt `json:"page_size,omitempty"`
PageTotal types.FlexInt `json:"page_total,omitempty"`
}
ListMeta handles Liquid Web's pagination in HTTP responses.
Click to show internal directories.
Click to hide internal directories.