http

package
Version: v0.0.0-...-fac03c6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	// StatsHandlerPath is root path for all statistic actions
	StatsHandlerPath = "/stats"

	// BackupHandlerPath is the root path for all backup actions
	BackupHandlerPath = "/backup"
)
View Source
const (
	// ContentTypeHandlerPath is the root path for all contenttype actions
	ContentTypeHandlerPath = "/contenttype"
)

Variables

View Source
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

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

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

type RecordHandler struct {
	Storage storage.Manager
}

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

type StorageHandler struct {
	Storage storage.Manager
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL