Documentation ¶
Overview ¶
Package site24x7 provides an API client for managing web application monitors on site24x7.com.
Index ¶
Constants ¶
const (
// APIBaseURL is the base url of the Site24x7 API.
APIBaseURL = "https://www.site24x7.com/api"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CurrentStatus() endpoints.CurrentStatus LocationProfiles() endpoints.LocationProfiles LocationTemplate() endpoints.LocationTemplate MonitorGroups() endpoints.MonitorGroups Monitors() endpoints.Monitors NotificationProfiles() endpoints.NotificationProfiles ThresholdProfiles() endpoints.ThresholdProfiles UserGroups() endpoints.UserGroups ITAutomations() endpoints.ITAutomations }
Client is the Site24x7 API Client interface. It provides methods to get clients for resource endpoints.
func NewClient ¶
func NewClient(httpClient HTTPClient) Client
NewClient creates a new Site24x7 API Client from httpClient with default API base URL. This can be used to provide a custom http client for use with the API. The custom http client has to transparently handle the Site24x7 OAuth flow.
func NewClientWithBaseURL ¶ added in v0.0.6
func NewClientWithBaseURL(httpClient HTTPClient, baseURL string) Client
NewClientWithBaseURL creates a new Site24x7 API Client from httpClient and given API base URL. This can be used to provide a custom http client for use with the API. The custom http client has to transparently handle the Site24x7 OAuth flow.
type Config ¶
type Config struct { // ClientID is the OAuth client ID needed to obtain an access token for API // usage. ClientID string // ClientSecret is the OAuth client secret needed to obtain an access token // for API usage. ClientSecret string // RefreshToken is a token that's used by the application // (as opposed to the user) to refresh the access token // if it expires. RefreshToken string // APIBaseURL allows overriding the default API base URL (https://www.site24x7.com/api). // See https://www.site24x7.com/help/api/index.html#introduction for options of data centers for top level domain. APIBaseURL string // TokenURL allows overriding the default token URL (https://accounts.zoho.com/oauth/v2/token). // See https://www.site24x7.com/help/api/index.html#authentication for options of data centers for top level domain. TokenURL string // RetryConfig contains the configuration of the backoff-retry behavior. If // nil, backoff.DefaultRetryConfig will be used. RetryConfig *backoff.RetryConfig }
Config is the configuration for the Site24x7 API Client.