Documentation
¶
Index ¶
Constants ¶
const ( // RecordHandlerPath is the root path for all record actions RecordHandlerPath = "/record" // RecordContentTypeHandlerPath is the root path for all record actions related to a content type RecordContentTypeHandlerPath = RecordHandlerPath + "/:contenttype" )
const ( // StatsHandlerPath is root path for all statistic actions StatsHandlerPath = "/stats" // BackupHandlerPath is the root path for all backup actions BackupHandlerPath = "/backup" )
const (
// ContentTypeHandlerPath is the root path for all contenttype actions
ContentTypeHandlerPath = "/contenttype"
)
Variables ¶
var ( ErrContentTypeNotFound = echo.NewHTTPError(http.StatusNotFound, "ContentType not found") ErrRecordNotFound = echo.NewHTTPError(http.StatusNotFound, "Record not found") )
Functions ¶
This section is empty.
Types ¶
type ContentTypeHandler ¶
type ContentTypeHandler struct {
Storage storage.ContentTypeManager
}
ContentTypeHandler is the Handler for contenttype
func (*ContentTypeHandler) Delete ¶
func (h *ContentTypeHandler) Delete(c echo.Context) error
Delete api action to delete a single content type
func (*ContentTypeHandler) Get ¶
func (h *ContentTypeHandler) Get(c echo.Context) error
Get api call to get content type info
func (*ContentTypeHandler) List ¶
func (h *ContentTypeHandler) List(c echo.Context) error
List api call lists all content types
func (*ContentTypeHandler) Put ¶
func (h *ContentTypeHandler) Put(c echo.Context) error
Put api call to create or updates a content type. Expecting a post request
func (*ContentTypeHandler) SetRoutes ¶
func (h *ContentTypeHandler) SetRoutes(e *echo.Echo)
SetRoutes adds the routes related to the handler
type RecordHandler ¶
RecordHandler is the Handler for record
func (*RecordHandler) Delete ¶
func (h *RecordHandler) Delete(c echo.Context) error
Delete api action to delete a single content type
func (*RecordHandler) Get ¶
func (h *RecordHandler) Get(c echo.Context) error
Get api call to get content type info
func (*RecordHandler) ListRevisions ¶
func (h *RecordHandler) ListRevisions(c echo.Context) error
ListRevisions lists all revisions for a given record
func (*RecordHandler) Put ¶
func (h *RecordHandler) Put(c echo.Context) error
Put api call to create or updates a content type. Expecting a post request
func (*RecordHandler) SetRoutes ¶
func (h *RecordHandler) SetRoutes(e *echo.Echo)
SetRoutes adds the routes related to the handler
type StorageHandler ¶
StorageHandler is the Handler for contenttype
func (*StorageHandler) All ¶
func (h *StorageHandler) All(c echo.Context) error
All action shows all statistic data at once
func (*StorageHandler) Download ¶
func (h *StorageHandler) Download(c echo.Context) error
Download api call to download the database data file
func (*StorageHandler) SetRoutes ¶
func (h *StorageHandler) SetRoutes(e *echo.Echo)
SetRoutes adds the routes related to the handler