http

package
v0.0.0-...-e8ef26a Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DocumentFieldKey = "document"

Variables

View Source
var GetDocumentWireSet = wire.NewSet(NewPutDocumentHandler)
View Source
var PutDocumentWireSet = wire.NewSet(NewPutDocumentHandler)

Functions

This section is empty.

Types

type GetDocumentHandler

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

func NewGetDocumentHandler

func NewGetDocumentHandler(cd documents.GetDocumenter) *GetDocumentHandler

func (*GetDocumentHandler) Handle

func (h *GetDocumentHandler) Handle(ctx http.Context) (err error)

GetDocument godoc @Summary Retrieves document for repository @Description Get Document By ID @Tags documents @Accept json @Produce json @Param id path int true "Document ID" @Success 200 {object} string @Failure 400 {object} error @Failure 404 {object} error @Failure 500 {object} error @Router /documents/{id} [get]

type PutDocumentHandler

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

func NewPutDocumentHandler

func NewPutDocumentHandler(cd documents.PutDocumenter) *PutDocumentHandler

func (*PutDocumentHandler) Handle

func (h *PutDocumentHandler) Handle(ctx http.Context) (err error)

PutDocumenter godoc @Summary Put Document @Description Stores document into repository @Tags documents @Accept json @Produce json @Success 200 {object} string @Failure 400 {object} error @Failure 404 {object} error @Failure 500 {object} error @Router /documents [post]

Jump to

Keyboard shortcuts

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