Documentation ¶
Index ¶
- Variables
- func StatusCakeMonitorMonitorToBaseMonitorMapper(statuscakeMonitor StatusCakeMonitorMonitor) *models.Monitor
- func StatusCakeMonitorMonitorsToBaseMonitorsMapper(statuscakeMonitors []StatusCakeMonitorMonitor) []models.Monitor
- type AnnotationInfo
- type StatusCakeMonitorMonitor
- type StatusCakeMonitorService
- func (service *StatusCakeMonitorService) Add(m models.Monitor)
- func (service *StatusCakeMonitorService) GetAll() []models.Monitor
- 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)
- type StatusCakeUpsertResponse
Constants ¶
This section is empty.
Variables ¶
var AnnotationMap = map[string]AnnotationInfo{ "statuscake.monitor.stakater.com/check-rate": AnnotationInfo{"CheckRate", "int"}, "statuscake.monitor.stakater.com/test-type": AnnotationInfo{"TestType", "string"}, "statuscake.monitor.stakater.com/paused": AnnotationInfo{"Paused", "bool"}, "statuscake.monitor.stakater.com/ping-url": AnnotationInfo{"PingURL", "string"}, "statuscake.monitor.stakater.com/follow-redirect": AnnotationInfo{"FollowRedirect", "bool"}, "statuscake.monitor.stakater.com/port": AnnotationInfo{"Port", "int"}, "statuscake.monitor.stakater.com/trigger-rate": AnnotationInfo{"TriggerRate", "int"}, "statuscake.monitor.stakater.com/contact-group": AnnotationInfo{"ContactGroup", "string"}} // String (0-60)
AnnotationMap holds all the enabled annotations for StatusCake
Functions ¶
func StatusCakeMonitorMonitorToBaseMonitorMapper ¶
func StatusCakeMonitorMonitorToBaseMonitorMapper(statuscakeMonitor StatusCakeMonitorMonitor) *models.Monitor
StatusCakeMonitorMonitorToBaseMonitorMapper function to map Statuscake structure to Monitor
func StatusCakeMonitorMonitorsToBaseMonitorsMapper ¶
func StatusCakeMonitorMonitorsToBaseMonitorsMapper(statuscakeMonitors []StatusCakeMonitorMonitor) []models.Monitor
StatusCakeMonitorMonitorsToBaseMonitorsMapper function to map Statuscake structure to Monitor
Types ¶
type AnnotationInfo ¶
type AnnotationInfo struct {
// contains filtered or unexported fields
}
AnnotationInfo is the annotation information structure for AnnotationMap
type StatusCakeMonitorMonitor ¶
type StatusCakeMonitorMonitor struct { TestID int `json:"TestID"` Paused bool `json:"Paused"` TestType string `json:"TestType"` WebsiteName string `json:"WebsiteName"` WebsiteURL string `json:"WebsiteURL"` ContactGroup []string `json:"ContactGroup"` ContactID int `json:"ContactID"` Status string `json:"Status"` Uptime int `json:"Uptime"` Tags []string `json:"Tags"` WebsiteHost string `json:"WebsiteHost"` }
StatusCakeMonitorMonitor response Structure for GetAll and GetByName API's for Statuscake
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) 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
type StatusCakeUpsertResponse ¶
type StatusCakeUpsertResponse struct { Issues interface{} `json:"Issues"` Success bool `json:"Success"` Message string `json:"Message"` InsertID int `json:"InsertID"` }
StatusCakeUpsertResponse response Structure for Insert API for Statuscake