handler

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler implements handler interface

func NewHandler

func NewHandler(appSvc applicationService, appConverter applicationConverter, appTemplateSvc applicationTemplateService, tntSvc tenantService, transact persistence.Transactioner) *Handler

NewHandler returns new ns-adapter handler

func (*Handler) ServeHTTP

func (a *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Description - Bulk create-or-update operation on exposed on-premise systems. This handler supports two types of reports - full and delta. This handler takes a list of fully described SCCs together with the exposed systems. It creates new application for every exposed system for which CMP isn't aware of, and updates the metadata for the ones it is. - In case of full report: If there is SCC which was not reported, all exposed systems of this SCC are marked as unreachable. - In case of delta report: If there are missing exposed systems for a particular SCC, these systems are marked as unreachable. URL - /api/v1/notifications Query Params - reportType=[full, delta] HTTP Method - PUT Content-Type - application/json HTTP Codes: 204 No Content: - In case of delta report: if all systems are processed successfully - In case of full report: if the request was processed 200 OK: - In case of delta report: if update/create failed for some on-premise systems 400 Bad Request: - missing or invalid required report type query parameter - failed to parse request body - validating request body failed 500 Internal Server Error: - In case internal issue occurred. Example: db communication failed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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