downtimes

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

Create request handler creates a new weight resource

func Delete

func Delete(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

delete downtimes resource based on ID

func HandleSubrouter

func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler)

HandleSubrouter uses the subrouter for a specific calls and creates a tree of sorts handling each route with a different subrouter

func List

func List(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

List the existing downtime resource for the exact date requested

func Options

func Options(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

Options request handler

Types

type Downtime

type Downtime struct {
	HostName       string `bson:"hostname" json:"hostname"`
	Service        string `bson:"service" json:"service"`
	StartTime      string `bson:"start_time" json:"start_time"`
	EndTime        string `bson:"end_time" json:"end_time"`
	Description    string `bson:"description" json:"description,omitempty"`
	Classification string `bson:"classification" json:"classification,omitempty"`
	Severity       string `bson:"severity" json:"severity,omitempty"`
}

Downtime holds downtime information for a specific host

type Downtimes

type Downtimes struct {
	DateInt   int        `bson:"date_integer" json:"-"`
	Date      string     `bson:"date" json:"date"`
	Endpoints []Downtime `bson:"endpoints" json:"endpoints"`
}

Downtimes holds a list of downtimes for endpoints for a specific day

type Links struct {
	Self string `json:"self"`
}

Links struct to hold links

Jump to

Keyboard shortcuts

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