Documentation ¶
Index ¶
- func Handle(w http.ResponseWriter, r *http.Request, o Operation)
- type CreateService
- type GetService
- type Handler
- type ListService
- type MapService
- type ModelMapper
- type Operation
- func Create(payload interface{}, service CreateService, mapper MapService, l logger.Logger) Operation
- func Get(service GetService, mapper ModelMapper, l logger.Logger) Operation
- func List(service ListService, mapper ModelMapper, l logger.Logger) Operation
- func Remove(id string, service RemoveService, l logger.Logger) Operation
- func Update(payload interface{}, service UpdateService, mapper MapService, l logger.Logger) Operation
- type PayloadMapper
- type RemoveService
- type UpdateService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateService ¶
CreateService interface
type GetService ¶
GetService interface
type ListService ¶
ListService interface
type ModelMapper ¶
type ModelMapper interface {
ModelToPayload(interface{}) interface{}
}
ModelMapper interface
type Operation ¶
type Operation interface {
Execute(w http.ResponseWriter, r *http.Request)
}
Operation interface
func Create ¶
func Create(payload interface{}, service CreateService, mapper MapService, l logger.Logger) Operation
Create operation
func Get ¶
func Get(service GetService, mapper ModelMapper, l logger.Logger) Operation
Get operation
func List ¶
func List(service ListService, mapper ModelMapper, l logger.Logger) Operation
List operation
func Remove ¶
func Remove(id string, service RemoveService, l logger.Logger) Operation
Remove operation
func Update ¶
func Update(payload interface{}, service UpdateService, mapper MapService, l logger.Logger) Operation
Update operation
type PayloadMapper ¶
type PayloadMapper interface {
PayloadToModel(interface{}) interface{}
}
PayloadMapper interface
type RemoveService ¶
RemoveService interface
type UpdateService ¶
UpdateService interface
Click to show internal directories.
Click to hide internal directories.