Documentation ¶
Index ¶
- func StatusCakeApiResponseDataToBaseMonitorMapper(statuscakeData statuscake.UptimeTestResponse) *models.Monitor
- func StatusCakeMonitorMonitorToBaseMonitorMapper(statuscakeData StatusCakeMonitorData) *models.Monitor
- func StatusCakeMonitorMonitorsToBaseMonitorsMapper(statuscakeData []StatusCakeMonitorData) []models.Monitor
- type StatusCakeData
- type StatusCakeMonitor
- type StatusCakeMonitorData
- type StatusCakeMonitorMetadata
- type StatusCakeMonitorService
- func (service *StatusCakeMonitorService) Add(m models.Monitor)
- func (monitor *StatusCakeMonitorService) Equal(oldMonitor models.Monitor, newMonitor models.Monitor) bool
- func (service *StatusCakeMonitorService) GetAll() []models.Monitor
- func (service *StatusCakeMonitorService) GetByID(id string) (*models.Monitor, error)
- func (service *StatusCakeMonitorService) GetByName(name string) (*models.Monitor, error)
- func (service *StatusCakeMonitorService) Remove(m models.Monitor)
- func (service *StatusCakeMonitorService) Setup(p config.Provider)
- func (service *StatusCakeMonitorService) Update(m models.Monitor)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StatusCakeApiResponseDataToBaseMonitorMapper ¶ added in v2.1.20
func StatusCakeApiResponseDataToBaseMonitorMapper(statuscakeData statuscake.UptimeTestResponse) *models.Monitor
StatusCakeApiResponseDataToBaseMonitorMapper function to map Statuscake Uptime Test Response to Monitor
func StatusCakeMonitorMonitorToBaseMonitorMapper ¶
func StatusCakeMonitorMonitorToBaseMonitorMapper(statuscakeData StatusCakeMonitorData) *models.Monitor
StatusCakeMonitorMonitorToBaseMonitorMapper function to map Statuscake structure to Monitor
func StatusCakeMonitorMonitorsToBaseMonitorsMapper ¶
func StatusCakeMonitorMonitorsToBaseMonitorsMapper(statuscakeData []StatusCakeMonitorData) []models.Monitor
StatusCakeMonitorMonitorsToBaseMonitorsMapper function to map Statuscake structure to Monitor
Types ¶
type StatusCakeData ¶ added in v2.1.20
type StatusCakeData struct {
statuscake.UptimeTest
}
TODO use statuscake managed structs, rather than managing own structs
type StatusCakeMonitor ¶ added in v2.1.20
type StatusCakeMonitor struct { StatusCakeData []StatusCakeMonitorData `json:"data"` StatusCakeMetadata StatusCakeMonitorMetadata `json:"metadata"` }
type StatusCakeMonitorData ¶ added in v2.1.20
type StatusCakeMonitorData struct { TestID string `json:"id"` Paused bool `json:"paused"` WebsiteName string `json:"name"` WebsiteURL string `json:"website_url"` TestType string `json:"test_type"` CheckRate int `json:"check_rate"` ContactGroup []string `json:"contact_groups"` Status string `json:"status"` Tags []string `json:"tags"` Uptime float64 `json:"uptime"` }
type StatusCakeMonitorMetadata ¶ added in v2.1.20
type StatusCakeMonitorService ¶
type StatusCakeMonitorService struct {
// contains filtered or unexported fields
}
StatusCakeMonitorService is the service structure for StatusCake
func (*StatusCakeMonitorService) Add ¶
func (service *StatusCakeMonitorService) Add(m models.Monitor)
Add will create a new Monitor
func (*StatusCakeMonitorService) GetAll ¶
func (service *StatusCakeMonitorService) GetAll() []models.Monitor
GetAll function will fetch all monitors
func (*StatusCakeMonitorService) GetByID ¶ added in v2.1.20
func (service *StatusCakeMonitorService) GetByID(id string) (*models.Monitor, error)
GetByID function will Get a monitor by it's ID
func (*StatusCakeMonitorService) GetByName ¶
func (service *StatusCakeMonitorService) GetByName(name string) (*models.Monitor, error)
GetByName function will Get a monitor by it's name
func (*StatusCakeMonitorService) Remove ¶
func (service *StatusCakeMonitorService) Remove(m models.Monitor)
Remove will delete an existing Monitor
func (*StatusCakeMonitorService) Setup ¶
func (service *StatusCakeMonitorService) Setup(p config.Provider)
Setup function is used to initialise the StatusCake service
func (*StatusCakeMonitorService) Update ¶
func (service *StatusCakeMonitorService) Update(m models.Monitor)
Update will update an existing Monitor