api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertApi

type AlertApi struct {
	// contains filtered or unexported fields
}

RigAlert

func NewAlertApi

func NewAlertApi(config *config.RigConfig, mgr *routemgr.RouteMgr) *AlertApi

NewRigAlert returns a new instance

func (*AlertApi) AddAlert

func (aa *AlertApi) AddAlert(w http.ResponseWriter, r *http.Request)

Add an Alert id

API Endpoint: POST /v1/alerts/{id}

func (*AlertApi) DeleteAlert

func (aa *AlertApi) DeleteAlert(w http.ResponseWriter, r *http.Request)

Delete an Alert ID API Endpoint: DELETE /v1/alerts/{id}

func (*AlertApi) Ekg

func (aa *AlertApi) Ekg(w http.ResponseWriter, r *http.Request)

API Endpoint: /ekg

func (*AlertApi) ListAlerts

func (aa *AlertApi) ListAlerts(w http.ResponseWriter, r *http.Request)

Delete an Alert ID API Endpoint: DELETE /v1/alerts/{id}

func (*AlertApi) ListenAndServe

func (aa *AlertApi) ListenAndServe()

Listen and Serve until process terminated

func (*AlertApi) SendAlert

func (aa *AlertApi) SendAlert(w http.ResponseWriter, r *http.Request)

API Endpoint: /v1/alerts/{id}/fire

func (*AlertApi) UpdateAlert

func (aa *AlertApi) UpdateAlert(w http.ResponseWriter, r *http.Request)

Update an Alert ID API Endpoint: PUT /v1/alerts/{id}

type Event

type Event struct {
	Message string `json:"msg,omitempty"`
}

API payload

Jump to

Keyboard shortcuts

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