Documentation ¶
Index ¶
- func HandleHTTPError(err error, ctx echo.Context) *echo.HTTPError
- func SetAuthProvider(provider *web.Auths)
- func SetLoggingProvider(logger *logging.Logger)
- func SetMaxItemsPerPage(maxItemsPerPage int)
- func SetSessionFactory(sessionFactory func() *xorm.Session)
- type CObject
- type Config
- type WebHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleHTTPError ¶
func HandleHTTPError(err error, ctx echo.Context) *echo.HTTPError
HandleHTTPError does what it says
func SetAuthProvider ¶
SetAuthProvider sets the auth provider in config
func SetLoggingProvider ¶
func SetLoggingProvider(logger *logging.Logger)
SetLoggingProvider sets the logging provider in the config
func SetMaxItemsPerPage ¶
func SetMaxItemsPerPage(maxItemsPerPage int)
SetMaxItemsPerPage sets the max number of items per page in the config
func SetSessionFactory ¶
SetSessionFactory sets the session factory
Types ¶
type Config ¶
type Config struct { AuthProvider *web.Auths LoggingProvider *logging.Logger MaxItemsPerPage int SessionFactory func() *xorm.Session }
Config contains the config for the web handler
type WebHandler ¶
type WebHandler struct {
EmptyStruct func() CObject
}
WebHandler defines the webhandler object This does web stuff, aka returns json etc. Uses CRUDable Methods to get the data
func (*WebHandler) CreateWeb ¶
func (c *WebHandler) CreateWeb(ctx echo.Context) error
CreateWeb is the handler to create an object
func (*WebHandler) DeleteWeb ¶
func (c *WebHandler) DeleteWeb(ctx echo.Context) error
DeleteWeb is the web handler to delete something
func (*WebHandler) ReadAllWeb ¶
func (c *WebHandler) ReadAllWeb(ctx echo.Context) error
ReadAllWeb is the webhandler to get all objects of a type
func (*WebHandler) ReadOneWeb ¶
func (c *WebHandler) ReadOneWeb(ctx echo.Context) error
ReadOneWeb is the webhandler to get one object
func (*WebHandler) UpdateWeb ¶
func (c *WebHandler) UpdateWeb(ctx echo.Context) error
UpdateWeb is the webhandler to update an object