Documentation
¶
Index ¶
- func AggregateIncidents(incidents []*models.Incident) models.AggregatedIncidents
- func AggregateScheduledMaintenance(schedueldMaintenance []*models.ScheduledMaintenance) models.AggregatedScheduledMaintenances
- func CreateIncident(incident *models.Incident) (*models.Incident, error)
- func CreateIncidentUpdate(incidentID int, update *models.StatusUpdate) (*models.Incident, error)
- func CreateRegion(region *models.Region) error
- func CreateScheduledMaintenance(scheduledMaintenance *models.ScheduledMaintenance) (*models.ScheduledMaintenance, error)
- func CreateScheduledMaintenanceUpdate(incidentID int, update *models.StatusUpdate) (*models.ScheduledMaintenance, error)
- func CreateService(service *models.Service) error
- func DBSnapshot(w io.Writer) error
- func DeleteIncident(id int) error
- func DeleteIncidentUpdate(incidentID int, updateID int) error
- func DeleteRegion(id int) error
- func DeleteScheduledMaintenance(id int) error
- func DeleteScheduledMaintenanceUpdate(incidentID int, updateID int) error
- func GetActiveMaintenance(scheduledMaintenances []*models.ScheduledMaintenance) *models.ScheduledMaintenance
- func GetIncidentByID(id int) (*models.Incident, error)
- func GetIncidentUpdate(incidentID int, updateID int) (*models.StatusUpdate, error)
- func GetIncidentUpdates(incidentID int) ([]*models.StatusUpdate, error)
- func GetIncidents(latest bool) ([]*models.Incident, error)
- func GetRegionByCodeAndServiceName(regionCode, serviceName string) (*models.Region, error)
- func GetRegions() ([]*models.Region, error)
- func GetScheduledMaintenance(latest bool) ([]*models.ScheduledMaintenance, error)
- func GetScheduledMaintenanceByID(id int) (*models.ScheduledMaintenance, error)
- func GetScheduledMaintenanceUpdate(incidentID int, updateID int) (*models.StatusUpdate, error)
- func GetScheduledMaintenanceUpdates(maintenanceID int) ([]*models.StatusUpdate, error)
- func GetServiceByID(id int) (*models.Service, error)
- func GetServiceByName(name string) (*models.Service, error)
- func GetServices() ([]*models.Service, error)
- func GetServicesEnabled() ([]*models.Service, error)
- func LivenessCheck() error
- func MostCriticalServiceStatus(services []*models.Service, regions []*models.Region) int
- func PatchScheduledMaintenance(scheduledMaintenance *models.ScheduledMaintenance) error
- func RunMigrations() error
- func SendIncidentTwitter(incident *models.Incident) (int64, error)
- func SendIncidentUpdateTwitter(incident *models.Incident, update *models.StatusUpdate) (int64, error)
- func SendScheduledMaintenanceTwitter(incident *models.ScheduledMaintenance) (int64, error)
- func SendScheduledMaintenanceUpdateTwitter(scheduledMaintenance *models.ScheduledMaintenance, update *models.StatusUpdate) (int64, error)
- func TwistItUp() error
- func UpdateService(service *models.Service) error
- func ValidateAndCreateRegion(region models.Region) (models.Region, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateIncidents ¶
func AggregateIncidents(incidents []*models.Incident) models.AggregatedIncidents
AggregateIncidents aggregates the incidents
func AggregateScheduledMaintenance ¶
func AggregateScheduledMaintenance(schedueldMaintenance []*models.ScheduledMaintenance) models.AggregatedScheduledMaintenances
AggregateScheduledMaintenance aggregates the ScheduledMaintenance
func CreateIncident ¶
CreateIncident creates the incident in the storage layer
func CreateIncidentUpdate ¶
CreateIncidentUpdate creates an update for an incident
func CreateRegion ¶
CreateRegion creates the service in the storage layer
func CreateScheduledMaintenance ¶
func CreateScheduledMaintenance(scheduledMaintenance *models.ScheduledMaintenance) (*models.ScheduledMaintenance, error)
CreateScheduledMaintenance creates scheduled maintenance in the storage layer
func CreateScheduledMaintenanceUpdate ¶
func CreateScheduledMaintenanceUpdate(incidentID int, update *models.StatusUpdate) (*models.ScheduledMaintenance, error)
CreateScheduledMaintenanceUpdate creates an update for a scheduled maintenance
func CreateService ¶
CreateService creates the service in the storage layer
func DeleteIncident ¶
DeleteIncident removes the incident from the storage layer
func DeleteIncidentUpdate ¶
DeleteIncidentUpdate deletes an update for an incident
func DeleteRegion ¶
DeleteRegion deletes a region in the storage layer
func DeleteScheduledMaintenance ¶
DeleteScheduledMaintenance removes the scheduled maintenance from the storage layer
func DeleteScheduledMaintenanceUpdate ¶
DeleteScheduledMaintenanceUpdate deletes an update for a scheduled maintenance
func GetActiveMaintenance ¶
func GetActiveMaintenance(scheduledMaintenances []*models.ScheduledMaintenance) *models.ScheduledMaintenance
func GetIncidentByID ¶
GetIncidentByID retrieves the incident by id, both incident and error will be nil if none found
func GetIncidentUpdate ¶
func GetIncidentUpdate(incidentID int, updateID int) (*models.StatusUpdate, error)
GetIncidentUpdate gets an update for an incident
func GetIncidentUpdates ¶
func GetIncidentUpdates(incidentID int) ([]*models.StatusUpdate, error)
GetIncidentUpdates gets updates for an incident
func GetIncidents ¶
GetIncidents retrieves the incidents from the storage layer
func GetRegionByCodeAndServiceName ¶
GetRegionByCodeAndServiceName gets the region by code and service name, returns nil if not found
func GetRegions ¶
GetRegions gets all of the services from the storage layer
func GetScheduledMaintenance ¶
func GetScheduledMaintenance(latest bool) ([]*models.ScheduledMaintenance, error)
GetScheduledMaintenance retrieves the scheduled maintenance from the storage layer
func GetScheduledMaintenanceByID ¶
func GetScheduledMaintenanceByID(id int) (*models.ScheduledMaintenance, error)
GetScheduledMaintenanceByID retrieves the scheduled maintenance by id, both scheduled maintenance and error will be nil if none found
func GetScheduledMaintenanceUpdate ¶
func GetScheduledMaintenanceUpdate(incidentID int, updateID int) (*models.StatusUpdate, error)
GetScheduledMaintenanceUpdate gets an update for a scheduled maintenance
func GetScheduledMaintenanceUpdates ¶
func GetScheduledMaintenanceUpdates(maintenanceID int) ([]*models.StatusUpdate, error)
GetScheduledMaintenanceUpdates gets updates for a scheduled maintenance
func GetServiceByID ¶
GetService Get service by id
func GetServiceByName ¶
GetServiceByName gets the service by name, returns nil if not found
func GetServices ¶
GetServices gets all of the services from the storage layer
func GetServicesEnabled ¶
GetServicesEnabled gets all of the services that are enabled from the storage layer
func LivenessCheck ¶
func LivenessCheck() error
LivenessCheck checks the database to see if it responds to a ping
func MostCriticalServiceStatus ¶
MostCriticalServiceStatus returns the most critical service number of the services provided
func PatchScheduledMaintenance ¶
func PatchScheduledMaintenance(scheduledMaintenance *models.ScheduledMaintenance) error
PatchScheduledMaintenance updates the scheduled maintenance in the storage layer
func RunMigrations ¶
func RunMigrations() error
func SendIncidentTwitter ¶
SendIncidentTwitter sends the incident info to the offical Rocket.Chat Cloud twitter account.
func SendIncidentUpdateTwitter ¶
func SendIncidentUpdateTwitter(incident *models.Incident, update *models.StatusUpdate) (int64, error)
SendIncidentUpdateTwitter sends the incident update info to the offical Rocket.Chat Cloud twitter account.
func SendScheduledMaintenanceTwitter ¶
func SendScheduledMaintenanceTwitter(incident *models.ScheduledMaintenance) (int64, error)
SendScheduledMaintenanceTwitter sends the info about the scheduled maintenance to the offical Rocket.Chat Cloud twitter account.
func SendScheduledMaintenanceUpdateTwitter ¶
func SendScheduledMaintenanceUpdateTwitter(scheduledMaintenance *models.ScheduledMaintenance, update *models.StatusUpdate) (int64, error)
SendScheduledMaintenanceUpdateTwitter sends the info about the update to scheduled maintenance to the twitter
func UpdateService ¶
UpdateService updates the service
Types ¶
This section is empty.