results

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: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomEndpoint

func CustomEndpoint(filter bson.M) []bson.M

CustomEndpoint query to aggregate a/r results over a custom period of time from mongoDB

func CustomEndpointGroup

func CustomEndpointGroup(filter bson.M) []bson.M

CustomEndpointGroup query to aggregate results over a custom period from mongodb

func CustomServiceFlavor

func CustomServiceFlavor(filter bson.M) []bson.M

CustomServiceFlavor query to aggregate SF results over a custom period of time from mongoDB

func CustomSuperGroup

func CustomSuperGroup(filter bson.M) []bson.M

CustomSuperGroup function to build the MongoDB aggregation query for custom period aggregation

func DailyEndpoint

func DailyEndpoint(filter bson.M) []bson.M

DailyEndpoint query to aggregate daily endpoint a/r results from mongoDB

func DailyEndpointGroup

func DailyEndpointGroup(filter bson.M) []bson.M

DailyEndpointGroup query to aggregate daily results from mongodb

func DailyServiceFlavor

func DailyServiceFlavor(filter bson.M) []bson.M

DailyServiceFlavor query to aggregate daily SF results from mongoDB

func DailySuperGroup

func DailySuperGroup(filter bson.M) []bson.M

DailySuperGroup function to build the MongoDB aggregation query for daily calculations

func FlatCustomEndpoint

func FlatCustomEndpoint(filter bson.M, limit int, skip int) []bson.M

FlatCustomEndpoint query to aggregate a/r results for a custom period of time from mongoDB

func FlatDailyEndpoint

func FlatDailyEndpoint(filter bson.M, limit int, skip int) []bson.M

FlatDailyEndpoint query to aggregate daily endpoint a/r results from mongoDB

func FlatListEndpointResults

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

FlatListEndpointResults is responsible for handling request to flat list all available endpoint results

func FlatMonthlyEndpoint

func FlatMonthlyEndpoint(filter bson.M, limit int, skip int) []bson.M

FlatMonthlyEndpoint query to aggregate monthly a/r results from mongoDB

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 ListEndpointGroupResults

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

ListEndpointGroupResults endpoint group availabilities according to the http request

func ListEndpointResults

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

ListEndpointResults is responsible for handling request to list service flavor results

func ListServiceFlavorResults

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

ListServiceFlavorResults is responsible for handling request to list service flavor results

func ListSuperGroupResults

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

ListSuperGroupResults supergroup availabilities according to the http request

func MonthlyEndpoint

func MonthlyEndpoint(filter bson.M) []bson.M

MonthlyEndpoint query to aggregate monthly a/r results from mongoDB

func MonthlyEndpointGroup

func MonthlyEndpointGroup(filter bson.M) []bson.M

MonthlyEndpointGroup query to aggregate monthly results from mongodb

func MonthlyServiceFlavor

func MonthlyServiceFlavor(filter bson.M) []bson.M

MonthlyServiceFlavor query to aggregate daily SF results from mongoDB

func MonthlySuperGroup

func MonthlySuperGroup(filter bson.M) []bson.M

MonthlySuperGroup function to build the MongoDB aggregation query for monthly calculations

func Options

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

Types

type Availability

type Availability struct {
	XMLName      xml.Name `xml:"results" json:"-"`
	Timestamp    string   `xml:"timestamp,attr,omitempty" json:"timestamp,omitempty"`
	Availability string   `xml:"availability,attr" json:"availability"`
	Reliability  string   `xml:"reliability,attr" json:"reliability"`
	Unknown      string   `xml:"unknown,attr,omitempty" json:"unknown,omitempty"`
	Uptime       string   `xml:"uptime,attr,omitempty" json:"uptime,omitempty"`
	Downtime     string   `xml:"downtime,attr,omitempty" json:"downtime,omitempty"`
}

Availability struct for formating xml/json

type Endpoint

type Endpoint struct {
	XMLName      xml.Name          `xml:"group" json:"-"`
	Name         string            `xml:"name,attr" json:"name"`
	Service      string            `xml:"service,attr,omitempty" json:"service,omitempty"`
	SuperGroup   string            `xml:"supergroup,attr,omitempty" json:"supergroup,omitempty"`
	Type         string            `xml:"type,attr" json:"type"`
	Info         map[string]string `xml:"-" json:"info,omitempty"`
	Availability []interface{}     `json:"results"`
}

Endpoint A/R struct for formating xml/json

type EndpointGroupInterface

type EndpointGroupInterface struct {
	Name         string  `bson:"name"`
	Report       string  `bson:"report"`
	Date         string  `bson:"date"`
	Type         string  `bson:"type"`
	Up           float64 `bson:"up"`
	Down         float64 `bson:"down"`
	Unknown      float64 `bson:"unknown"`
	Availability float64 `bson:"availability"`
	Reliability  float64 `bson:"reliability"`
	Weights      string  `bson:"weights"`
	SuperGroup   string  `bson:"supergroup"`
}

EndpointGroupInterface for mongodb object exchanging

type EndpointInterface

type EndpointInterface struct {
	Name         string            `bson:"name"`
	Report       string            `bson:"report"`
	Date         string            `bson:"date"`
	Type         string            `bson:"type"`
	Up           float64           `bson:"up"`
	Down         float64           `bson:"down"`
	Unknown      float64           `bson:"unknown"`
	Availability float64           `bson:"availability"`
	Reliability  float64           `bson:"reliability"`
	SuperGroup   string            `bson:"supergroup"`
	Service      string            `bson:"service"`
	Info         map[string]string `bson:"info"`
}

EndpointInterface for mongodb object exchanging

type ErrorResponse

type ErrorResponse respond.ErrorResponse

ErrorResponse shortcut to respond.ErrorResponse

type Group

type Group struct {
	XMLName      xml.Name      `xml:"group" json:"-"`
	Name         string        `xml:"name,attr" json:"name"`
	Type         string        `xml:"type,attr" json:"type"`
	Availability []interface{} `json:"results"`
}

Group struct for formating xml/json

type ServiceEndpointGroup

type ServiceEndpointGroup struct {
	XMLName   xml.Name      `xml:"group" json:"-"`
	Name      string        `xml:"name,attr" json:"name"`
	Type      string        `xml:"type,attr" json:"type"`
	Endpoints []interface{} `json:"endpoints"`
}

ServuceEndpointGroup struct listing included endpoints in a service for formating xml/json

type ServiceFlavor

type ServiceFlavor struct {
	XMLName      xml.Name      `xml:"group" json:"-"`
	Name         string        `xml:"name,attr" json:"name"`
	Type         string        `xml:"type,attr" json:"type"`
	Availability []interface{} `json:"results"`
}

ServiceFlavor struct for formating xml/json

type ServiceFlavorGroup

type ServiceFlavorGroup struct {
	XMLName       xml.Name      `xml:"group" json:"-"`
	Name          string        `xml:"name,attr" json:"name"`
	Type          string        `xml:"type,attr" json:"type"`
	ServiceFlavor []interface{} `json:"serviceflavors"`
}

ServiceFlavorGroup struct for formating xml/json

type ServiceFlavorInterface

type ServiceFlavorInterface struct {
	Name         string  `bson:"name"`
	Report       string  `bson:"report"`
	Date         string  `bson:"date"`
	Type         string  `bson:"type"`
	Up           float64 `bson:"up"`
	Down         float64 `bson:"down"`
	Unknown      float64 `bson:"unknown"`
	Availability float64 `bson:"availability"`
	Reliability  float64 `bson:"reliability"`
	SuperGroup   string  `bson:"supergroup"`
}

ServiceFlavorInterface for mongodb object exchanging

type SuperGroup

type SuperGroup struct {
	XMLName   xml.Name      `xml:"group" json:"-"`
	Name      string        `xml:"name,attr" json:"name"`
	Type      string        `xml:"type,attr" json:"type"`
	Endpoints []interface{} `json:"endpoints,omitempty"`
	Results   []interface{} `json:"results,omitempty"`
}

SuperGroup struct for formating xml/json

type SuperGroupInterface

type SuperGroupInterface struct {
	Report       string  `bson:"report"`
	Date         string  `bson:"date"`
	Type         string  `bson:"type"`
	Up           float64 `bson:"uptime"`
	Down         float64 `bson:"downtime"`
	Unknown      float64 `bson:"unknown"`
	Availability float64 `bson:"availability"`
	Reliability  float64 `bson:"reliability"`
	Weights      string  `bson:"weight"`
	SuperGroup   string  `bson:"supergroup"`
}

SuperGroupInterface for mongodb object exchanging

Jump to

Keyboard shortcuts

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