Documentation
¶
Overview ¶
Package crudman curd api
Index ¶
- type ManagerInterface
- type Managers
- func (managers *Managers) Forbidden(w http.ResponseWriter, r *http.Request)
- func (managers *Managers) Get(route string) (ManagerInterface, bool)
- func (managers *Managers) Handler(w http.ResponseWriter, r *http.Request) (obj interface{}, err error)
- func (managers *Managers) NotFound(w http.ResponseWriter, r *http.Request)
- func (managers *Managers) Register(manager ManagerInterface, entity Tabler, setups ...Setup) *Managers
- type Route
- type Setup
- type Tabler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManagerInterface ¶
type ManagerInterface interface { List(r *http.Request) interface{} Post(r *http.Request) (interface{}, error) Put(r *http.Request) (interface{}, error) Delete(r *http.Request) error GetRoute() string SetRoute(route string) SetTableTyp(typ reflect.Type) GetTableTyp() reflect.Type GetTable() Tabler SetTable(table Tabler) }
ManagerInterface manger interface
type Managers ¶
type Managers struct {
// contains filtered or unexported fields
}
Managers all managers
func (*Managers) Forbidden ¶
func (managers *Managers) Forbidden(w http.ResponseWriter, r *http.Request)
Forbidden 403
func (*Managers) Get ¶
func (managers *Managers) Get(route string) (ManagerInterface, bool)
Get get exist manager
func (*Managers) Handler ¶
func (managers *Managers) Handler(w http.ResponseWriter, r *http.Request) (obj interface{}, err error)
Handler http handler, support GET->list data, POST->create data, PUT->update data, DELETE->delete data
Click to show internal directories.
Click to hide internal directories.