Documentation ¶
Index ¶
- func SendError(w http.ResponseWriter, data interface{})
- func SendSuccess(w http.ResponseWriter, data interface{})
- type FinchHandler
- type Handlers
- func (h *Handlers) AlertDetail(w http.ResponseWriter, r *http.Request) (interface{}, error)
- func (h *Handlers) Alerts(w http.ResponseWriter, r *http.Request) (interface{}, error)
- func (h *Handlers) CreateUser(w http.ResponseWriter, r *http.Request) (interface{}, error)
- func (h *Handlers) ProcessAlert(alertID string) error
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendError ¶
func SendError(w http.ResponseWriter, data interface{})
SendError sends Response with {status: "error"}
func SendSuccess ¶
func SendSuccess(w http.ResponseWriter, data interface{})
SendSuccess sends Response with {status: "success"}
Types ¶
type FinchHandler ¶
type FinchHandler func(w http.ResponseWriter, r *http.Request) (interface{}, error)
FinchHandler .
func (FinchHandler) ServeHTTP ¶
func (fn FinchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers .
func NewHandlers ¶
func NewHandlers(stg storage.Storage, alt alerter.Alerter, lgr logger.InfoErrorLogger, auth *auth.Auth, counterChannel chan bool, config *config.AppConfig) *Handlers
NewHandlers initializes handlers
func (*Handlers) AlertDetail ¶
AlertDetail returns alert object or it's history
func (*Handlers) CreateUser ¶
CreateUser creates a new user
func (*Handlers) ProcessAlert ¶
ProcessAlert processes the alert
Click to show internal directories.
Click to hide internal directories.