Documentation ¶
Index ¶
- type AssignTemplateHandler
- type Client
- type ClientRegistrationParams
- type DatabaseInterface
- type ListHandler
- type Notification
- type NotificationStruct
- type NotificationUpdateParams
- type NotificationsByClient
- type PutHandler
- type RegistrationHandler
- type RegistrationParams
- type Routes
- type TemplateAssignment
- type UpdateHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignTemplateHandler ¶
type AssignTemplateHandler struct {
// contains filtered or unexported fields
}
func NewAssignTemplateHandler ¶
func NewAssignTemplateHandler(assigner assignsTemplates, errWriter errorWriter) AssignTemplateHandler
func (AssignTemplateHandler) ServeHTTP ¶
func (h AssignTemplateHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type Client ¶
type Client struct { Name string `json:"name"` Template string `json:"template"` Notifications map[string]Notification `json:"notifications"` }
type ClientRegistrationParams ¶
type ClientRegistrationParams struct { SourceName string `json:"source_name"` Notifications map[string](*NotificationStruct) `json:"notifications"` }
func NewClientRegistrationParams ¶
func NewClientRegistrationParams(body io.Reader) (ClientRegistrationParams, error)
func (ClientRegistrationParams) Validate ¶
func (clientRegistration ClientRegistrationParams) Validate() error
type DatabaseInterface ¶
type DatabaseInterface interface { services.DatabaseInterface }
type ListHandler ¶
type ListHandler struct {
// contains filtered or unexported fields
}
func NewListHandler ¶
func NewListHandler(notificationsFinder listsAllClientsAndNotifications, errWriter errorWriter) ListHandler
func (ListHandler) ServeHTTP ¶
func (h ListHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type Notification ¶
type NotificationStruct ¶
type NotificationUpdateParams ¶
type NotificationUpdateParams struct { Description string `json:"description" validate-required:"true"` Critical bool `json:"critical" validate-required:"true"` TemplateID string `json:"template" validate-required:"true"` }
func NewNotificationParams ¶
func NewNotificationParams(body io.Reader) (NotificationUpdateParams, error)
type NotificationsByClient ¶
type PutHandler ¶
type PutHandler struct {
// contains filtered or unexported fields
}
func NewPutHandler ¶
func NewPutHandler(registrar registrar, errWriter errorWriter) PutHandler
func (PutHandler) ServeHTTP ¶
func (h PutHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
func (PutHandler) ValidateCriticalScopes ¶
type RegistrationHandler ¶
type RegistrationHandler struct {
// contains filtered or unexported fields
}
func NewRegistrationHandler ¶
func NewRegistrationHandler(registrar registrar, errWriter errorWriter) RegistrationHandler
func (RegistrationHandler) ServeHTTP ¶
func (h RegistrationHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
func (RegistrationHandler) ValidateCriticalScopes ¶
type RegistrationParams ¶
type RegistrationParams struct { SourceDescription string `json:"source_description"` Kinds []models.Kind `json:"kinds"` IncludesKinds bool }
func NewRegistrationParams ¶
func NewRegistrationParams(body io.ReadCloser) (RegistrationParams, error)
func (RegistrationParams) Validate ¶
func (registration RegistrationParams) Validate() error
type Routes ¶
type Routes struct { RequestCounter stack.Middleware RequestLogging stack.Middleware DatabaseAllocator stack.Middleware NotificationsWriteAuthenticator stack.Middleware NotificationsManageAuthenticator stack.Middleware ErrorWriter errorWriter Registrar registrar TemplateAssigner assignsTemplates NotificationsFinder listsAllClientsAndNotifications NotificationsUpdater notificationsUpdater }
type TemplateAssignment ¶
type TemplateAssignment struct {
Template string `json:"template"`
}
type UpdateHandler ¶
type UpdateHandler struct {
// contains filtered or unexported fields
}
func NewUpdateHandler ¶
func NewUpdateHandler(updater notificationsUpdater, errWriter errorWriter) UpdateHandler
func (UpdateHandler) ServeHTTP ¶
func (h UpdateHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
Click to show internal directories.
Click to hide internal directories.