Documentation
¶
Index ¶
- Variables
- type Account
- type AccountDetailsResponse
- type Client
- func (c Client) CreateMonitor(ctx context.Context, monitor uptimerobotv1.MonitorValues, ...) (string, error)
- func (c Client) DeleteMonitor(ctx context.Context, id string) error
- func (c Client) Do(ctx context.Context, endpoint string, form url.Values) (*http.Response, error)
- func (c Client) EditMonitor(ctx context.Context, id string, monitor uptimerobotv1.MonitorValues, ...) (string, error)
- func (c Client) FindContactID(ctx context.Context, friendlyName string) (string, error)
- func (c Client) FindMonitorID(ctx context.Context, opts ...FindOpt) (string, error)
- func (c Client) GetAccountDetails(ctx context.Context) (string, error)
- func (c Client) MonitorValues(monitor uptimerobotv1.MonitorValues, form url.Values, ...) url.Values
- func (c Client) NewRequest(ctx context.Context, endpoint string, form url.Values) (*http.Request, error)
- func (c Client) NewValues() url.Values
- type FindContactResponse
- type FindMonitorResponse
- type FindOpt
- type Response
- type ResponseContact
- type ResponseMonitor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStatus = errors.New("error code from Uptime Robot API") ErrResponse = errors.New("received fail from Uptime Robot API") )
View Source
var ErrContactNotFound = errors.New("contact not found")
View Source
var ErrMonitorNotFound = errors.New("monitor not found")
Functions ¶
This section is empty.
Types ¶
type AccountDetailsResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) CreateMonitor ¶
func (c Client) CreateMonitor(ctx context.Context, monitor uptimerobotv1.MonitorValues, contacts uptimerobotv1.MonitorContacts) (string, error)
func (Client) EditMonitor ¶
func (c Client) EditMonitor(ctx context.Context, id string, monitor uptimerobotv1.MonitorValues, contacts uptimerobotv1.MonitorContacts) (string, error)
func (Client) FindContactID ¶
func (Client) FindMonitorID ¶
func (Client) GetAccountDetails ¶
func (Client) MonitorValues ¶
func (c Client) MonitorValues(monitor uptimerobotv1.MonitorValues, form url.Values, contacts uptimerobotv1.MonitorContacts) url.Values
func (Client) NewRequest ¶
type FindContactResponse ¶
type FindContactResponse struct { Status urtypes.Status `json:"stat"` Contacts []ResponseContact `json:"alert_contacts"` }
type FindMonitorResponse ¶
type FindMonitorResponse struct { Status urtypes.Status `json:"stat"` Monitors []ResponseMonitor `json:"monitors"` }
type FindOpt ¶
func FindBySearch ¶
func FindByURL ¶
func FindByURL(monitor uptimerobotv1.MonitorValues) FindOpt
type Response ¶
type Response struct { Status urtypes.Status `json:"stat"` Monitor ResponseMonitor `json:"monitor"` }
type ResponseContact ¶
type ResponseMonitor ¶
Click to show internal directories.
Click to hide internal directories.