handler

package
v0.0.0-...-d85def9 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: LGPL-3.0 Imports: 8 Imported by: 0 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func SetAuthProvider(provider *web.Auths)

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

func SetSessionFactory(sessionFactory func() *xorm.Session)

SetSessionFactory sets the session factory

Types

type CObject

type CObject interface {
	web.CRUDable
	web.Rights
}

CObject is the definition of our object, holds the structs

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

Jump to

Keyboard shortcuts

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