Documentation ¶
Index ¶
- func NewRelicTemporalitySelector(kind view.InstrumentKind) metricdata.Temporality
- type GrafanaAlert
- type GrafanaBody
- type Router
- func (r *Router) CreateEscalation(c *gin.Context)
- func (r *Router) CreateService(c *gin.Context)
- func (r *Router) CreateTeam(c *gin.Context)
- func (r *Router) CreateUser(c *gin.Context)
- func (r *Router) DeleteEscalation(c *gin.Context)
- func (r *Router) DeleteService(c *gin.Context)
- func (r *Router) DeleteTeam(c *gin.Context)
- func (r *Router) DeleteUser(c *gin.Context)
- func (r *Router) GetAlerts(c *gin.Context)
- func (r *Router) GetConfig(c *gin.Context)
- func (r *Router) GetEscalation(c *gin.Context)
- func (r *Router) GetEscalations(c *gin.Context)
- func (r *Router) GetService(c *gin.Context)
- func (r *Router) GetServices(c *gin.Context)
- func (r *Router) GetTeam(c *gin.Context)
- func (r *Router) GetTeams(c *gin.Context)
- func (r *Router) GetUser(c *gin.Context)
- func (r *Router) GetUsers(c *gin.Context)
- func (r *Router) GrafanaInbound(c *gin.Context)
- func (r *Router) SendErr(c *gin.Context, status int, err error, span trace.Span)
- func (r *Router) SendErrorMessage(c *gin.Context, status int, message string)deprecated
- func (r *Router) SendJsonResponse(c *gin.Context, status int, h interface{}, span trace.Span)
- func (r *Router) SendNullResponse(c *gin.Context, status int, span trace.Span)
- func (r *Router) UpdateEscalation(c *gin.Context)
- func (r *Router) UpdateService(c *gin.Context)
- func (r *Router) UpdateTeam(c *gin.Context)
- func (r *Router) UpdateUser(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRelicTemporalitySelector ¶
func NewRelicTemporalitySelector(kind view.InstrumentKind) metricdata.Temporality
Types ¶
type GrafanaAlert ¶
type GrafanaAlert struct { Status string `json:"status"` Labels map[string]string `json:"labels"` Annotations map[string]string `json:"annotations"` StartsAt time.Time `json:"startsAt"` EndsAt time.Time `json:"endsAt"` GeneratorURL string `json:"generatorURL"` Fingerprint string `json:"fingerprint"` SilenceURL string `json:"silenceURL"` DashboardURL string `json:"dashboardURL"` PanelURL string `json:"panelURL"` ValueString string `json:"valueString"` Values map[string]interface{} `json:"values"` }
type GrafanaBody ¶
type GrafanaBody struct { Receiver string `json:"receiver"` Status string `json:"status"` Alerts []GrafanaAlert `json:"alerts"` GroupLabels map[string]string `json:"groupLabels"` CommonLabels map[string]string `json:"commonLabels"` CommonAnnotations map[string]string `json:"commonAnnotations"` ExternalURL string `json:"externalURL"` Version string `json:"version"` GroupKey string `json:"groupKey"` TruncatedAlerts int `json:"truncatedAlerts"` OrgId int `json:"orgId"` Title string `json:"title"` State string `json:"state"` Message string `json:"message"` }
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) CreateEscalation ¶
CreateEscalation godoc
@Summary Create an escalation @Description Create an escalation @Tags escalations @Accept json @Produce json @Success 200 {object} escalation.Escalation @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /escalations [post] @Param escalation body escalation.Escalation true "escalation"
func (*Router) CreateService ¶
CreateService godoc
@Summary Create a service @Description Create a service @Tags services @Accept json @Produce json @Success 200 {object} service.Service @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /services [post] @Param service body service.Service true "service"
func (*Router) CreateTeam ¶
CreateTeam godoc
@Summary Create a team @Description Create a team @Tags teams @Accept json @Produce json @Success 200 {object} team.Team @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /teams [post] @Param team body team.Team true "team"
func (*Router) CreateUser ¶
CreateUser godoc
@Summary Create a user @Description Create a user @Tags users @Accept json @Produce json @Success 200 {object} user.User @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /users [post] @Param user body user.User true "user"
func (*Router) DeleteEscalation ¶
DeleteEscalation godoc
@Summary Delete an existing escalation @Description Delete an existing escalation @Tags escalations @Accept json @Produce json @Success 204 @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /escalations/{id} [delete] @Param id path int true "id"
func (*Router) DeleteService ¶
DeleteService godoc
@Summary Delete a service @Description Delete a service @Tags services @Accept json @Produce json @Success 204 @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /services/{id} [delete] @Param id path int true "id"
func (*Router) DeleteTeam ¶
DeleteTeam godoc
@Summary Delete a team @Description Delete a team @Tags teams @Accept json @Produce json @Success 204 @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /teams/{id} [delete] @Param id path int true "id"
func (*Router) DeleteUser ¶
DeleteUser godoc
@Summary Delete an existing user @Description Delete an existing user @Tags users @Accept json @Produce json @Success 204 @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /users/{id} [delete] @Param id path int true "id"
func (*Router) GetAlerts ¶
GetAlerts godoc
@Summary Get all alerts @Description Get all alerts @Tags alerts @Accept json @Produce json @Success 200 {array} data.Alert @Failure 500 {object} data.Error @Router /services [get]
func (*Router) GetConfig ¶
GetConfig godoc
@Summary Get currently running config @Schemes @Description Get currently running config @Tags debug @Produce json @Success 200 {object} config.Config @Router /debug/config [get]
func (*Router) GetEscalation ¶
GetEscalation godoc
@Summary Get an escalation @Description Get an escalation @Tags escalations @Accept json @Produce json @Success 200 {object} escalation.Escalation @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /escalations/{id} [get] @Param id path int true "id"
func (*Router) GetEscalations ¶
GetEscalations godoc
@Summary Get all escalations @Schemes @Description Get all escalations @Tags escalations @Accept json @Produce json @Success 200 {array} escalation.Escalation @Failure 500 {object} data.Error @Router /escalations [get]
func (*Router) GetService ¶
GetService godoc
@Summary Get a service @Description Get a service @Tags services @Accept json @Produce json @Success 200 {object} service.Service @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /services/{id} [get] @Param id path int true "id"
func (*Router) GetServices ¶
GetServices godoc
@Summary Get all services @Description Get all services @Tags services @Accept json @Produce json @Success 200 {array} service.Service @Failure 500 {object} data.Error @Router /services [get]
func (*Router) GetTeam ¶
GetTeam godoc
@Summary Get a team @Description Get a team @Tags teams @Accept json @Produce json @Success 200 {object} team.Team @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /teams/{id} [get] @Param id path int true "id"
func (*Router) GetTeams ¶
GetTeams godoc
@Summary Get all teams @Description Get all teams @Tags teams @Accept json @Produce json @Success 200 {array} team.Team @Failure 500 {object} data.Error @Router /teams [get]
func (*Router) GetUser ¶
GetUser godoc
@Summary Get a user @Description Get a user @Tags users @Accept json @Produce json @Success 200 {object} user.User @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /users/{id} [get] @Param id path int true "id"
func (*Router) GetUsers ¶
GetUsers godoc
@Summary Get all users @Schemes @Description Get all users @Tags users @Accept json @Produce json @Success 200 {array} user.User @Failure 500 {object} data.Error @Router /users [get]
func (*Router) GrafanaInbound ¶
GrafanaInbound godoc
@Summary Send a Grafana alert @Description Send a Grafana alert @Tags alerts @Accept json @Produce json @Success 204 @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /alerts/grafana [post] @Param alert body GrafanaBody true "aolert"
func (*Router) SendJsonResponse ¶
func (*Router) SendNullResponse ¶
func (*Router) UpdateEscalation ¶
UpdateEscalation godoc
@Summary Update an existing escalation @Description Create an existing escalation @Tags escalations @Accept json @Produce json @Success 200 {object} escalation.Escalation @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /escalations/{id} [put] @Param escalation body escalation.Escalation true "escalation" @Param id path int true "id"
func (*Router) UpdateService ¶
UpdateService godoc
@Summary Update a service @Description Update a service @Tags services @Accept json @Produce json @Success 200 {object} service.Service @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /services/{id} [put] @Param service body service.Service true "service" @Param id path int true "id"
func (*Router) UpdateTeam ¶
UpdateTeam godoc
@Summary Update a team @Description Update a team @Tags teams @Accept json @Produce json @Success 200 {object} team.Team @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Failure 500 {object} data.Error @Router /services/{id} [put] @Param team body team.Team true "team" @Param id path int true "id"
func (*Router) UpdateUser ¶
UpdateUser godoc
@Summary Update an existing user @Description Create an existing user @Tags users @Accept json @Produce json @Success 200 {object} user.User @Failure 400 {object} data.Error @Failure 500 {object} data.Error @Router /users/{id} [put] @Param user body user.User true "user" @Param id path int true "id"
Click to show internal directories.
Click to hide internal directories.