Documentation
¶
Overview ¶
!
- rest-api-framework
- Copyright(c) 2019 Roshan Gade
- MIT Licensed
!
- rest-api-framework
- Copyright(c) 2019 Roshan Gade
- MIT Licensed
!
- rest-api-framework
- Copyright(c) 2019 Roshan Gade
- MIT Licensed
Index ¶
- Variables
- type API
- func (api *API) All(pattern string, handle Handler)
- func (api *API) Delete(pattern string, handle Handler)
- func (api *API) Exception(err string, handle Handler)
- func (api *API) Get(pattern string, handle Handler)
- func (api *API) Head(pattern string, handle Handler)
- func (api *API) Options(pattern string, handle Handler)
- func (api *API) Patch(pattern string, handle Handler)
- func (api *API) Post(pattern string, handle Handler)
- func (api *API) Put(pattern string, handle Handler)
- func (api *API) Route(method string, pattern string, handle Handler)
- func (api *API) ServeHTTP(res http.ResponseWriter, req *http.Request)
- func (api *API) UnhandledException(handle Handler)
- func (api *API) Use(handle Handler)
- type Context
- func (ctx *Context) End()
- func (ctx *Context) Get(key string) (val interface{}, exists bool)
- func (ctx *Context) GetError() error
- func (ctx *Context) JSON(data interface{})
- func (ctx *Context) PostSend(task Task)
- func (ctx *Context) PreSend(task Task)
- func (ctx *Context) Set(key string, val interface{})
- func (ctx *Context) SetHeader(key string, val string) *Context
- func (ctx *Context) Status(code int) *Context
- func (ctx *Context) Text(data string)
- func (ctx *Context) Throw(err error)
- func (ctx *Context) Write(data []byte)
- type Handler
- type Namespace
- func (n *Namespace) All(pattern string, handle Handler)
- func (n *Namespace) Delete(pattern string, handle Handler)
- func (n *Namespace) Exception(err string, handle Handler)
- func (n *Namespace) Get(pattern string, handle Handler)
- func (n *Namespace) Head(pattern string, handle Handler)
- func (n *Namespace) Options(pattern string, handle Handler)
- func (n *Namespace) Patch(pattern string, handle Handler)
- func (n *Namespace) Post(pattern string, handle Handler)
- func (n *Namespace) Put(pattern string, handle Handler)
- func (n *Namespace) Set(prefix string, api *API)
- func (n *Namespace) Use(handle Handler)
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("URL_NOT_FOUND") ErrUncaughtException = errors.New("UNCAUGHT_EXCEPTION") )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
*
- API - Application
func (*API) ServeHTTP ¶
func (api *API) ServeHTTP(res http.ResponseWriter, req *http.Request)
*
- Required handle for http module
func (*API) UnhandledException ¶
type Context ¶
type Context struct { Request *http.Request Response http.ResponseWriter Query url.Values Body map[string]interface{} Params map[string]string // contains filtered or unexported fields }
*
- Context
Directories
¶
Path | Synopsis |
---|---|
! * rest-api-framework * Copyright(c) 2019 Roshan Gade * MIT Licensed ! * rest-api-framework * Copyright(c) 2019 Roshan Gade * MIT Licensed
|
! * rest-api-framework * Copyright(c) 2019 Roshan Gade * MIT Licensed ! * rest-api-framework * Copyright(c) 2019 Roshan Gade * MIT Licensed |
! * rest-api-framework * Copyright(c) 2019 Roshan Gade * MIT Licensed
|
! * rest-api-framework * Copyright(c) 2019 Roshan Gade * MIT Licensed |
Click to show internal directories.
Click to hide internal directories.