statuscake

package
v1.0.87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL