Documentation ¶
Index ¶
- func RegBatchCRUPDHooks(typeString string, ...)
- func RegBatchDeleteHooks(typeString string, before func(bhpData models.BatchHookPointData) error, ...)
- func RegBatchInsertHooks(typeString string, before func(bhpData models.BatchHookPointData) error, ...)
- func RegBatchPatchHooks(typeString string, before func(bhpData models.BatchHookPointData) error, ...)
- func RegBatchReadHooks(typeString string, after func(bhpData models.BatchHookPointData) error)
- func RegBatchRenderer(typeString string, ...)
- func RegBatchUpdateHooks(typeString string, before func(bhpData models.BatchHookPointData) error, ...)
- func RegCustomCreate(typeString string, modelObj models.IModel, ...)
- func RegModel(typeString string, modelObj models.IModel)
- func RegModelWithOption(typeString string, modelObj models.IModel, options models.RegOptions)
- func RegUserModel(typeString string, modelObj models.IModel)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegBatchCRUPDHooks ¶ added in v0.4.2
func RegBatchCRUPDHooks(typeString string, before func(bhpData models.BatchHookPointData, crupdOp models.CRUPDOp) error, after func(bhpData models.BatchHookPointData, crupdOp models.CRUPDOp) error)
RegBatchCRUPDHooks adds hookpoints which are called before CUPD (no read) and after batch CRUPD. Either one can be left as nil
func RegBatchDeleteHooks ¶
func RegBatchDeleteHooks(typeString string, before func(bhpData models.BatchHookPointData) error, after func(bhpData models.BatchHookPointData) error)
RegBatchDeleteHooks adds hookpoints which are called before and after batch delete. Either one can be left as nil
func RegBatchInsertHooks ¶
func RegBatchInsertHooks(typeString string, before func(bhpData models.BatchHookPointData) error, after func(bhpData models.BatchHookPointData) error)
RegBatchInsertHooks adds hookpoints which are called before and after batch update. Either one can be left as nil
func RegBatchPatchHooks ¶
func RegBatchPatchHooks(typeString string, before func(bhpData models.BatchHookPointData) error, after func(bhpData models.BatchHookPointData) error)
RegBatchPatchHooks adds hookpoints which are called before and after batch update. Either one can be left as nil
func RegBatchReadHooks ¶
func RegBatchReadHooks(typeString string, after func(bhpData models.BatchHookPointData) error)
RegBatchReadHooks adds hookpoints which are called after and read, can be left as nil
func RegBatchRenderer ¶ added in v0.4.4
func RegBatchRenderer(typeString string, renderer func(roles []models.UserRole, who models.Who, modelObj []models.IModel) []byte)
RegBatchRenderer register custom batch renderer (do your own output, not necessarily JSON)
func RegBatchUpdateHooks ¶
func RegBatchUpdateHooks(typeString string, before func(bhpData models.BatchHookPointData) error, after func(bhpData models.BatchHookPointData) error)
RegBatchUpdateHooks adds hookpoints which are called before and after batch update. Either one can be left as nil
func RegCustomCreate ¶
func RegCustomCreate(typeString string, modelObj models.IModel, f func(db *gorm.DB) (*gorm.DB, error))
RegCustomCreate register custom create table funtion
func RegModel ¶
RegModel adds a New function for an models.IModel (convenient function of RegModelWithOption)
func RegModelWithOption ¶
func RegModelWithOption(typeString string, modelObj models.IModel, options models.RegOptions)
RegModelWithOption adds a New function for an models.IModel
func RegUserModel ¶
RegUserModel register the user model (convenient function of RegModelWithOption)
Types ¶
This section is empty.