Documentation ¶
Index ¶
- func NewHandler(postgresRead relational.InterfaceRead, postgresWrite relational.InterfaceWrite, ...) httpUtil.Interface
- type Handler
- func (h *Handler) Delete(w netHTTP.ResponseWriter, _ *netHTTP.Request)
- func (h *Handler) Get(w netHTTP.ResponseWriter, r *netHTTP.Request)
- func (h *Handler) Options(w netHTTP.ResponseWriter, _ *netHTTP.Request)
- func (h *Handler) Post(w netHTTP.ResponseWriter, r *netHTTP.Request)
- func (h *Handler) Put(w netHTTP.ResponseWriter, _ *netHTTP.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler( postgresRead relational.InterfaceRead, postgresWrite relational.InterfaceWrite, broker brokerLib.IBroker, config app.IAppConfig) httpUtil.Interface
Types ¶
type Handler ¶
func (*Handler) Get ¶
func (h *Handler) Get(w netHTTP.ResponseWriter, r *netHTTP.Request)
@Tags Analysis @Security ApiKeyAuth @Description Get analysis on database @ID get-one-analysis @Accept json @Produce json @Param analysisID path string true "analysisID of the analysis" @Success 200 {object} http.Response{content=horusec.Analysis{vulnerabilities=[]horusec.Vulnerability{commitAuthor=horusec.CommitAuthor{}}}} "OK" @Success 400 {object} http.Response{content=string} "BAD REQUEST" @Success 404 {object} http.Response{content=string} "NOT FOUND" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /api/analysis/{analysisID} [get]
func (*Handler) Post ¶
func (h *Handler) Post(w netHTTP.ResponseWriter, r *netHTTP.Request)
@Tags Analysis @Security ApiKeyAuth @Description Start new analysis @ID start-new-analysis @Accept json @Produce json @Param SendNewAnalysis body horusec.Analysis true "send new analysis info" @Success 201 {object} http.Response{content=string} "CREATED" @Success 400 {object} http.Response{content=string} "BAD REQUEST" @Success 404 {object} http.Response{content=string} "NOT FOUND" @Failure 500 {object} http.Response{content=string} "INTERNAL SERVER ERROR" @Router /api/analysis [post]