Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
// Ms is the slice of IModels
Ms []mdl.IModel
// DB is the DB handle
DB *gorm.DB
// Cargo between Before and After hookpoints (not used in AfterRead since there is before read hookpoint.)
Cargo *Cargo
// Role of this user in relation to this data, only available during read
Roles []userrole.UserRole
}
Data is the data send to batch model hookpoints
type EndPoint ¶
type EndPoint struct {
// TypeString
TypeString string
URL string
Op rest.Op
Cardinality rest.Cardinality
// URL parameters
URLParams map[urlparam.Param]interface{}
// Who is operating this CRUPD right now
Who mdlutil.UserIDFetchable
}
Endpoint information
type IAfterTransact ¶
IAfterTransact is the method to be called after data is after the entire database transaction is done. No error is returned because database transaction is already committed.
type IBeforeApply ¶
IBeforeApply before patching operation occurred. Only called for Patch. This comes before patch is applied. Before "Before"
type IHook ¶
type IHook interface {
// Init data for this REST operation
Init(data *InitData, args ...interface{})
}
Click to show internal directories.
Click to hide internal directories.