statuscake

package
v1.0.59 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Jump to

Keyboard shortcuts

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