Documentation
¶
Index ¶
- func HandleGetGroup(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
- func HandleGetGroups(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
- func HandleGetMetric(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
- func HandleGetMetrics(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
- func HandleGetStatus(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
- func HandlePatchStatus(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
- func NewHandler() http.Handler
- type Check
- type Error
- type ErrorResponse
- type Group
- func (g Group) GetID() string
- func (g Group) GetReferencedIDs() []jsonapi.ReferenceID
- func (g Group) GetReferences() []jsonapi.Reference
- func (g *Group) SetID(v string) error
- func (g *Group) SetToManyReferenceIDs(name string, ids []string) error
- func (g *Group) SetToOneReferenceID(name, id string) error
- type Metric
- type NullMetricType
- type NullValueType
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleGetGroup ¶
func HandleGetGroup(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
func HandleGetGroups ¶
func HandleGetGroups(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
func HandleGetMetric ¶
func HandleGetMetric(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
func HandleGetMetrics ¶
func HandleGetMetrics(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
func HandleGetStatus ¶
func HandleGetStatus(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
func HandlePatchStatus ¶
func HandlePatchStatus(rw http.ResponseWriter, r *http.Request, p httprouter.Params)
func NewHandler ¶
Types ¶
type Check ¶
type ErrorResponse ¶
type ErrorResponse struct {
Errors []Error `json:"errors"`
}
type Group ¶
type Group struct {
ID string `json:"-" yaml:"id"`
Path string `json:"path" yaml:"path"`
Name string `json:"name" yaml:"name"`
Checks []Check `json:"checks" yaml:"checks"`
Parent *Group `json:"-" yaml:"-"`
ParentID string `json:"-" yaml:"parent-id"`
Groups []*Group `json:"-" yaml:"-"`
GroupIDs []string `json:"-" yaml:"group-ids"`
}
func FlattenGroup ¶
func (Group) GetReferencedIDs ¶
func (g Group) GetReferencedIDs() []jsonapi.ReferenceID
func (Group) GetReferences ¶
func (*Group) SetToManyReferenceIDs ¶
func (*Group) SetToOneReferenceID ¶
type Metric ¶
type Metric struct {
Name string `json:"-" yaml:"name"`
Type NullMetricType `json:"type" yaml:"type"`
Contains NullValueType `json:"contains" yaml:"contains"`
Tainted null.Bool `json:"tainted" yaml:"tainted"`
Sample map[string]float64 `json:"sample" yaml:"sample"`
}
type NullMetricType ¶
type NullMetricType struct {
Type stats.MetricType
Valid bool
}
func (NullMetricType) MarshalJSON ¶
func (t NullMetricType) MarshalJSON() ([]byte, error)
func (*NullMetricType) UnmarshalJSON ¶
func (t *NullMetricType) UnmarshalJSON(data []byte) error
type NullValueType ¶
func (NullValueType) MarshalJSON ¶
func (t NullValueType) MarshalJSON() ([]byte, error)
func (*NullValueType) UnmarshalJSON ¶
func (t *NullValueType) UnmarshalJSON(data []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.