Documentation
¶
Index ¶
- func CustomEndpoint(filter bson.M) []bson.M
- func CustomEndpointGroup(filter bson.M) []bson.M
- func CustomServiceFlavor(filter bson.M) []bson.M
- func CustomSuperGroup(filter bson.M) []bson.M
- func DailyEndpoint(filter bson.M) []bson.M
- func DailyEndpointGroup(filter bson.M) []bson.M
- func DailyServiceFlavor(filter bson.M) []bson.M
- func DailySuperGroup(filter bson.M) []bson.M
- func FlatCustomEndpoint(filter bson.M, limit int, skip int) []bson.M
- func FlatDailyEndpoint(filter bson.M, limit int, skip int) []bson.M
- func FlatListEndpointResults(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func FlatMonthlyEndpoint(filter bson.M, limit int, skip int) []bson.M
- func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler)
- func ListEndpointGroupResults(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func ListEndpointResults(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func ListServiceFlavorResults(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func ListSuperGroupResults(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func MonthlyEndpoint(filter bson.M) []bson.M
- func MonthlyEndpointGroup(filter bson.M) []bson.M
- func MonthlyServiceFlavor(filter bson.M) []bson.M
- func MonthlySuperGroup(filter bson.M) []bson.M
- func Options(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- type Availability
- type Endpoint
- type EndpointGroupInterface
- type EndpointInterface
- type ErrorResponse
- type Group
- type ServiceEndpointGroup
- type ServiceFlavor
- type ServiceFlavorGroup
- type ServiceFlavorInterface
- type SuperGroup
- type SuperGroupInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomEndpoint ¶
CustomEndpoint query to aggregate a/r results over a custom period of time from mongoDB
func CustomEndpointGroup ¶
CustomEndpointGroup query to aggregate results over a custom period from mongodb
func CustomServiceFlavor ¶
CustomServiceFlavor query to aggregate SF results over a custom period of time from mongoDB
func CustomSuperGroup ¶
CustomSuperGroup function to build the MongoDB aggregation query for custom period aggregation
func DailyEndpoint ¶
DailyEndpoint query to aggregate daily endpoint a/r results from mongoDB
func DailyEndpointGroup ¶
DailyEndpointGroup query to aggregate daily results from mongodb
func DailyServiceFlavor ¶
DailyServiceFlavor query to aggregate daily SF results from mongoDB
func DailySuperGroup ¶
DailySuperGroup function to build the MongoDB aggregation query for daily calculations
func FlatCustomEndpoint ¶
FlatCustomEndpoint query to aggregate a/r results for a custom period of time from mongoDB
func FlatDailyEndpoint ¶
FlatDailyEndpoint query to aggregate daily endpoint a/r results from mongoDB
func FlatListEndpointResults ¶
FlatListEndpointResults is responsible for handling request to flat list all available endpoint results
func FlatMonthlyEndpoint ¶
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 ¶
ListEndpointGroupResults endpoint group availabilities according to the http request
func ListEndpointResults ¶
ListEndpointResults is responsible for handling request to list service flavor results
func ListServiceFlavorResults ¶
ListServiceFlavorResults is responsible for handling request to list service flavor results
func ListSuperGroupResults ¶
ListSuperGroupResults supergroup availabilities according to the http request
func MonthlyEndpoint ¶
MonthlyEndpoint query to aggregate monthly a/r results from mongoDB
func MonthlyEndpointGroup ¶
MonthlyEndpointGroup query to aggregate monthly results from mongodb
func MonthlyServiceFlavor ¶
MonthlyServiceFlavor query to aggregate daily SF results from mongoDB
func MonthlySuperGroup ¶
MonthlySuperGroup function to build the MongoDB aggregation query for monthly calculations
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