Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- type AssignFunc
- type Binder
- type HandlerFuncResource
- type HandlerSetter
- type Notifier
- type Request
- func (r *Request) Bind(i interface{}) error
- func (r *Request) Complete(c echo.Context) error
- func (r *Request) CompleteTx() error
- func (r *Request) Context() echo.Context
- func (r *Request) HandlerError() error
- func (r *Request) JSON(httpCode int, result interface{}) error
- func (r *Request) NoContent(httpCode int) error
- func (r *Request) OnPanic()
- func (r *Request) Param(name string) string
- func (r *Request) QueryParam(name string) string
- func (r *Request) Reader() *gorm.DB
- func (r *Request) Request() *http.Request
- func (r *Request) Response() http.ResponseWriter
- func (r *Request) RollbackOnPanic()
- func (r *Request) RollbackTx() error
- func (r *Request) Run(logic RequestHandlerFunc) error
- func (r *Request) RunAll(logic []RequestHandlerFunc) error
- func (r *Request) SaveSession(scn string, clientCookieName string, domain string) error
- func (r *Request) SendComplete(c bool)
- func (r *Request) SendResponse() error
- func (r *Request) SetTxError(err error)
- func (r *Request) StartTx(db *gorm.DB) *gorm.DB
- func (r *Request) Tx() *gorm.DB
- func (r *Request) TxError() error
- func (r *Request) Writer() *gorm.DB
- type RequestHandlerFunc
- type Resource
- type ResponseWriter
- type RouteGroup
- type Router
- type Runner
- type SessionCookiePopulateFunc
- type SessionCookieWriterFunc
- type TxRequest
Constants ¶
View Source
const ( PersistedResourceType = "resource.type.persisted" HandlerFuncResourceType = "resource.type.handlerFunc" GroupHandlerFuncResourceType = "resource.type.groupHandlerFunc" )
Variables ¶
View Source
var ErrResourceInvalid = errors.New("resource invalid")
Functions ¶
This section is empty.
Types ¶
type Application ¶ added in v0.2.10
type Application interface { AddPersistedResource(interface{}) Resource AddAllPersistedResource(...interface{}) []Resource SetRepository(repository database.Repository) Repository() database.Repository SetNodeNumber(number int64) NodeNumber() int64 SetDebug(b bool) Debug() bool ResourceInterfaces() ([]interface{}, error) SetIDGenerators(idGenerators generators.IDGenerators) Generators() *generators.IDGenerators Router InitRoute(*echo.Echo, AssignFunc) error // event notifier SetEventNotifier(notifierMap *owlbear.NotifierMap) Notifier }
어플리케이션 레벨 콘텍스트, 싱글톤
func App ¶ added in v0.2.10
func App() Application
type AssignFunc ¶ added in v0.3.1
type AssignFunc func(ctx Application, logicArray ...RequestHandlerFunc) echo.HandlerFunc
type HandlerFuncResource ¶
type HandlerFuncResource struct { Resource Method string Path string HandlerFunc []RequestHandlerFunc }
type HandlerSetter ¶ added in v0.1.1
type HandlerSetter interface { Handlers() []HandlerFuncResource GET(path string, handlerFunc ...RequestHandlerFunc) POST(path string, handlerFunc ...RequestHandlerFunc) PUT(path string, handlerFunc ...RequestHandlerFunc) DELETE(path string, handlerFunc ...RequestHandlerFunc) PATCH(path string, handlerFunc ...RequestHandlerFunc) TRACE(path string, handlerFunc ...RequestHandlerFunc) OPTION(path string, handlerFunc ...RequestHandlerFunc) HEAD(path string, handlerFunc ...RequestHandlerFunc) CONNECT(path string, handlerFunc ...RequestHandlerFunc) AddHandler(path string, method string, handlerFunc ...RequestHandlerFunc) }
type Request ¶
type Request struct { Resource interface{} ResourceName string ResourceOwnerID int64 Grant string Notify func(string, interface{}) // contains filtered or unexported fields }
func (*Request) CompleteTx ¶
func (r *Request) CompleteTx() error
func (*Request) HandlerError ¶
func (*Request) QueryParam ¶ added in v0.2.4
func (*Request) Response ¶ added in v0.2.2
func (r *Request) Response() http.ResponseWriter
func (*Request) RollbackOnPanic ¶
func (r *Request) RollbackOnPanic()
func (*Request) RollbackTx ¶
func (r *Request) RollbackTx() error
func (*Request) Run ¶
func (r *Request) Run(logic RequestHandlerFunc) error
func (*Request) RunAll ¶
func (r *Request) RunAll(logic []RequestHandlerFunc) error
func (*Request) SaveSession ¶
func (*Request) SendComplete ¶ added in v0.2.9
func (r *Request) SendComplete(c bool)
func (*Request) SendResponse ¶ added in v0.3.1
func (*Request) SetTxError ¶
func (r *Request) SetTxError(err error)
type RequestHandlerFunc ¶
type ResponseWriter ¶
type RouteGroup ¶ added in v0.1.1
type RouteGroup interface { Group(path string) Router JoinedPath(pathString string) string AddGroupHandler(handlerFunc ...RequestHandlerFunc) GroupHandlers() []RequestHandlerFunc }
type Router ¶
type Router interface { HandlerSetter RouteGroup Assign(e *echo.Echo, ctx Application, assignFunc AssignFunc, handlers ...RequestHandlerFunc) error }
type Runner ¶
type Runner interface { Run(logic RequestHandlerFunc) error RunAll(logic []RequestHandlerFunc) error OnPanic() }
type SessionCookiePopulateFunc ¶ added in v0.3.10
type SessionCookiePopulateFunc func(c echo.Context, r *Request, ctx Application) error
type SessionCookieWriterFunc ¶ added in v0.3.1
type SessionCookieWriterFunc func(r *Request, ctx Application) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.