Documentation
¶
Index ¶
- Constants
- func NewJSONError(message string, code int) []byte
- func NewRouter(application app.App) *chi.Mux
- func NewServerError(ctx context.Context, err error) []byte
- func ZapErrorLogContext(err error) []zap.Field
- type AlertDestinationCreateRequest
- type AlertDestinationHandler
- type AlertHandler
- type AlertListResponse
- type Error
- type Event
- type EventHandler
- type NetworkAddress
- type Project
- type ProjectCreateRequest
- type ProjectCreateResponse
- type ProjectEventMessage
- type ProjectHandler
- type ProjectReadResponse
- type Server
- type ZapError
Constants ¶
View Source
const ErrorCodeJSONDecodingFailed = 1001
View Source
const ErrorCodeServerError = 500
View Source
const ErrorCodeValidationFailed = 1002
Variables ¶
This section is empty.
Functions ¶
func NewJSONError ¶
func ZapErrorLogContext ¶
Types ¶
type AlertDestinationHandler ¶
type AlertDestinationHandler struct {
// contains filtered or unexported fields
}
func NewAlertDestinationHandler ¶
func NewAlertDestinationHandler(application app.App) AlertDestinationHandler
func (AlertDestinationHandler) Create ¶
func (h AlertDestinationHandler) Create(w http.ResponseWriter, r *http.Request)
Create creates a new alert notification destination. The request model is AlertDestinationCreateRequest.
type AlertHandler ¶
type AlertHandler struct {
// contains filtered or unexported fields
}
func NewAlertHandler ¶
func NewAlertHandler(application app.App) AlertHandler
func (AlertHandler) List ¶
func (h AlertHandler) List(w http.ResponseWriter, r *http.Request)
type AlertListResponse ¶
type AlertListResponse struct {
Alerts []repository.Alert `json:"alerts"`
}
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
func NewEventHandler(app app.App, aggr *ingestion.Aggregator) EventHandler
func (EventHandler) IngestionHandler ¶
func (h EventHandler) IngestionHandler() func(w http.ResponseWriter, r *http.Request)
type NetworkAddress ¶
func (NetworkAddress) String ¶
func (addr NetworkAddress) String() string
type ProjectCreateRequest ¶
type ProjectCreateRequest struct {
Name string `json:"name" validate:"required"`
}
type ProjectCreateResponse ¶
type ProjectCreateResponse struct {
Project Project `json:"project"`
}
type ProjectEventMessage ¶
type ProjectHandler ¶
type ProjectHandler struct {
// contains filtered or unexported fields
}
func NewProjectHandler ¶
func NewProjectHandler(application app.App) ProjectHandler
func (ProjectHandler) Create ¶
func (h ProjectHandler) Create(w http.ResponseWriter, r *http.Request)
func (ProjectHandler) Read ¶
func (h ProjectHandler) Read(w http.ResponseWriter, r *http.Request)
type ProjectReadResponse ¶
type ProjectReadResponse struct {
Project Project `json:"project"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) OnShutdown ¶
func (*Server) SetHandler ¶
type ZapError ¶
type ZapError struct {
// contains filtered or unexported fields
}
func (ZapError) LogContext ¶
Click to show internal directories.
Click to hide internal directories.