Documentation ¶
Index ¶
- Constants
- 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 ¶
const ( StatuscakeCheckRateAnnotation = "statuscake.monitor.stakater.com/check-rate" StatuscakeTestTypeAnnotation = "statuscake.monitor.stakater.com/test-type" StatuscakePausedAnnotation = "statuscake.monitor.stakater.com/paused" StatuscakePingURLAnnotation = "statuscake.monitor.stakater.com/ping-url" StatuscakeFollowRedirectAnnotation = "statuscake.monitor.stakater.com/follow-redirect" StatuscakePortAnnotation = "statuscake.monitor.stakater.com/port" StatuscakeTriggerRateAnnotation = "statuscake.monitor.stakater.com/trigger-rate" StatuscakeContactGroupAnnotation = "statuscake.monitor.stakater.com/contact-group" StatuscakeBasicAuthUserAnnotation = "statuscake.monitor.stakater.com/basic-auth-user" )
Variables ¶
var AnnotationMap = map[string]AnnotationInfo{ StatuscakeCheckRateAnnotation: AnnotationInfo{"CheckRate", "int"}, StatuscakeTestTypeAnnotation: AnnotationInfo{"TestType", "string"}, StatuscakePausedAnnotation: AnnotationInfo{"Paused", "bool"}, StatuscakePingURLAnnotation: AnnotationInfo{"PingURL", "string"}, StatuscakeFollowRedirectAnnotation: AnnotationInfo{"FollowRedirect", "bool"}, StatuscakePortAnnotation: AnnotationInfo{"Port", "int"}, StatuscakeTriggerRateAnnotation: AnnotationInfo{"TriggerRate", "int"}, StatuscakeContactGroupAnnotation: AnnotationInfo{"ContactGroup", "string"}, StatuscakeBasicAuthUserAnnotation: AnnotationInfo{"BasicUser", "string"}, }
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 float64 `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